- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I recently updated my compiler from IFC 8.1 to IFC 9.1, and found out that when compiling my code I get a lot of "underfined reference ... " errors during linking. My code depends on other libraries such as HDF5, etc. I finally resolved the problem after re-arranging the linking ordering in my makefiles.
So is there changes in the linker behaviour from 8.1 to 9.1 that caused this ? Is this documented anywhere (I quickly scanned the release note for 9.1 but couldn't see it) ?
Thanks.
RDB
I recently updated my compiler from IFC 8.1 to IFC 9.1, and found out that when compiling my code I get a lot of "underfined reference ... " errors during linking. My code depends on other libraries such as HDF5, etc. I finally resolved the problem after re-arranging the linking ordering in my makefiles.
So is there changes in the linker behaviour from 8.1 to 9.1 that caused this ? Is this documented anywhere (I quickly scanned the release note for 9.1 but couldn't see it) ?
Thanks.
RDB
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On Linux, the linker is part of the OS/gcc and not the compiler, so I don't know how to explain what you saw. In general, linkers process libraries sequentially, and once all known references have been found in a library, it is closed and not revisited. If you have inter-library dependences, this can cause problems such as you saw depending on the order in which the linker saw things.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is strange then. I've seen this on two machines now, both happened when I changed the IFC from 8.1 to 9.1, while the OS/gcc remains the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
While it is true that the linker stays the same, the compiler-driver (the utility that interprets the users commands, invokes the compiler then invokes the linker and anything else requested by the user, aka "ifort") certainly may have changed the list and/or order of libraries that it links against.
In other words, check to see if the order of the libraries is different between ifort v8.1 and ifort v9.1. You can do this with the undocumented (but useful) switch "-#x". That will echo to syserror the commands being passed to the compiler and linker. That may give you an idea of what changed.
- Lorri

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page