[PyCUDA] Problems compling
Andreas Kloeckner
lists at informa.tiker.net
Sun Jan 30 14:25:02 PST 2011
Hi Patrick,
On Fri, 7 Jan 2011 20:27:51 +0000 (UTC), Patrick Herron <patrick.h at duke.edu> wrote:
> I too am very eager to use PyCUDA. After some effort I was finally able to
> install on my RHEL5.5 system using
> [root at netreg-536608 doc]# CC=gcc44 make install
> This solved a host of build errors. Your advice on this and other forums has
> been very helpful.
> Unfortunately when I run the test code I get a very similar error to the one
> described above. Further, when I use the above nm command I get empty output,
> which you suggest means I don't have 3.2 drivers. Yet I (only) have 3.2 drivers
> installed.
>
> Error:
>
> [root at netreg-536608 test]# python test_driver.py
> Traceback (most recent call last):
> File "test_driver.py", line 4, in ?
> from pycuda.tools import mark_cuda_test
> File
> "/usr/lib64/python2.4/site-packages/pycuda-0.94.2-py2.4-linux-x86_64.egg/
> pycuda/tools.py",
> line 30, in ?
> import pycuda.driver as cuda
> File
> "/usr/lib64/python2.4/site-packages/pycuda-0.94.2-py2.4-linux-x86_64.egg/
> pycuda/driver.py",
> line 1, in ?
> from pycuda._driver import *
> ImportError:
> /usr/lib64/python2.4/site-packages/pycuda-0.94.2-py2.4-linux-x86_64.egg/
> pycuda/_driver.so:
> undefined symbol: _ZNKSt5ctypeIcE13_M_widen_initEv
Sorry for the delay in replying. The root cause of this seems to be that
PyCUDA picks up a different version of the C++ standard library than the
version it was compiled for. (If I had to guess, it's using the previous
gcc's version instead of the one for gcc.)
The symbol itself demangles to
$ c++filt _ZNKSt5ctypeIcE13_M_widen_initEv
std::ctype<char>::_M_widen_init() const
which is specified in 22.4.1.1 of the draft C++0x standard.
A possible fix would be to run setup.py with the environment variable
CXX set to g++44, like this
$ CXX=g++44 python setup.py install
HTH,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20110130/2b422c96/attachment.pgp>
More information about the PyCUDA
mailing list