google-deepmind / reverb

Reverb is an efficient and easy-to-use data storage and transport system designed for machine learning research
Apache License 2.0
704 stars 92 forks source link

Building from Source: libpybind.so undefined symbol #7

Closed agnusmaximus closed 4 years ago

agnusmaximus commented 4 years ago

I'm building reverb from source, but am running into an undefined symbol error when trying to import the built reverb.

To build from source I do as the instructions say: bazel build -c opt //reverb/pip_package:build_pip_package and ./bazel-bin/reverb/pip_package/build_pip_package --dst /tmp/reverb_build/dist/

(Note that I did not do this within a docker container as I have bazel installed)

The build process completes successfully.

However, when I do import reverb I run into the following error:

  File "/.../conda/lib/python3.6/site-packages/reverb/pybind.py", line 1, in <module>
    import tensorflow as _tf; from .libpybind import *; del _tf
ImportError: /.../conda/lib/python3.6/site-packages/reverb/libpybind.so: undefined symbol: _ZNSaIlEC1Ev

Is there any reason why this might happen? I'm on a linux machine and used a gcc-7 installed from conda to install reverb.

agnusmaximus commented 4 years ago

Fixed by compiling with a different gcc version (gcc-7.5 instead of gcc-7.1)