configure - How to link to a specific version of the standard library (with gcc) -
I have installed GCC 3.4 in / OPT / gcc3.4, and I'm using it to compile legacy code I am inconsistent with GCC 4. It means C (++) are older versions of standard libraries, binutils, and utility libraries.
This works fine for some libraries, but libtiff fails compiling because it raises / system library in / usr / lib (see output below) it is an autotools / configurable problem , But I'm not sure I can not find any configured switches or environment variables, and I do not want to modify my system /usr/lib/libc.so
How to ensure that it ignores / opt / gcc-3.4.4 / lib from the standard library, and / lib and / usr / lib completely?
Output of the output:
libtool: link: g ++ -share-nostedlib / urr / lib / critti.o / opti / gcc -3.4. 3 / LBB / GCC / I686-PC-LLDS-GNU / 3.4.3 / CRBBNSO. LBS / TIFIstreamOWL, --Volley-archive./port/.libs/libport.a-Wl-no-whole-archive -Wl, -rpath-wl, / home /jason/d0src34/prereq/ Tiff-3.9.4 / libtiff / .libs -Wl, -rpath -wl, / opt / gcc-3.4.3 / lib -wl, -rpath -wl, / home / jason / d0src34 / prereq / usr / lib -wl , -rpath -wl, / opt/gcc-3.4.3/ Lib./libtiff/.libs/libtiff.so -L / usr / lib /usr/lib/libjpeg.so -lz -L / opt / gcc-3.4 .3 / lib / gcc / i686-pc-linux-gnu / 3.4.3 -L / opt / gcc-3.4.3 / lib / gcc / i686-pc-linux-gnu / 3.4 .3 /... .. ../../opt/gcc-3.4.3/lib/libstdc++.so-l / home / jason / download / gcc-3.4.3 / build / i686-pc-linux-gnu / Libstdc ++ - v3 / src-L / home / json / download / gcc-3.4.3 / build / i686-pc-linux-gnu / libstdc ++ - v3 / src / .libs -l / home / jason / Downlo D / gcc-3.4.3 / build / gcc -lm -lc -lgcc_s / opt /gcc-3.4.3/lib/gcc/i686-pc-linux-gnu/3.4.3/crtendS.o/usr/lib/ Crtn.o-Wl, -Sonami -Wl, libtiffxx.so.3 -o Libs / libtiffxx.so.3.9.4
/ home / jason / d0src34 / prereq / usr / bin / ld: < Strong> /usr/lib/libc.so: The file format is not recognized; Treatment as a Linker script
/home/jason/d0src34/prereq/usr/bin/ld:/usr/lib/libc.so: parse error
I have got the answer to your question (hashis):
I used Binutils 2.15 Because the latter versions have an incompatibility with GCC 3.4. In the recent editions, the format of /usr/lib/libc.so has changed, and old duplicates can not parse it.
I have temporarily commented on the last line (with "Group"), and compiled my code:
/ * Use the GNU Lead Script Shared Library , But some functions are only in the static library, so try another. * / OUTPUT_FORMAT (LF32-I-386) / * Group (/lib/libc.so.6/usr/lib/libc_nonshared.a AS_NEEDED (/lib/ld-linux.so.2)) * /
However, I'm not really satisfied because I can hardly tell other people who want to use code to edit their system files. Also, I'm not sure I have linked it to the correct Gribbak version, because the system / usr / lib is still in the search path, so I can not definitly tell whether binary will work on other systems.
Comments
Post a Comment