This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: building fortran


Vadim Gutnik wrote:
ldd /impinj/uns/amd64_2.4/libexec/gcc/x86_64-unknown-linux-gnu/4.1.1/f951
libgmp.so.3 => /usr/lib64/libgmp.so.3 (0x0000002a95682000)
libc.so.6 => /lib64/libc.so.6 (0x0000002a957ba000)
/lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x0000002a95556000)
ls -l /impinj/uns/amd64_2.4/lib/*gmp*
-rw-r--r-- 1 gutnik users 777376 Aug 21 17:17 /impinj/uns/amd64_2.4/lib/libgmp.a
-rwxr-xr-x 1 gutnik users 794 Aug 21 17:17 /impinj/uns/amd64_2.4/lib/libgmp.la*
lrwxrwxrwx 1 gutnik users 15 Aug 21 17:17 /impinj/uns/amd64_2.4/lib/libgmp.so -> libgmp.so.3.4.1*
lrwxrwxrwx 1 gutnik users 15 Aug 21 17:17 /impinj/uns/amd64_2.4/lib/libgmp.so.3 -> libgmp.so.3.4.1*
-rwxr-xr-x 1 gutnik users 294146 Aug 21 17:17 /impinj/uns/amd64_2.4/lib/libgmp.so.3.4.1*
As I understand it, gmp does build a shared library. Further, things
work with LD_LIBRARY_PATH set correctly, so I don't think the problem
is the libraries that get built, it's something about the runtime linking.
Please look those executables, which should use these shared libs in the
'/impinj/uns/amd64_2.4/lib/', with the 'objdump -p' command...  Your use
of the '-rpath' option should have added a RPATH entry seen  in the output!
Like:

------------ clip -------------
kai@Dell:/data1/home/kai-old/test/tprintf> gcc-redhat7.3-3.2 -Wl,-rpath,/opt/host-RedHat7.3/lib -Os -o tst_rhl7.3.x tprintf.c
kai@Dell:/data1/home/kai-old/test/tprintf> objdump -p tst_rhl7.3.x


tst_rhl7.3.x:     file format elf32-i386
<snip>
Dynamic Section:
 NEEDED      libc.so.6
 RPATH       /opt/host-RedHat7.3/lib
<snip>
kai@Dell:/data1/home/kai-old/test/tprintf> ldd tst_rhl7.3.x
       linux-gate.so.1 =>  (0xffffe000)
       libc.so.6 => /opt/host-RedHat7.3/lib/libc.so.6 (0x40018000)
       /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
------------ clip -------------

What will be seen there, will be searched before the standards paths. This would
be the simple check for the sanity of the produced executables. Producing them
this way to use "something else than the default runtime" can then be totally
insane, like in the previous case :


------------ clip -------------
kai@Dell:/data1/home/kai-old/test/tprintf> ./tst_rhl7.3.x
./tst_rhl7.3.x: relocation error: /opt/host-RedHat7.3/lib/libc.so.6: symbol _dl_starting_up, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference
------------ clip -------------


But in your case the sanity should be just vice versa...

What you will see, can tell what went wrong!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]