On 22-12-18 23:21, David Haller wrote:
Hello,
On Sat, 22 Dec 2018, Frans de Boer wrote:
While trying to compile gcc-8.2.0 for a i686 machine using a x86_64 host machine I keep on stumbling at the next error: [..] gcc -o fixincl fixincl.o fixtests.o fixfixes.o server.o procopen.o fixlib.o fixopts.o ../libiberty/libiberty.a /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: ../libiberty/libiberty.a: error adding symbols: archive has no index; run ranlib to add one collect2: error: ld returned 1 exit status
I have set CC, AR, LD, AS etc to the previously generated binaries. Still I see that ld is being searched on the host instead of using the intermediate binaries. The search path directs the searches also first to the intermediate binaries. Because everything else goes well, I almost must assume that there is a problem with a Makefile. I suspect no, but that you need (as usual actually) rather up-to-date binutils.
And, /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld is, if I'm not mistaken in resolving the '../', actually /usr/x86_64-suse-linux/bin/ld which should be your host-ld, i.e. too old for the new gcc.
Solutions:
a) update binutils
b) use a chroot
c) use OBS etc.
PS: current kernels usually also need some recent-ish binutils...
HTH, -dnh
Nope everything is up-to-date. Further investigation shows that during the build phase suddenly "x86_64-suse-linux-gnu-ld" appears where is was explicitly indicated that this must be "i686-pc-linux-gnu-ld" and was also detected and used before. Also, chroot is not yet possible because I just start building the tool chain. I can chroot things for the final build stage only after this is build. I also used gcc from git to see if it was resolved, to no avail. I continue my investigation and hope to find the culprit, being gcc or me ;) -- Frans. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org