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 -- That young girl is one of the least benightedly unintelligent life forms it has been my profound lack of pleasure not to be able to avoid meeting. - Douglas Adams "Life, the Universe and Everything" -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org