Discussion:
[PyCUDA] Tests fail with ImportError _driver.so: undefined symbol
Kambiz Tavabi
2016-10-28 20:56:23 UTC
Permalink
Hi

I am Trying to get packages including pycuda-2016.1.2 working in a python
2.7 (Anaconda) environment. I am Running Ubuntu 1604 with working nvidia
driver and CUDA 8.
I installed pycuda via

$ git clone http://git.tiker.net/trees/pycuda.git
$ cd pycuda
$ ./configure.py --cuda-enable-gl
$ git submodule update --init
$ make -j 4
$ python setup.py install

nosetests fail with ImportErrors referencing
...anaconda2/lib/python2.7/site-packages/pycuda-2016.1.2-py2.7-linux-x86_64.egg/pycuda/_driver.so:
undefined symbol: gibbirish
The error persists after new anaconda python install, with clean pycuda
rebuild; as well as setting environment
<https://wiki.tiker.net/BoostInstallationHowto#LD_LIBRARY_PATH> using export
LD_LIBRARY_PATH=$HOME/pool/lib:${LD_LIBRARY_PATH}--although I don't really
understand what $HOME/pool/lib means since it doesn't even exist? I read a
few short reports about this on various forums and the problem is
identified as a mismatch between python headers--which unfortunately makes
little sense to me; I have no idea what kind of problem I am hitting here.

Thanks in advance for any help.
Andreas Kloeckner
2016-10-28 21:24:33 UTC
Permalink
Post by Kambiz Tavabi
Hi
I am Trying to get packages including pycuda-2016.1.2 working in a python
2.7 (Anaconda) environment. I am Running Ubuntu 1604 with working nvidia
driver and CUDA 8.
I installed pycuda via
$ git clone http://git.tiker.net/trees/pycuda.git
$ cd pycuda
$ ./configure.py --cuda-enable-gl
$ git submodule update --init
$ make -j 4
$ python setup.py install
nosetests fail with ImportErrors referencing
undefined symbol: gibbirish
Did it literally say 'gibbirish'? Because that symbol is the one thing
that might help me figure out what happened.

Andreas
Kambiz Tavabi
2016-10-29 01:18:22 UTC
Permalink
I am at a complete loss. I did a fresh reinstall of the OS (ubuntu 16.04)
and the first thing I did was:


- apt update; sudo apt upgrade
- apt-get install nvidia-cuda-toolkit nvidia-361 nvidia-modprobe
- Build install pycuda as before; nosetests failed with same error
- pip uninstall pycuda
- pip install pycuda
- python -c "from pycuda import gpuarray, driver" > Same import error

I wonder if I am hitting this issue
<https://github.com/NervanaSystems/neon/issues/246> on the installation?
Please keep the list cc'd.
It literally said
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev
which in retrospect is partly gibberish.
It's not. :) For example, c++filt will decode it to
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::~basic_string()
It's arguable whether that's gibberish--that depends on how much you
like C++.
At any rate, it tells me that different parts of your build process link
against two different versions of the C++ standard library, which could
very well be the result of the issue you describe regarding two versions
of the toolkit being installed, or being built with two different
compilers at least. (clang vs gcc maybe)
Sorry about that. Also, it was
just made clear to me that both Nvidia's toolkit package (i.e., CUDA 8)
and
Ubuntu's Nvidia-cuda-toolkit package were installed, so this could all be
do to conflicts caused by faulty installations.
Andreas
Andreas Kloeckner
2016-10-30 23:41:05 UTC
Permalink
Post by Kambiz Tavabi
I am at a complete loss. I did a fresh reinstall of the OS (ubuntu 16.04)
- apt update; sudo apt upgrade
- apt-get install nvidia-cuda-toolkit nvidia-361 nvidia-modprobe
- Build install pycuda as before; nosetests failed with same error
- pip uninstall pycuda
- pip install pycuda
- python -c "from pycuda import gpuarray, driver" > Same import error
I wonder if I am hitting this issue
<https://github.com/NervanaSystems/neon/issues/246> on the installation?
If you're seeing an error message that says

unsupported GNU version! gcc versions later than 4.9 are not supported

then yes, that's your problem. In general, if you don't quote (or
mis-quote, as you did) your error message, don't be surprised if nobody
can or wants to help you.

Andreas

Loading...