When I want to make gcc 4.1.2 (ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.1.2/gcc-4.1.2.tar.bz2) on my ubuntu 12.04 (x86_64). The current active gcc is 4.6.2. I did:
./configure
then
make
However I get this error
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: ld returned 1 exit status
Searching the web it seems that there is a problem with the location of crti
. These files are available on the system
# find /usr/ -name crti*
/usr/lib32/crti.o
/usr/lib/x86_64-linux-gnu/crti.o
/usr/lib/debug/usr/lib/x86_64-linux-gnu/crti.o
Also the libc6 devel package is installed
# dpkg -l | grep libc6
ii libc6 2.15-0ubuntu10.3 Embedded GNU C Library: Shared libraries
ii libc6-dbg 2.15-0ubuntu10.3 Embedded GNU C Library: detached debugging symbols
ii libc6-dev 2.15-0ubuntu10.3 Embedded GNU C Library: Development Libraries and Header Files
ii libc6-dev-i386 2.15-0ubuntu10.3 Embedded GNU C Library: 32-bit development libraries for AMD64
ii libc6-i386 2.15-0ubuntu10.3 Embedded GNU C Library: 32-bit shared libraries for AMD64
ii libc6-pic 2.15-0ubuntu10.3 Embedded GNU C Library: PIC archive library
How can I fix that?
UPDATE:
After adding these
LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LIBRARY_PATH
export LIBRARY_PATH
That problem is solved. However now I get
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.a when searching for -lc
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/x86_64-linux-gnu/crti.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/x86_64-linux- gnu/crtn.o' is incompatible with i386 output
collect2: ld returned 1 exit status
makeinfo
not being present, which is on my system. Can't get to your error with these steps.