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

ifort 16.0.0.109 compilation fails with -static

karin_m_
Beginner
812 Views

I am trying to compile with -static; however this fails at the load stage even for the simplest little program (omitting -static works fine)

print *,'hello'
end

ifort -static hello.f90 

gives the following error messages

ld: cannot find -lm
ld: cannot find -lpthread
ld: cannot find -lc
ld: cannot find -ldl
ld: cannot find -lc

 

where do these come from? I have source'd ifortvars.sh, compilervars.sh and mklvars.sh so all environment variables should be set correctly. The current installation is an update from a previous version - could it be that there is something which ought to have been deleted but hasn't (AFAIK -pthread is depreciated in the current version); if so what? 

Linux Custer 3.10.0-229.11.1.el7.x86_64 #1 SMP Thu Aug 6 01:06:18 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Intel(R) Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0.0.109 Build 20150815

 

 

0 Kudos
1 Solution
TimP
Honored Contributor III
812 Views

You would need to install those static libraries usèd by your gcc. If you want to specify only the ifort provided static libraries, set -static-intel

View solution in original post

0 Kudos
2 Replies
TimP
Honored Contributor III
813 Views

You would need to install those static libraries usèd by your gcc. If you want to specify only the ifort provided static libraries, set -static-intel

0 Kudos
karin_m_
Beginner
812 Views

Ahhh! Brilliant - got system administrator to reinstall *.a libraries which had somehow disappeared. that fixed it, thank you!

0 Kudos
Reply