Compiling radare2, version 2.6.0 on Archlinux32. binutils version is 2.30.0.20180526. gcc (GCC) 8.1.1 20180531 Also tried HEAD: GNU ld (GNU Binutils) 2.30.52.20180609, same effect. /usr/bin/ld: internal error /build/binutils/src/binutils-2.30/ld/ldlang.c 6635 the calls in detail: make[3]: Entering directory '/root/radare2/src/radare2-2.6.0/libr' gcc -fvisibility=hidden -fPIC -lz -lzip -march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -MD -fPIC -g -Wall -D__UNIX__=1 -march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -shared -dynamiclib -o libr.so \ .libr/*.o \ ../shlr/gdb/lib/libgdbr.a ../shlr/java/libr_java.a \ ../shlr/libr_shlr.a ../shlr/ar/libr_ar.a ../shlr/grub/libgrubfs.a ../shlr/windbg/libr_windbg.a ../shlr/qnx/lib/libqnxr.a ../shlr/bochs/lib/libbochs.a -lcapstone /usr/bin/ld: internal error /build/binutils/src/binutils-2.30/ld/ldlang.c 6635 collect2: error: ld returned 1 exit status gcc -v -fvisibility=hidden -fPIC -lz -lzip -march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -MD -fPIC -g -Wall -D__UNIX__=1 -march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -shared -dynamiclib -o libr.so .libr/*.o ../shlr/gdb/lib/libgdbr.a ../shlr/java/libr_java.a ../shlr/libr_shlr.a ../shlr/ar/libr_ar.a ../shlr/grub/libgrubfs.a ../shlr/windbg/libr_windbg.a ../shlr/qnx/lib/libqnxr.a ../shlr/bochs/lib/libbochs.a -lcapstone Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-linux-gnu/8.1.1/lto-wrapper Target: i686-pc-linux-gnu Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp Thread model: posix gcc version 8.1.1 20180531 (GCC) COMPILER_PATH=/usr/lib/gcc/i686-pc-linux-gnu/8.1.1/:/usr/lib/gcc/i686-pc-linux-gnu/8.1.1/:/usr/lib/gcc/i686-pc-linux-gnu/:/usr/lib/gcc/i686-pc-linux-gnu/8.1.1/:/usr/lib/gcc/i686-pc-linux-gnu/ LIBRARY_PATH=/usr/lib/gcc/i686-pc-linux-gnu/8.1.1/:/usr/lib/gcc/i686-pc-linux-gnu/8.1.1/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-fvisibility=hidden' '-march=i686' '-mtune=generic' '-O2' '-pipe' '-fstack-protector-strong' '-MD' '-fPIC' '-g' '-Wall' '-D' '__UNIX__=1' '-march=i686' '-mtune=generic' '-O2' '-pipe' '-fstack-protector-strong' '-fno-plt' '-shared' '-dynamiclib' '-o' 'libr.so' /usr/lib/gcc/i686-pc-linux-gnu/8.1.1/collect2 -plugin /usr/lib/gcc/i686-pc-linux-gnu/8.1.1/liblto_plugin.so -plugin-opt=/usr/lib/gcc/i686-pc-linux-gnu/8.1.1/lto-wrapper -plugin-opt=-fresolution=/tmp/cc6jR8XY.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr --hash-style=gnu -m elf_i386 -shared -o libr.so /usr/lib/gcc/i686-pc-linux-gnu/8.1.1/../../../crti.o /usr/lib/gcc/i686-pc-linux-gnu/8.1.1/crtbeginS.o -L/usr/lib/gcc/i686-pc-linux-gnu/8.1.1 -L/usr/lib/gcc/i686-pc-linux-gnu/8.1.1/../../.. -lz -lzip -O1 --sort-common --as-needed -z relro -z now -O1 --sort-common --as-needed -z relro -z now .libr/libr_anal.o .libr/libr_asm.o .libr/libr_bin.o .libr/libr_bp.o .libr/libr_config.o .libr/libr_cons.o .libr/libr_core.o .libr/libr_crypto.o .libr/libr_debug.o .libr/libr_egg.o .libr/libr_flag.o .libr/libr_fs.o .libr/libr_hash.o .libr/libr_io.o .libr/libr_lang.o .libr/libr_magic.o .libr/libr_parse.o .libr/libr_reg.o .libr/libr_search.o .libr/libr_shlr.o .libr/libr_socket.o .libr/libr_syscall.o .libr/libr_util.o ../shlr/gdb/lib/libgdbr.a ../shlr/java/libr_java.a ../shlr/libr_shlr.a ../shlr/ar/libr_ar.a ../shlr/grub/libgrubfs.a ../shlr/windbg/libr_windbg.a ../shlr/qnx/lib/libqnxr.a ../shlr/bochs/lib/libbochs.a -lcapstone -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i686-pc-linux-gnu/8.1.1/crtendS.o /usr/lib/gcc/i686-pc-linux-gnu/8.1.1/../../../crtn.o /usr/bin/ld: internal error /build/binutils/src/binutils-2.30/ld/ldlang.c 6635 collect2: error: ld returned 1 exit status
Hi Andreas, Can you provide a way for us to reproduce this problem so that we can investigate further ? Also - do you know if changing or removing some the linker command line options makes the problem go away ? For example if you omit the --sort-common options or the -shared-dynamiclib option, does this make the link work ? Cheers Nick
Hi Nick, we have a vagrant image file of a archlinux32 virtual machine. > vagrant init archlinux32/archlinux32 Unfortunately, there is currently some manual interaction necessary to set up the real build environment: inside the vm: enable (=uncomment) [testing] [community-testing] [staging] and [community-staging] repositories inside /etc/pacman.conf > pacman -Syu base-devel asp and then you can check out and build the package with > asp32 export radare2 > cd radare2 > makepkg -Ars
Could it be the issue similar to https://sourceware.org/bugzilla/show_bug.cgi?id=23534#c7 ? Where libbfd.so changed for some reason and 'ld' binary was not rebuilt against it.
It could be. However, I cannot test it, because in the meantime, our automated build system successfully built two versions of radare2 - so I'd say, this issue can be closed.
Reopen if needed...