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

Force static linking with Intel libirng

DataScientist
Valued Contributor I
287 Views

I have been spending hours trying to understand why Intel `ifort` cannot link `libirng` statically with output shared libraries. Still, I have no clue. I have tried `-static-intel` with and without the other more generic flag `-static` but it has no effects. Using `ldd`, I can still see a dependency on `libirng.so`.

I would appreciate any suggestion as to where to look for a solution next to get this resolved. I am using Intel OneAPI 2021.11.1

0 Kudos
1 Reply
Ron_Green
Moderator
216 Views

that is unusual.  that's the random number generator library.  Are you linking in any 3rd party libraries?  Maybe they have a dynamic link to libirng.so?  

Try compiler option -# when you build the final executable and check all the -l arguments going into the linker. 

0 Kudos
Reply