Installing Theano (latest) on TX1, g++ error

After upgrading to jetpack 2.2.1 (32-bit) version, I installed Theano from the git repository. When I tried to evaluate a pretrained neural network, I got the following error:

Error in `/usr/bin/g++': double free or corruption (top):

So I tried running a simpler script with only 4 lines:

x = theano.tensor.fvector(‘x’)
W = theano.shared(numpy.asarray([0.2, 0.7]), ‘W’)
y = (x * W).sum()
f = theano.function(, y)

And I still got the same error about double free.

I have tried following the instructions on installing theano for TX1 from
http://deeplearning.net/software/theano/install_ubuntu.html

and also tried different releases of Theano, but I still get the same result. One thing I couldn’t do is compile libgpuarray, because cmake 3.x is unavailable for Ubuntu 14.04.

Is there a guide for getting Theano working on TX1?