pmh47 / dirt

DIRT: a fast differentiable renderer for TensorFlow
MIT License
312 stars 63 forks source link

NotFoundError: ../dirt/dirt/librasterise.so: undefined symbol: _ZN10tensorflow7s... #103

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hey @pmh47, thanks for the code

I'm having the following error while running the square_test.py.:

root@fdb4004adda0:/Octopus# python dirt/tests/square_test.py 
Traceback (most recent call last):
  File "dirt/tests/square_test.py", line 4, in <module>
    import dirt
  File "/Octopus/dirt/dirt/__init__.py", line 2, in <module>
    from rasterise_ops import rasterise, rasterise_batch
  File "/Octopus/dirt/dirt/rasterise_ops.py", line 7, in <module>
    _rasterise_module = tf.load_op_library(_lib_path + '/librasterise.so')
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/load_library.py", line 56, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: /Octopus/dirt/dirt/librasterise.so: undefined symbol: _ZN10tensorflow7strings8internal9CatPiecesB5cxx11ESt16initializer_listIN4absl11string_viewEE

I tried to build dirt adding set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffast-math -D_GLIBCXX_USE_CXX11_ABI=0") like I saw in issue #10 but it keeps showing me the same error...

Current environment using Docker:

Could you help me with that pls?

ghost commented 3 years ago

Nevermind... It worked after adding add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0) in the end of dirt/csrc/CMakeLists.txt file and build dirt again.