This is a f77 code being ported to Intel fortran 90. The build consists of building a shared library that is used by other fortran programs. When building contempt28, The linker is complaining (warning) that the shared library I am linking to, cannot find library files. The -rpath or -rpath-link is not an option I can use in the compiler. The .so files described in the warning, are library files in the library of the compiler.
How can I fix this?
See below:
ld: warning: libifport.so.5, needed by /rxe/source/shlib/v21_cp03/v2.1.cp03/hpgl_routines.so, not found (try using -rpath or -rpath-link)
ld: warning: libifcoremt.so.5, needed by /rxe/source/shlib/v21_cp03/v2.1.cp03/hpgl_routines.so, not found (try using -rpath or -rpath-link)
ld: warning: libimf.so, needed by /rxe/source/shlib/v21_cp03/v2.1.cp03/hpgl_routines.so, not found (try using -rpath or -rpath-link)
ld: warning: libsvml.so, needed by /rxe/source/shlib/v21_cp03/v2.1.cp03/hpgl_routines.so, not found (try using -rpath or -rpath-link)
ld: warning: libintlc.so.5, needed by /rxe/source/shlib/v21_cp03/v2.1.cp03/hpgl_routines.so, not found (try using -rpath or -rpath-link)
The Makefile for the contempt28:
FC=/opt/intel/bin/ifort
FFLAGS=-debug -O3
SHLIB=/rxe/source/shlib/v21_cp03/v2.1.cp03
OBJS=contempt28_tu.o inp_routines.o ftb_routines.o con_try.o drxe1.o hx1.o spray1.o local_lib.o
FFLAGS=-debug -align dcommons -real-size 64 -warn nouncalled -warn nousage
Build-Order: contempt28_tu.o inp_routines.o ftb_routines.o \
con_try.o drxe1.o hx1.o spray1.o local_lib.o \
$(SHLIB)/hpgl_routines.so contempt28
contempt28: $(OBJS) ${SHLIB}/hpgl_routines.so
$(FC) $(FFLAGS) -rpath-link -o contempt28 $(OBJS) -L$(SHLIB)/hpgl_routines.so
contempt28_tu.o : contempt28_tu.f
$(FC) $(FFLAGS) -c contempt28_tu.f
inp_routines.o : inp_routines.f
$(FC) $(FFLAGS) -c inp_routines.f
ftb_routines.o : ftb_routines.f
$(FC) $(FFLAGS) -c ftb_routines.f
con_try.o: con_try.f
$(FC) $(FFLAGS) -c con_try.f
drxe1.o : drxe1.f
$(FC) $(FFLAGS) -c drxe1.f
hx1.o : hx1.f
$(FC) $(FFLAGS) -c hx1.f
spray1.o : spray1.f
$(FC) $(FFLAGS) -c spray1.f
local_lib.o : local_lib.f
$(FC) $(FFLAGS) -c local_lib.f
The Makefile for the shared library
FC=/opt/intel/bin/ifort
CC=/opt/intel/bin/icc
CFLAGS=-g -shared -fPIC
FFLAGS=-debug -shared -fPIC -align dcommons -real-size 64 -warn nousage
SHLIB_UTIL: interfaces.so hpgl_routines.so system.so datey2k.so
interfaces.so : interfaces.c
$(CC) $(CFLAGS) -o interfaces.so interfaces.c
hpgl_routines.so : hpgl_routines.f
$(FC) $(FFLAGS) -o hpgl_routines.so hpgl_routines.f
system.so : system.f
$(FC) $(FFLAGS) -o system.so system.f
datey2k.so : datey2k.f
$(FC) $(FFLAGS) -o datey2k.so datey2k.f