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

ld: cannot find -lintrins

petterab
Beginner
1,022 Views
Hi,
I am trying to compile an open CFD code using intel Fortran compiler ver 8.1 but get the following error when linking:
lintrins -lIEPCF90 -lF90 -limf -lcprts -lcxa -lirc -lm
ld: cannot find -lintrins
gmake: *** [run2d.Linux.Intel.Intel.ex] Error 1
As I understand, lintrins is not supported in the version 8 or above and also in my makefile I can see it is written for version 7 or earlier. How can I work around this problem without being an expert on compilers and writing makefiles (in fact, I have no clue about these things). What can I replace lintrins with? I know also I will get similar problems with -lIEPCF90 and -lF90.
Part of my makefile looks like this:
ifeq ($(FCOMP),Intel)
# For earlier versions
# FC := ifc -cm
FC := ifort -cm
fC := $(FC) -cm
FDEBF += -g
fDEBF += -g
FOPTF += -g
fOPTF += -g
FOPTF += -O2
# FOPTF += -axK
fOPTF += -O2
# fOPTF += -axK
fDEBF += -w
fOPTF += -w
ifneq ($(DIM),3)
FDEBF += -CB -CU -CA
fDEBF += -CB -CU -CA
endif
__ifc_version := $(shell $(FC) -V 2>&1 1>/dev/null | grep Version)
override XTRALIBS += -lintrins -lIEPCF90 -lF90 -limf -lcprts -lcxa -lirc
ifeq ($(findstring Version 5.0.1, $(__ifc_version)), Version 5.0.1)
IFC_VERSION := 5.0.1
IFC_MAJOR_VERSION := 5
IFC_MINOR_VERSION := 0
LIBRARY_LOCATIONS += $(IA32ROOT)/lib
override XTRALIBS += $(IA32ROOT)/lib/icrt.link
else
ifeq ($(findstring Version 6.0, $(__ifc_version)), Version 6.0)
IFC_VERSION := 6.0
IFC_MAJOR_VERSION := 6
IFC_MINOR_VERSION := 0
LIBRARY_LOCATIONS += /opt/intel/compiler60/ia32/lib
else
ifeq ($(findstring Version 7, $(__ifc_version)), Version 7)
IFC_MAJOR_VERSION := 7
ifeq ($(findstr Version 7.0, $(__ifc_version)), 7.0)
IFC_VERSION := 7.0
IFC_MINOR_VERSION := 0
else
ifeq ($(findstr Version 7.1, $(__ifc_version)), 7.1)
IFC_VERSION := 7.1
IFC_MINOR_VERSION := 1
endif
endif
LIBRARY_LOCATIONS += /opt/intel/compiler70/ia32/lib
endif
endif
endif
endif
Any help is very muchappreciated...
Andreas
0 Kudos
4 Replies
TimP
Honored Contributor III
1,022 Views
If you can set up the Makefile so that ifort drives the link, your ifort should take care automatically of specifying the libraries. Several of the libraries in your Makefile are specific to compilers which are no longer current. The normal method for setting up library paths is to use the LD_LIBRARY_PATH setting in accordance with the /bin/ifortvars. script set up when you install ifort.
If you need to know exactly the command passed to ld by ifort with the options you have chosen, use ifort to link a program, giving those options, including -# to get a verbose screen display.
0 Kudos
petterab
Beginner
1,022 Views
Thanx,
With some help from our local support I got the correct reference to the current version of ifort (ver 9.0). I replaced the following line
override XTRALIBS += -lintrins -lIEPCF90 -lF90 -limf -lcprts -lcxa -lirc

with
LIBRARY_LOCATIONS += /opt/intel/fc/9.0/lib
override XTRALIBS += -limf -lcprts -lcxa -lirc -lifcore

in my makefile, so now it compiles! :-)
0 Kudos
jga36
Beginner
1,022 Views

Hi Tim18,

I'm getting thesame error in an IA64 Linux cluster after compiling with Intel version 9.0, but I didn't understand how to set LD_LIBRARY_PATHin my environment before compiling. Can you give a clue about how to find the correctpath for lintrins library?

Thanks,

Juan

0 Kudos
TimP
Honored Contributor III
1,022 Views

The ifortvars scripts in the compiler installation should present a correct example how to set the PATH variables for ifort, unless your installation was moved after installing. The previous poster was describing a Makefile which disregarded advice not to bury specific compiler version dependent library names in the build.

If you are looking for a libintrins from an Intel compiler, there isn't such a library in currently supported versions. The ifort scripts include the names of the current libraries, and you shouldn't normally be second guessing them at this level.

0 Kudos
Reply