Я пытался собрать пакет hsdis в openjdk10, чтобы я мог использовать -XX: + PrintAssembly JVM и проверить сборку скомпилированного кода. Я скачал binutils-2.31.1, распаковал и переместил его в openjdk / hotspot / src / share / tools / hsdis / build / binutils, затем запустил make в каталоге. (Подписан https://www.chrisnewland.com/building-hsdis-on-linux-amd64-on-debian-369)
Я получил ошибку:
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/yingsu/openjdk/hotspot/src/share/tools/hsdis/build/linux-i586':
configure: error: C compiler cannot create executables
See `config.log' for more details
В config.log есть следующая ошибка:
configure:4304: $? = 0
configure:4293: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)
configure:4304: $? = 0
configure:4293: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:4304: $? = 4
configure:4293: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:4304: $? = 4
configure:4324: checking whether the C compiler works
configure:4346: gcc -m32 -fPIC -O conftest.c >&5
/bin/ld: cannot find crt1.o: No such file or directory
/bin/ld: cannot find crti.o: No such file or directory
/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/libgcc_s.so when searching for -lgcc_s
/bin/ld: cannot find -lgcc_s
/bin/ld: cannot find -lc
/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/libgcc_s.so when searching for -lgcc_s
/bin/ld: cannot find -lgcc_s
/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
configure:4350: $? = 1
configure:4388: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
Почему он вызывает некоторые неподдерживаемые опции -V и -qversion? И я не смог найти conftest.c в каталоге hsdis вообще.
Кто-нибудь знает, каков правильный рабочий процесс для создания общей библиотеки hsdis?