Chris <uchyt...@uw.edu> writes:

> Hey Andreas,
> I am having a similar issue that Kambiz Tavabi was having. Here is the error
> (I have pycuda on anaconda2 just like Kambiz)
>
>  File "main_class.py", line 17, in <module>
>     import pycuda.gl as cuda_gl
>  File
> "/home/uchytilc/anaconda2/lib/python2.7/site-packages/pycuda-2016.1.2-py2.7-linux-x86_64.egg/pycuda/gl/__init__.py",
> line 2, in <module>
>     import pycuda._driver as _drv
> ImportError:
> /home/uchytilc/anaconda2/lib/python2.7/site-packages/pycuda-2016.1.2-py2.7-linux-x86_64.egg/pycuda/_driver.so:
> undefined symbol: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev
>
> The weird thing is that I have some files that are having this problem and
> some that are not, with identical import statements.
>
> import sys
>
> from OpenGL.GL import *
> from OpenGL.GLUT import *
> from OpenGL.GLU import *
> from OpenGL.GL.ARB.vertex_buffer_object import *
> from OpenGL.GL.ARB.pixel_buffer_object import *
>
> import pycuda.gl as cuda_gl
> import pycuda.driver as cuda_driver
>
> The files that are experiencing this issue are all files that run this
> import statement right at the top in the main.py file, the one I initialize
> from. The one that doesn't hit this error has the import statements in a
> second file that is being imported with an __init__.py file. Not sure if
> this is pure coincidence or not but I figured it was worth bringing up.

Sorry for the delay in responding. GCC 5.1 switched its C++ ABI with version
5. I suspect some of the binary packages you have installed are using
the old ABI (Anaconda is built on CentOS 6 I believe and would be using
the old ABI), while C++ software you built on your machine (PyCUDA) will
use the new ABI. See here for more info:

https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html

Try adding (in PyCUDA's siteconf.py)

-D_GLIBCXX_USE_CXX11_ABI=0

to CXXFLAGS.

Hope that helps,
Andreas

_______________________________________________
PyCUDA mailing list
PyCUDA@tiker.net
https://lists.tiker.net/listinfo/pycuda

Reply via email to