Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28808 Discussions

dyld: Symbol not found: _iso_c_binding_mp_c_null_funptr_

Juergen_R_R
Valued Contributor II
1,227 Views

Trying out for the first time ifort (19 beta) on MAC OS X with the trial version, up to now I had our software built only on Linux. On Darwin 17.5.0 using gcc (from my own build, not clang) as a CCLD C linker, I get unresolved symbols in my library (cf. below).

On Linux there is one more line

U isoc99 sscanf@@GLIBC 2.7  

but the executable does not bother that there are these undefined symbols in the main library. Before I post any more details (let me know which ones you want): any ideas? 

 

 

00000000060c71c0 s _isl

                 U _iso_c_binding_mp_c_associated_funptr_

                 U _iso_c_binding_mp_c_associated_ptr_

                 U _iso_c_binding_mp_c_loc_private_

                 U _iso_c_binding_mp_c_null_funptr_

                 U _iso_c_binding_mp_c_null_ptr_

 

 

0 Kudos
4 Replies
Lorri_M_Intel
Employee
1,227 Views

What does your link line look like?

 

0 Kudos
Juergen_R_R
Valued Contributor II
1,227 Views

It seems that the ifort libraries like libirc, libimp, and libsvml had been missing. This is strange, on Linux I do not have to explicitly include them in the linking command in order to get them linked into my application library. Here is the thing that I added explicitly in the link command under OSX:

-L/opt/intel//compilers_and_libraries_2019.0.041/mac/compiler/lib -L/usr/lib /opt/intel//compilers_and_libraries_2019.0.041/mac/compiler/lib/libifport.a /opt/intel//compilers_and_libraries_2019.0.041/mac/compiler/lib/libifcoremt.a /opt/intel//compilers_and_libraries_2019.0.041/mac/compiler/lib/libimf.a /opt/intel//compilers_and_libraries_2019.0.041/mac/compiler/lib/libsvml.a /opt/intel//compilers_and_libraries_2019.0.041/mac/compiler/lib/libipgo.a /opt/intel//compilers_and_libraries_2019.0.041/mac/compiler/lib/libirc.a -lpthread /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.1.0/lib/darwin/libclang_rt.osx.a

Then it works. 

 

0 Kudos
Lorri_M_Intel
Employee
1,227 Views

If you are using "ifort" to link your application on Linux, then the compiler-driver knows to add in these libraries.

It sounded from your OP that you were using "gcc" to link your application.    There is no way that gcc would know to add in these libraries.

           Glad to hear that you've resolved it --

                                           --Lorri

0 Kudos
Juergen_R_R
Valued Contributor II
1,227 Views

Yes, in principle I can link and our code runs. However, the parsing of the command line does strange things different than under Linux. For the linking, is there a well-defined, preferred method to automatically access the list of libraries to be linked into a user library? In our configure I use the -dryrun flag, but that gives me only static libraries under OSX compared to dynamic calls under Linux.

0 Kudos
Reply