strange error when running jtreg tests
Andrew Hughes
gnu.andrew at redhat.com
Wed Aug 17 22:14:21 UTC 2016
----- Original Message -----
> Hi Erik,
>
> On 17-08-2016 12:23, Erik Joelsson wrote:
> > I'm sorry, you also need this patch, which I for some reason I can't
> > remember had in my local forest.
> >
> > diff -r a24702d4d5ab make/common/TestFilesCompilation.gmk
> > --- a/make/common/TestFilesCompilation.gmk
> > +++ b/make/common/TestFilesCompilation.gmk
> > @@ -86,6 +86,7 @@
> > LANG := C, \
> > CFLAGS := $$($1_CFLAGS) $$($1_CFLAGS_$$($1_PREFIX)$$(name)), \
> > LDFLAGS := $$($1_LDFLAGS) $$($1_LDFLAGS_$$($1_PREFIX)$$(name)), \
> > + LIBS := $$($1_LIBS_$$($1_PREFIX)$$(name)), \
> > OPTIMIZATION := LOW, \
> > )) \
> > $$(eval $1 += $$(BUILD_TEST_$$(name)) ) \
> >
> > /Erik
> >
> > On 2016-08-17 16:56, Gustavo Romero wrote:
> >> Hi Erik,
> >>
> >> I applied your change:
> >>
> >> diff -r 397565766eb4 make/test/JtregNative.gmk
> >> --- a/make/test/JtregNative.gmk Thu Aug 11 16:22:08 2016 -0700
> >> +++ b/make/test/JtregNative.gmk Wed Aug 17 09:54:20 2016 -0500
> >> @@ -79,7 +79,7 @@
> >> ifeq ($(OPENJDK_TARGET_OS), linux)
> >> BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rw := -z noexecstack
> >> BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rwx := -z execstack
> >> - BUILD_HOTSPOT_JTREG_EXECUTABLES_LDFLAGS_exeinvoke := -ljvm -lpthread
> >> + BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeinvoke := -ljvm -lpthread
> >> BUILD_TEST_invoke_exeinvoke.c_OPTIMIZATION := NONE
> >> endif
> >>
> >>
> >> but it seems the new param is not passed to the linker now. So it failed.
> >>
>
> I confirm that your patch fixes the issue on Ubuntu 16.04 PPC64 && x64,
> applying
> cleanly to:
>
> http://hg.openjdk.java.net/jdk9/hs-comp, 37de4195dd18+ tip:
>
> diff -r 37de4195dd18 make/common/TestFilesCompilation.gmk
> --- a/make/common/TestFilesCompilation.gmk Fri Aug 05 09:50:23 2016
> -0700
> +++ b/make/common/TestFilesCompilation.gmk Wed Aug 17 13:54:43 2016
> -0400
> @@ -86,6 +86,7 @@
> LANG := C, \
> CFLAGS := $$($1_CFLAGS) $$($1_CFLAGS_$$($1_PREFIX)$$(name)), \
> LDFLAGS := $$($1_LDFLAGS) $$($1_LDFLAGS_$$($1_PREFIX)$$(name)), \
> + LIBS := $$($1_LIBS_$$($1_PREFIX)$$(name)), \
> OPTIMIZATION := LOW, \
> )) \
> $$(eval $1 += $$(BUILD_TEST_$$(name)) ) \
>
>
> http://hg.openjdk.java.net/jdk9/hs-comp/hotspot, 031f53ef620a+ tip:
>
> diff -r 031f53ef620a make/test/JtregNative.gmk
> --- a/make/test/JtregNative.gmk Wed Aug 17 06:23:04 2016 +0000
> +++ b/make/test/JtregNative.gmk Wed Aug 17 13:54:58 2016 -0400
> @@ -79,7 +79,7 @@
> ifeq ($(OPENJDK_TARGET_OS), linux)
> BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rw := -z noexecstack
> BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rwx := -z execstack
> - BUILD_HOTSPOT_JTREG_EXECUTABLES_LDFLAGS_exeinvoke := -ljvm -lpthread
> + BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeinvoke := -ljvm -lpthread
> BUILD_TEST_invoke_exeinvoke.c_OPTIMIZATION := NONE
> endif
>
> Thank you very much for having a look.
>
> Kind regards,
> Gustavo
>
>
>
This seems to be a problem that keeps reoccurring in the OpenJDK
build on Debian/Ubuntu systems over several years e.g.
http://icedtea.classpath.org/hg/icedtea6/raw-file/tip/patches/linker-libs-order.patch (OpenJDK 6)
http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1413 (OpenJDK 8)
I guess they have a default linker configuration which strictly
wants the libraries at the end of the command. Having them in
a LDFLAGS variable rather than LIBS is something we should try and
flag earlier, so we don't get build breakage again on these
systems.
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
More information about the build-dev
mailing list