libstempo icon indicating copy to clipboard operation
libstempo copied to clipboard

ImportError : Undefined symbol

Open shiningsurya opened this issue 8 years ago • 1 comments

Hey

I get that this error means I screwed up somewhere in installation. Or some libraries are not being linked. But, I can't figure out how which library has to be linked and how.

Originally, I wanted to install PAL2 in a virtual environment. Everything went smoothly but when I tried to import libstempo, I got undefined symbol error.

I was able to run and import libstempo in my original environment just fine. I think there is some library not being found/linked when I do it in that virtual environment.

Can you shed some light on this?

Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/shining/anaconda2/envs/pal2_conda/lib/python2.7/site-packages/libstempo/__init__.py", line 8, in <module> from libstempo.libstempo import * ImportError: /home/shining/mega/PDA/lib/libtempo2.so.2: undefined symbol: omp_get_thread_num

shiningsurya avatar Jun 22 '17 08:06 shiningsurya

This is actually a problem with the tempo2 library, not libstempo. Recent versions use openmp, so you need to compile tempo2 with something that supports it. On the Mac, I use Homebrew-installed llvm (brew install llvm) and then do (export CC=/usr/local/opt/llvm/bin/clang; export CXX=/usr/local/opt/llvm/bin/clang++) before configuring tempo2. If you have a recent gcc through Homebrew or Macports, that could work also. There may be also compilers available through Anaconda, I’m not sure.

Michele

On Jun 22, 2017, at 10:50 AM, Suryarao Bethapudi [email protected] wrote: Hey

I get that this error means I screwed up somewhere in installation. Or some libraries are not being linked. But, I can't figure out how which library has to be linked and how.

Originally, I wanted to install PAL2 in a virtual environment. Everything went smoothly but when I tried to import libstempo, I got undefined symbol error.

I was able to run and import libstempo in my original environment just fine. I think there is some library not being found/linked when I do it in that virtual environment.

Can you shed some light on this?

Traceback (most recent call last): File "", line 1, in File "/home/shining/anaconda2/envs/pal2_conda/lib/python2.7/site-packages/libstempo/init.py", line 8, in from libstempo.libstempo import * ImportError: /home/shining/mega/PDA/lib/libtempo2.so.2: undefined symbol: omp_get_thread_num

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vallis/libstempo/issues/16, or mute the thread https://github.com/notifications/unsubscribe-auth/AAeEsEi7Z_5FwODDDwKk04QAN17baxsaks5sGirggaJpZM4OB_YC.

vallis avatar Jun 24 '17 08:06 vallis