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

error while loading shared libraries: libcxa.so.5 using Intel Fortran 9.1

tgederberg
Beginner
1,731 Views
I am having a problem using the Intel Fortran compiler (version 9.1).

During the build process of a program, I am getting the following error:

ifort -o obj/spice/tobin/tobin.o -c -O2 -extend_source -assume byterecl -save -zero -module ./obj -Isrc -Iobj spice/toolkit/src/tobin/tobin.f
Building exe/tobin
"/users/orbfcs/otis4/exe/tobin" "ephem/astcom_ephemdata.xsp"
/users/orbfcs/otis4/exe/tobin: error while loading shared libraries: libcxa.so.5: cannot open shared object file: No such file or directory
scons: *** [ephem/astcom_ephemdata.bsp] Error 127
scons: building terminated because of errors.

libcxa.so.5 is in /app/intel/intel_fc_91/lib and I have LD_LIBRARY_PATH set to /app/intel/intel_fc_91/lib:

% echo $LD_LIBRARY_PATH
/app/intel/intel_fc_91/lib

% ls $LD_LIBRARY_PATH
crtend.o libcxaguard.a libifcoremt.a libirc.a
crtxi.o libcxaguard.so libifcoremt.so libirc.so
for_main.o libcxaguard.so.5 libifcoremt.so.5 libirc_pic.a
icrt.internal.map libguide.a libifcoremt_pic.a libirc_s.a
icrt.link libguide.so libifport.a libirc_s_pic.a
libcprts.a libguide_stats.a libifport.so libompstub.a
libcprts.so libguide_stats.so libifport.so.5 libsvml.a
libcprts.so.5 libifcore.a libimf.a libsvml.so
libcxa.a libifcore.so libimf.so libunwind.a
libcxa.so libifcore.so.5 libipgo.a libunwind.so
libcxa.so.5 libifcore_pic.a libipgo_pic.a libunwind.so.5

When I execute ldd on the executable (tobin) created, I get:

% ldd tobin
libm.so.6 => /lib/tls/libm.so.6 (0x00b5c000)
libcxa.so.5 => /app/intel/intel_fc_91/lib/libcxa.so.5 (0x55014000)
libunwind.so.5 => /app/intel/intel_fc_91/lib/libunwind.so.5 (0x55039000)
libc.so.6 => /lib/tls/libc.so.6 (0x00a25000)
/lib/ld-linux.so.2 (0x00a0b000)

Can anyone help? I'm stumped. Thanks.
0 Kudos
4 Replies
TimP
Honored Contributor III
1,731 Views
Does your build script open a new shell without setting the ifort environment?
0 Kudos
tgederberg
Beginner
1,731 Views
No.

Thanks.
0 Kudos
tgederberg
Beginner
1,731 Views

Hi, I asked this question last week but have not received much feedback. I am having a problem using the Intel Fortran compiler (version 9.1).

During the build process of a program, I am getting the following error:

ifort -o obj/spice/tobin/tobin.o -c -O2 -extend_source -assume byterecl -save -zero -module ./obj -Isrc -Iobj spice/toolkit/src/tobin/tobin.f

Building exe/tobin

"/users/orbfcs/otis4/exe/tobin" "ephem/astcom_ephemdata.xsp"

/users/orbfcs/otis4/exe/tobin: error while loading shared libraries: libcxa.so.5: cannot open shared object file: No such file or directory

scons: *** [ephem/astcom_ephemdata.bsp] Error 127

scons: building terminated because of errors.

libcxa.so.5 is in /app/intel/intel_fc_91/lib and I have LD_LIBRARY_PATH set to /app/intel/intel_fc_91/lib:

% echo $LD_LIBRARY_PATH

/app/intel/intel_fc_91/lib

% ls $LD_LIBRARY_PATH

crtend.o libcxaguard.a libifcoremt.a libirc.a

crtxi.o libcxaguard.so libifcoremt.so libirc.so

for_main.o libcxaguard.so.5 libifcoremt.so.5 libirc_pic.a

icrt.internal.map libguide.a libifcoremt_pic.a libirc_s.a

icrt.link libguide.so libifport.a libirc_s_pic.a

libcprts.a libguide_stats.a libifport.so libompstub.a

libcprts.so libguide_stats.so libifport.so.5 libsvml.a

libcprts.so.5 libifcore.a libimf.a libsvml.so

libcxa.a libifcore.so libimf.so libunwind.a

libcxa.so libifcore.so.5 libipgo.a libunwind.so

libcxa.so.5 libifcore_pic.a libipgo_pic.a libunwind.so.5

When I execute ldd on the executable (tobin) created, I get:

% ldd tobin

libm.so.6 => /lib/tls/libm.so.6 (0x00b5c000)

libcxa.so.5 => /app/intel/intel_fc_91/lib/libcxa.so.5 (0x55014000)

libunwind.so.5 => /app/intel/intel_fc_91/lib/libunwind.so.5 (0x55039000)

libc.so.6 => /lib/tls/libc.so.6 (0x00a25000)

/lib/ld-linux.so.2 (0x00a0b000)

Can anyone help? I'm stumped. Thanks.

0 Kudos
tgederberg
Beginner
1,731 Views
Well, the problem has been fixed. We are using SCons to do the build rather than make and for some reason SCons was igoring the LD_LIBRARY_PATH. The sys admin just added the Intel library to the system path and now everything works fine. Not sure why SCons was ignoring the LD_LIBRARY_PATH setting though.
0 Kudos
Reply