- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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_
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What does your link line look like?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page