Link error building jdk9/jdk9

Simon Nash simon at cjnash.com
Wed Dec 21 23:22:42 UTC 2016


I am trying to build jdk9/jdk9 using the configuration that I have been using to
build jdk9-arm3264.  Here is my configure command:

bash ./configure --with-jdk-variant=normal --with-jvm-variants=server --with-abi-profile=arm-vfp-hflt --with-conf-name=hardfp \
--with-debug-level=release --disable-warnings-as-errors --openjdk-target=arm-linux-gnueabihf \
--with-tools-dir=/sd1/linaro/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/bin \
--with-sys-root=/sd1/linaro/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/arm-linux-gnueabihf/libc \
--with-cups=/sd1/armhf/cups --with-freetype=/sd1/armhf/freetype2 --with-alsa=/sd1/armhf/alsa \
--x-includes=/sd1/armhf/X11/include --x-libraries=/sd1/armhf/X11/lib --disable-freetype-bundling --with-boot-jdk=/sd1/java/jdk1.8.0_25 \
CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ CPP=arm-linux-gnueabihf-cpp CXXCPP=arm-linux-gnueabihf-cpp \
LIBS="-Wl,-rpath-link /sd1/armhf/freetype2/lib -Wl,-rpath-link /sd1/armhf/X11/lib"

The cross-compile has worked OK but there is a a link error building the native libjvm.so
in buildjdk with no error message to say what is wrong.  Here is the link command and the
output I am getting:

nash at angels:/sd1/jdk9$ /usr/bin/g++ -Wl,-V -Wl,-z,defs -Wl,-z,noexecstack -Wl,-O1 -Wl,-z,relro -static-libstdc++ -static-libgcc -shared 
-Wl,-version-script=/sd1/jdk9/build/hardfp/buildjdk/hotspot/variant-server/libjvm/mapfile -Wl,-soname=libjvm.so -o 
/sd1/jdk9/build/hardfp/buildjdk/support/modules_libs/java.base/server/libjvm.so 
@/sd1/jdk9/build/hardfp/buildjdk/hotspot/variant-server/libjvm/objs/_BUILD_LIBJVM_objectfilenames.txt -lm -ldl -lpthread
collect2: error: ld returned 1 exit status

Here is my native g++ version:

nash at angels:/sd1/jdk9$ g++ --version
g++ (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4

Could there be some incompatibility or bug in this fairly old level of g++?

Simon


More information about the aarch32-port-dev mailing list