-
Bug
-
Resolution: Fixed
-
P4
-
9
-
None
-
b135
-
linux
Reported by Maurizio on build-dev:
I've encountered this error when running jtreg tests from make using the following command line
make test JT_HOME=<path to latest jtreg> TEST=jdk_util
* For target support_test_hotspot_jtreg_native_support_exeinvoke_BUILD_TEST_invoke_link:
/w/lt/9/dev/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/support/exeinvoke/exeinvoke.o: In function `main':
/w/lt/9/dev/hotspot/make/test/../../test/runtime/StackGuardPages/exeinvoke.c:253: undefined reference to `JNI_CreateJavaVM'
/w/lt/9/dev/hotspot/make/test/../../test/runtime/StackGuardPages/exeinvoke.c:264: undefined reference to `pthread_create'
/w/lt/9/dev/hotspot/make/test/../../test/runtime/StackGuardPages/exeinvoke.c:265: undefined reference to `pthread_join'
/w/lt/9/dev/hotspot/make/test/../../test/runtime/StackGuardPages/exeinvoke.c:277: undefined reference to `pthread_create'
/w/lt/9/dev/hotspot/make/test/../../test/runtime/StackGuardPages/exeinvoke.c:278: undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
=== End of repeated output ===
This is caused by having the "-ljvm -lpthread" linker options in LDFLAGS instead of LIBS for this native compilation configuration.
I've encountered this error when running jtreg tests from make using the following command line
make test JT_HOME=<path to latest jtreg> TEST=jdk_util
* For target support_test_hotspot_jtreg_native_support_exeinvoke_BUILD_TEST_invoke_link:
/w/lt/9/dev/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/support/exeinvoke/exeinvoke.o: In function `main':
/w/lt/9/dev/hotspot/make/test/../../test/runtime/StackGuardPages/exeinvoke.c:253: undefined reference to `JNI_CreateJavaVM'
/w/lt/9/dev/hotspot/make/test/../../test/runtime/StackGuardPages/exeinvoke.c:264: undefined reference to `pthread_create'
/w/lt/9/dev/hotspot/make/test/../../test/runtime/StackGuardPages/exeinvoke.c:265: undefined reference to `pthread_join'
/w/lt/9/dev/hotspot/make/test/../../test/runtime/StackGuardPages/exeinvoke.c:277: undefined reference to `pthread_create'
/w/lt/9/dev/hotspot/make/test/../../test/runtime/StackGuardPages/exeinvoke.c:278: undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
=== End of repeated output ===
This is caused by having the "-ljvm -lpthread" linker options in LDFLAGS instead of LIBS for this native compilation configuration.
- relates to
-
JDK-8169261 Fix for JDK-8067744 creates build failures with some versions of gcc and/or linux
-
- Resolved
-