0

I am trying to compile a shared library (c++ numpy extension) using the adept library for automatic differentiation. I get this error:

ImportError: dlopen( xxx/build/lib.macosx-10.9-x86_64-3.9/xxx.so, 0x0002): symbol not found in flat namespace '___emutls_v._ZN5adept21_stack_current_threadE'

how can I resolve this symbol?

This is the configuration used in "setup.py":

os.environ["CC"]    = "g++-11"
os.environ["CXX"]   = "g++-11"

extra_compile_args = ["-std=gnu++20", "-Wall", "-Wextra", "-O3", "-fPIC" , "-pthread"]
libraries=['glog', 'lapack', 'ceres', 'm', 'stdc++', 'gcc_eh', 'adept'],
language='c++20',

thank you for your suggestions!

I tried to add "gcc_eh" to solve issues with "emutls", but it obviously hasn't helped. I tried to link statically against adept.a, which didn't help either.

273K
  • 29,503
  • 10
  • 41
  • 64
q086as
  • 1
  • 2
  • I actually found this post, which solves the problem: https://stackoverflow.com/questions/73320886/how-to-link-a-c11-program-to-the-adept-library – q086as Feb 06 '23 at 06:53

0 Answers0