chromebrew
chromebrew copied to clipboard
[binutils] i686 build causes executables to produce segmentation faults
Although the binary package builds fine without tests, all executables will segfault. Errors from make check
below:
gcctestdir/collect-ld: error: two_file_test_1.o: relocation R_386_GOTOFF against preemptible symbol _Z3t12v cannot be used when making a shared object
gcctestdir/collect-ld: error: two_file_test_1.o: relocation R_386_GOTOFF against preemptible symbol p6 cannot be used when making a shared object
gcctestdir/collect-ld: error: two_file_test_1.o: relocation R_386_GOTOFF against preemptible symbol p7 cannot be used when making a shared object
gcctestdir/collect-ld: error: two_file_test_1.o: relocation R_386_GOTOFF against preemptible symbol p8 cannot be used when making a shared object
gcctestdir/collect-ld: error: two_file_test_1.o: relocation R_386_GOTOFF against preemptible symbol p9 cannot be used when making a shared object
gcctestdir/collect-ld: error: two_file_test_1.o: relocation R_386_GOTOFF against preemptible symbol pfn cannot be used when making a shared object
gcctestdir/collect-ld: error: two_file_test_1.o: relocation R_386_GOTOFF against preemptible symbol _Z4f11av cannot be used when making a shared object
gcctestdir/collect-ld: error: two_file_test_1.o: relocation R_386_GOTOFF against preemptible symbol _Z4f13iv cannot be used when making a shared object
collect2: error: ld returned 1 exit status
make[5]: *** [Makefile:8189: two_file_shared_1_nonpic.so] Error 1
make[5]: Leaving directory '/usr/local/tmp/crew/binutils.20210725235328.dir/binutils-2.37/build/gold/testsuite'
make[4]: *** [Makefile:7793: check-am] Error 2
make[4]: Leaving directory '/usr/local/tmp/crew/binutils.20210725235328.dir/binutils-2.37/build/gold/testsuite'
make[3]: *** [Makefile:7797: check] Error 2
make[3]: Leaving directory '/usr/local/tmp/crew/binutils.20210725235328.dir/binutils-2.37/build/gold/testsuite'
make[2]: *** [Makefile:1157: check-recursive] Error 1
make[2]: Leaving directory '/usr/local/tmp/crew/binutils.20210725235328.dir/binutils-2.37/build/gold'
make[1]: *** [Makefile:6224: check-gold] Error 2
make[1]: Leaving directory '/usr/local/tmp/crew/binutils.20210725235328.dir/binutils-2.37/build'
make: *** [Makefile:2288: do-check] Error 2
binutils failed to build: `make check` exited with 2gcctestdir/collect-ld: error: two_file_test_1.o: relocation R_386_GOTOFF against preemptible symbol _Z3t12v cannot be used when making a shared object
gcctestdir/collect-ld: error: two_file_test_1.o: relocation R_386_GOTOFF against preemptible symbol p6 cannot be used when making a shared object
gcctestdir/collect-ld: error: two_file_test_1.o: relocation R_386_GOTOFF against preemptible symbol p7 cannot be used when making a shared object
gcctestdir/collect-ld: error: two_file_test_1.o: relocation R_386_GOTOFF against preemptible symbol p8 cannot be used when making a shared object
gcctestdir/collect-ld: error: two_file_test_1.o: relocation R_386_GOTOFF against preemptible symbol p9 cannot be used when making a shared object
gcctestdir/collect-ld: error: two_file_test_1.o: relocation R_386_GOTOFF against preemptible symbol pfn cannot be used when making a shared object
gcctestdir/collect-ld: error: two_file_test_1.o: relocation R_386_GOTOFF against preemptible symbol _Z4f11av cannot be used when making a shared object
gcctestdir/collect-ld: error: two_file_test_1.o: relocation R_386_GOTOFF against preemptible symbol _Z4f13iv cannot be used when making a shared object
collect2: error: ld returned 1 exit status
make[5]: *** [Makefile:8189: two_file_shared_1_nonpic.so] Error 1
make[5]: Leaving directory '/usr/local/tmp/crew/binutils.20210725235328.dir/binutils-2.37/build/gold/testsuite'
make[4]: *** [Makefile:7793: check-am] Error 2
make[4]: Leaving directory '/usr/local/tmp/crew/binutils.20210725235328.dir/binutils-2.37/build/gold/testsuite'
make[3]: *** [Makefile:7797: check] Error 2
make[3]: Leaving directory '/usr/local/tmp/crew/binutils.20210725235328.dir/binutils-2.37/build/gold/testsuite'
make[2]: *** [Makefile:1157: check-recursive] Error 1
make[2]: Leaving directory '/usr/local/tmp/crew/binutils.20210725235328.dir/binutils-2.37/build/gold'
make[1]: *** [Makefile:6224: check-gold] Error 2
make[1]: Leaving directory '/usr/local/tmp/crew/binutils.20210725235328.dir/binutils-2.37/build'
make: *** [Makefile:2288: do-check] Error 2
binutils failed to build: `make check` exited with 2
Could this be a gold linker issue?
https://issues.dlang.org/show_bug.cgi?id=18798
Same errors after switching the default back.
collect-ld
means that the code referenced in an included header file cannot be found in a dynamic library in the LD_LIBRARY_PATH. It's not a linker issue. lld
has a really nice debugging output for the collect-ld
, so you could try compiling with -fuse-ld=lld
(making sure llvm is installed) instead of gold to see a good debug log. Don't do this for production as lld makes slower binaries.
I'm honestly not sure if binutils can be built with llvm... it's very gcc specific.
Binutils no longer causes issues on i686.