pybind / cmake_example

Example pybind11 module built with a CMake-based build system
Other
626 stars 221 forks source link

Import error on xubuntu 17.04 #8

Closed ibell closed 7 years ago

ibell commented 7 years ago

I'm not totally sure of the provenance (is it from pybind11 itself?), but when I try to load a compiled module (it compiles fine) with a cmake_example-based setup.py (https://github.com/usnistgov/NISTfit), on xubuntu 17.04, I get errors when I try to load the module. Some info:

The cmake_example works just fine, as does the python_example in this environment, so I'm a bit at a loss to understand what is going on.

The error

ImportError: /home/ian/miniconda3/lib/python3.6/site-packages/matplotlib/../../../libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /home/ian/miniconda3/lib/python3.6/site-packages/NISTfit.cpython-36m-x86_64-linux-gnu.so)
ibell commented 7 years ago

So, it turns out the problem is that the shared library resolution finds the libstdc++ in conda before the system libstdc++, and because the libstdc++ from conda is older, it is missing symbols needed by g++ 6.3.

Resolution: delete conda's libstdc++