cross compile OpenJDK-9+158 minimal variant failed when link libjvm.so
Zhu Yong
zhuyong.me at gmail.com
Tue Feb 28 03:12:08 UTC 2017
Dear All,
I am testing cross compile OpenJDK-9+158 for our embedded system using
buildroot, I can build server and client variants successfully, but the
output compact profile file size is too big, then I tried to build minimal
variant, failed when linking libjvm.so.
I
checked build/linux-arm-normal-minimal-release/hotspot/variant-minimal/libjvm/objs/_BUILD_LIBJVM_objectfilenames.txt,
jvmtiEnvBase.o and jvmtiEnvThreadState.o are not listed in the file (which
is required from the error message below).
=== Output from failing command(s) repeated here ===
* For target hotspot_variant-minimal_libjvm_objs_BUILD_LIBJVM_link:
/tmp/cc27HS5M.ltrans0.ltrans.o: In function `VM_GetStackTrace::doit()
[clone .local.640]':
cc27HS5M.ltrans0.o:(.text+0xce5e): undefined reference to
`JvmtiEnvBase::get_stack_trace(JavaThread*, int, int, _jvmtiFrameInfo*,
int*)'
/tmp/cc27HS5M.ltrans0.ltrans.o: In function
`VM_GetCurrentContendedMonitor::doit() [clone .local.639]':
cc27HS5M.ltrans0.o:(.text+0xcec2): undefined reference to
`JvmtiEnvBase::get_current_contended_monitor(JavaThread*, JavaThread*,
_jobject**)'
/tmp/cc27HS5M.ltrans0.ltrans.o: In function `VM_GetOwnedMonitorInfo::doit()
[clone .local.638]':
cc27HS5M.ltrans0.o:(.text+0xcf26): undefined reference to
`JvmtiEnvBase::get_owned_monitors(JavaThread*, JavaThread*,
GrowableArray<_jvmtiMonitorStackDepthInfo*>*)'
/tmp/cc27HS5M.ltrans0.ltrans.o: In function `VM_GetFrameCount::doit()
[clone .local.637]':
cc27HS5M.ltrans0.o:(.text+0xcf8a): undefined reference to
`JvmtiEnvBase::get_frame_count(JvmtiThreadState*, int*)'
/tmp/cc27HS5M.ltrans0.ltrans.o: In function `VM_SetFramePop::doit() [clone
.local.636]':
cc27HS5M.ltrans0.o:(.text+0xcfea): undefined reference to
`JvmtiThreadState::count_frames()'
cc27HS5M.ltrans0.o:(.text+0xd030): undefined reference to
`JvmtiEnvThreadState::set_frame_pop(int)'
/tmp/cc27HS5M.ltrans0.ltrans.o: In function `VM_GetFrameLocation::doit()
[clone .local.641]':
... (rest of output omitted)
My configuration:
--with-jdk-variant=normal \
--with-jvm-variants=minimal \
--with-debug-level=release \
--disable-warnings-as-errors \
--disable-hotspot-gtest \
--with-abi-profile=arm-vfp-sflt \
--openjdk-target=$(GNU_TARGET_NAME) \
--with-sys-root=$(STAGING_DIR) \
--with-tools-dir=$(HOST_DIR) \
--with-freetype-include=$(STAGING_DIR)/usr/include \
--with-freetype-lib=$(STAGING_DIR)/usr/lib \
--with-freetype=$(STAGING_DIR)/usr/ \
--with-alsa-include=$(STAGING_DIR)/usr/include \
--with-alsa-lib=$(STAGING_DIR)/usr/lib \
--with-alsa=$(STAGING_DIR)/usr/ \
--with-cups=$(STAGING_DIR)/usr/ \
--with-x=$(STAGING_DIR)/usr/include \
--with-extra-ldflags=--sysroot=$(STAGING_DIR) \
--enable-headless-only \
--disable-freetype-bundling \
--enable-unlimited-crypto \
--with-boot-jdk=/opt/java/jdk1.8.0_102
More information about the jdk9-dev
mailing list