Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26730 Discussions

libifcoremt.so.5: undefined symbol: tbk_string_stack_signal_impl

wang__cifeng
Beginner
566 Views

Hi, I'm trying to use JAVA call Fortran *.so file. The *.so file is just a "Print Hello" test. I first tried Fortran call Fortran, it worked just fine. But in my JAVA System.load("*.so") code, I got an error that that : libifcoremt.so.5: undefined symbol: tbk_string_stack_signal_impl

So I tried ldd -r *.so,and it showed the same error, and I tried ldd -r libifcoremt.so.5,it showed that there're several undefined symbols,

undefined symbol: pthread_key_create (./libifcoremt.so.5)
undefined symbol: dlsym (./libifcoremt.so.5)
undefined symbol: pthread_getspecific (./libifcoremt.so.5)
undefined symbol: pthread_setspecific (./libifcoremt.so.5)
undefined symbol: tck_string_stack_signal_impl (./libifcoremt.so.5)

And I tried c++filt tbk_string_stack_signal_impl

But the result is just

tbk_string_stack_signal_impl

So I don't know where the problem is.

Can you help me please. Thx so much.

0 Kudos
1 Solution
Juergen_R_R
Valued Contributor I
566 Views

The symbol is defined in libirc.so. If you source your compiler's environment variables, all libraries should be present, or if you link a fortran application using ifort as linker, it knows which libraries to include. With Java that is possibly different. So you need to tell your application to also include libirc.so, maybe providing the LD_LIBRARY_PATH is enough, but if you generate an executable using e.g. a C-based linker then you might have to explicitly link in -L<intel library path> -lirc.

 

View solution in original post

3 Replies
wang__cifeng
Beginner
566 Views

I am still confused.

Juergen_R_R
Valued Contributor I
567 Views

The symbol is defined in libirc.so. If you source your compiler's environment variables, all libraries should be present, or if you link a fortran application using ifort as linker, it knows which libraries to include. With Java that is possibly different. So you need to tell your application to also include libirc.so, maybe providing the LD_LIBRARY_PATH is enough, but if you generate an executable using e.g. a C-based linker then you might have to explicitly link in -L<intel library path> -lirc.

 

View solution in original post

wang__cifeng
Beginner
566 Views

Juergen R. wrote:

The symbol is defined in libirc.so. If you source your compiler's environment variables, all libraries should be present, or if you link a fortran application using ifort as linker, it knows which libraries to include. With Java that is possibly different. So you need to tell your application to also include libirc.so, maybe providing the LD_LIBRARY_PATH is enough, but if you generate an executable using e.g. a C-based linker then you might have to explicitly link in -L<intel library path> -lirc.

 

Really helped me locate the problem!!! Thank you so much!!

Reply