Re: strange error when running jtreg tests

2016-08-23 Thread Tiago Daitx
Gustavo brought this issue to my attention (thanks!)

The cause is that Debian/Ubuntu have been setting -Wl,--as-needed for
a long while [1], thus libraries must appear *after* objects referring
to the library.

Also, make does state that libraries shouldn't be added to LDFLAGS [2].

Regards,
Tiago

[1] https://wiki.ubuntu.com/ToolChain/CompilerFlags#A-Wl.2C--as-needed
[2] search for LDFLAGS @
https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html

On Thu, Aug 18, 2016 at 7:50 AM, David Holmes  wrote:
> Hi Erik,
>
> On 18/08/2016 6:11 PM, Erik Joelsson wrote:
>>
>> Thank you,
>>
>> Here is a request for review on that change.
>>
>> Webrev: http://cr.openjdk.java.net/~erikj/8164297/webrev.01/
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8164297
>
>
> Fix seems to work, as reported, but why do we have:
>
> BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_* := -ljvm ...
>
> yet:
>
> BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_* := -lc
>
> ? Shouldn't they both be _LIBS ?
>
> Thanks,
> David
>
>
>> I will push this to jdk9/hs when reviewed unless anyone thinks it
>> belongs better somewhere else.
>>
>> /Erik
>>
>> On 2016-08-17 19:56, Gustavo Romero wrote:
>>>
>>> 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 +
>>> +++ 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
>>>
>>>
>>
>



-- 
Tiago Stürmer Daitx
Software Engineer
tiago.da...@canonical.com

PGP Key: 4096R/F5B213BE (hkp://keyserver.ubuntu.com)
Fingerprint = 45D0 FE5A 8109 1E91 866E  8CA4 1931 8D5E F5B2 13BE


Re: strange error when running jtreg tests

2016-08-18 Thread David Holmes

Hi Erik,

On 18/08/2016 6:11 PM, Erik Joelsson wrote:

Thank you,

Here is a request for review on that change.

Webrev: http://cr.openjdk.java.net/~erikj/8164297/webrev.01/
Bug: https://bugs.openjdk.java.net/browse/JDK-8164297


Fix seems to work, as reported, but why do we have:

BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_* := -ljvm ...

yet:

BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_* := -lc

? Shouldn't they both be _LIBS ?

Thanks,
David


I will push this to jdk9/hs when reviewed unless anyone thinks it
belongs better somewhere else.

/Erik

On 2016-08-17 19:56, Gustavo Romero wrote:

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 +
+++ 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






Re: strange error when running jtreg tests

2016-08-18 Thread Erik Joelsson



On 2016-08-18 00:14, Andrew Hughes wrote:


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.
Indeed, and we created the LIBS flag for this very reason. This case 
just fell through the cracks. There was no need for LIBS at the time the 
JtregNative compilation was first introduced so the implementor likely 
forgot about it. The exeinvoke test is pretty new. I missed this when 
reviewing that change.


/Erik


Re: strange error when running jtreg tests

2016-08-17 Thread Andrew Hughes


- 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 +
> +++ 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




Re: strange error when running jtreg tests

2016-08-17 Thread Gustavo Romero
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 +
+++ 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




Re: strange error when running jtreg tests

2016-08-17 Thread Erik Joelsson
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.

No "pthread" nor "ljvm" in the link command:

/usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin 
/usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so 
-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper 
-plugin-opt=-fresolution=/tmp/ccAdCwgA.res
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s 
-plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc 
-plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr
-m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker 
/lib64/ld-linux-x86-64.so.2 -z relro -o
/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/bin/invoke
 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o 
/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o
-L/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/modules_libs/java.base/amd64
-L/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/modules_libs/java.base/amd64/server
 -L/usr/lib/gcc/x86_64-linux-gnu/5
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu 
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu 
-L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. --hash-style=both -z defs -O1 
--allow-shlib-undefined
/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/support/exeinvoke/exeinvoke.o
 -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed
-lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o 
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o

Regards,
Gustavo





On 17-08-2016 11:32, Erik Joelsson wrote:

I finally took a look at this and yes, there is a bug in the makefile. This 
line in hotspot/make/test/JtregNative.gmk:

BUILD_HOTSPOT_JTREG_EXECUTABLES_LDFLAGS_exeinvoke := -ljvm -lpthread

should be:

BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeinvoke := -ljvm -lpthread

Could someone who is able to repro try this?

/Erik

On 2016-08-17 16:15, Gustavo Romero wrote:

Hi David,

On 17-08-2016 00:38, David Holmes wrote:

On 16/08/2016 8:41 AM, Gustavo Romero wrote:

On Ubuntu 16.04 PPC64 LE replacing -lpthread by -pthread in
./hotspot/make/test/JtregNative.gmk:82 solves the issue on pthread_* symbols and
placing -ljvm (for instance) in front of ".../exeinvoke.o" solves the issue on
JNI_CreateJavaVM reference, however I'm really not sure what's the root cause.

I checked the link command being used (it is generated into a file when the 
test-image is built) and the -ljvm is already in front of the exeinvoke.o

/var/tmp/jib-daholme/install/jpg/infra/builddeps/devkit-linux_x64/gcc4.9.2-OEL6.4+1.0/devkit-linux_x64-gcc4.9.2-OEL6.4+1.0.tar.gz/bin/gcc
 -Wl,-z,defs -Wl,-O1 -Wl,--allow-shlib-undefined
-L/scratch/dh198349/jdk9-hs/build/linux-x64/support/modules_libs/java.base/amd64
 
-L/scratch/dh198349/jdk9-hs/build/linux-x64/support/modules_libs/java.base/amd64/server
 -ljvm -lpthread
--sysroot=/var/tmp/jib-daholme/install/jpg/infra/builddeps/devkit-linux_x64/gcc4.9.2-OEL6.4+1.0/devkit-linux_x64-gcc4.9.2-OEL6.4+1.0.tar.gz/x86_64-unknown-linux-gnu/sysroot
 -o
/scratch/dh198349/jdk9-hs/build/linux-x64/support/test/hotspot/jtreg/native/bin/invoke
 
/scratch/dh198349/jdk9-hs/build/linux-x64/support/test/hotspot/jtreg/native/support/exeinvoke/exeinvoke.o

Sorry, "in front of" was a misleading expression. I meant placed *after*
exeinvoke.o (reading from right to left the link command).

So on Ubuntu 16.04 x64 this fails (taken from the original build, the order is 

Re: strange error when running jtreg tests

2016-08-17 Thread Gustavo Romero
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.

No "pthread" nor "ljvm" in the link command:

/usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin 
/usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so 
-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper 
-plugin-opt=-fresolution=/tmp/ccAdCwgA.res
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s 
-plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc 
-plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr
-m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker 
/lib64/ld-linux-x86-64.so.2 -z relro -o
/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/bin/invoke
 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o 
/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o
-L/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/modules_libs/java.base/amd64
-L/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/modules_libs/java.base/amd64/server
 -L/usr/lib/gcc/x86_64-linux-gnu/5
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu 
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu 
-L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. --hash-style=both -z defs -O1 
--allow-shlib-undefined
/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/support/exeinvoke/exeinvoke.o
 -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed
-lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o 
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o

Regards,
Gustavo





On 17-08-2016 11:32, Erik Joelsson wrote:
> I finally took a look at this and yes, there is a bug in the makefile. This 
> line in hotspot/make/test/JtregNative.gmk:
> 
> BUILD_HOTSPOT_JTREG_EXECUTABLES_LDFLAGS_exeinvoke := -ljvm -lpthread
> 
> should be:
> 
> BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeinvoke := -ljvm -lpthread
> 
> Could someone who is able to repro try this?
> 
> /Erik
> 
> On 2016-08-17 16:15, Gustavo Romero wrote:
>> Hi David,
>>
>> On 17-08-2016 00:38, David Holmes wrote:
>>> On 16/08/2016 8:41 AM, Gustavo Romero wrote:
 On Ubuntu 16.04 PPC64 LE replacing -lpthread by -pthread in
 ./hotspot/make/test/JtregNative.gmk:82 solves the issue on pthread_* 
 symbols and
 placing -ljvm (for instance) in front of ".../exeinvoke.o" solves the 
 issue on
 JNI_CreateJavaVM reference, however I'm really not sure what's the root 
 cause.
>>> I checked the link command being used (it is generated into a file when the 
>>> test-image is built) and the -ljvm is already in front of the exeinvoke.o
>>>
>>> /var/tmp/jib-daholme/install/jpg/infra/builddeps/devkit-linux_x64/gcc4.9.2-OEL6.4+1.0/devkit-linux_x64-gcc4.9.2-OEL6.4+1.0.tar.gz/bin/gcc
>>>  -Wl,-z,defs -Wl,-O1 -Wl,--allow-shlib-undefined
>>> -L/scratch/dh198349/jdk9-hs/build/linux-x64/support/modules_libs/java.base/amd64
>>>  
>>> -L/scratch/dh198349/jdk9-hs/build/linux-x64/support/modules_libs/java.base/amd64/server
>>>  -ljvm -lpthread
>>> --sysroot=/var/tmp/jib-daholme/install/jpg/infra/builddeps/devkit-linux_x64/gcc4.9.2-OEL6.4+1.0/devkit-linux_x64-gcc4.9.2-OEL6.4+1.0.tar.gz/x86_64-unknown-linux-gnu/sysroot
>>>  -o
>>> /scratch/dh198349/jdk9-hs/build/linux-x64/support/test/hotspot/jtreg/native/bin/invoke
>>>  
>>> /scratch/dh198349/jdk9-hs/build/linux-x64/support/test/hotspot/jtreg/native/support/exeinvoke/exeinvoke.o
>> Sorry, "in front of" was a misleading expression. I meant placed *after*
>> exeinvoke.o (reading from right to left the link command).
>>
>> So on Ubuntu 16.04 x64 this fails (taken from the original build, the order 
>> is like in your link command):
>>
>> /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin 
>> /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so 
>> -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper 
>> -plugin-opt=-fresolution=/tmp/cccQFwXy.res
>> -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s 
>> -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc 
>> -plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr
>> -m elf_x86_64 --hash-style=gnu --as-needed 

Re: strange error when running jtreg tests

2016-08-17 Thread Erik Joelsson
I finally took a look at this and yes, there is a bug in the makefile. 
This line in hotspot/make/test/JtregNative.gmk:


BUILD_HOTSPOT_JTREG_EXECUTABLES_LDFLAGS_exeinvoke := -ljvm -lpthread

should be:

BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeinvoke := -ljvm -lpthread

Could someone who is able to repro try this?

/Erik

On 2016-08-17 16:15, Gustavo Romero wrote:

Hi David,

On 17-08-2016 00:38, David Holmes wrote:

On 16/08/2016 8:41 AM, Gustavo Romero wrote:

On Ubuntu 16.04 PPC64 LE replacing -lpthread by -pthread in
./hotspot/make/test/JtregNative.gmk:82 solves the issue on pthread_* symbols and
placing -ljvm (for instance) in front of ".../exeinvoke.o" solves the issue on
JNI_CreateJavaVM reference, however I'm really not sure what's the root cause.

I checked the link command being used (it is generated into a file when the 
test-image is built) and the -ljvm is already in front of the exeinvoke.o

/var/tmp/jib-daholme/install/jpg/infra/builddeps/devkit-linux_x64/gcc4.9.2-OEL6.4+1.0/devkit-linux_x64-gcc4.9.2-OEL6.4+1.0.tar.gz/bin/gcc
 -Wl,-z,defs -Wl,-O1 -Wl,--allow-shlib-undefined
-L/scratch/dh198349/jdk9-hs/build/linux-x64/support/modules_libs/java.base/amd64
 
-L/scratch/dh198349/jdk9-hs/build/linux-x64/support/modules_libs/java.base/amd64/server
 -ljvm -lpthread
--sysroot=/var/tmp/jib-daholme/install/jpg/infra/builddeps/devkit-linux_x64/gcc4.9.2-OEL6.4+1.0/devkit-linux_x64-gcc4.9.2-OEL6.4+1.0.tar.gz/x86_64-unknown-linux-gnu/sysroot
 -o
/scratch/dh198349/jdk9-hs/build/linux-x64/support/test/hotspot/jtreg/native/bin/invoke
 
/scratch/dh198349/jdk9-hs/build/linux-x64/support/test/hotspot/jtreg/native/support/exeinvoke/exeinvoke.o

Sorry, "in front of" was a misleading expression. I meant placed *after*
exeinvoke.o (reading from right to left the link command).

So on Ubuntu 16.04 x64 this fails (taken from the original build, the order is 
like in your link command):

/usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin 
/usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so 
-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper 
-plugin-opt=-fresolution=/tmp/cccQFwXy.res
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s 
-plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc 
-plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr
-m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker 
/lib64/ld-linux-x86-64.so.2 -z relro -o
/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/bin/invoke
 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o 
/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o
-L/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/modules_libs/java.base/amd64
-L/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/modules_libs/java.base/amd64/server
 -L/usr/lib/gcc/x86_64-linux-gnu/5
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu 
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu 
-L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. --hash-style=both -z defs -O1 
--allow-shlib-undefined -ljvm -lpthread
/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/support/exeinvoke/exeinvoke.o
 -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed
-lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o 
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o

but this succeeds (where -ljvm is after exeinvoke.o):

/usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin 
/usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so 
-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper 
-plugin-opt=-fresolution=/tmp/ccIRdp31.res
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s 
-plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc 
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s
--sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu 
--as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o
/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/bin/invoke
 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o 
/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o
-L/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/modules_libs/java.base/amd64
-L/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/modules_libs/java.base/amd64/server
 -L/usr/lib/gcc/x86_64-linux-gnu/5
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu 
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu 
-L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. 

Re: strange error when running jtreg tests

2016-08-17 Thread Gustavo Romero
Sorry, again: (reading from left to right the link command).

Regards,
Gustavo

On 17-08-2016 11:15, Gustavo Romero wrote:
> Hi David,
> 
> On 17-08-2016 00:38, David Holmes wrote:
>> On 16/08/2016 8:41 AM, Gustavo Romero wrote:
>>> On Ubuntu 16.04 PPC64 LE replacing -lpthread by -pthread in
>>> ./hotspot/make/test/JtregNative.gmk:82 solves the issue on pthread_* 
>>> symbols and
>>> placing -ljvm (for instance) in front of ".../exeinvoke.o" solves the issue 
>>> on
>>> JNI_CreateJavaVM reference, however I'm really not sure what's the root 
>>> cause.
>>
>> I checked the link command being used (it is generated into a file when the 
>> test-image is built) and the -ljvm is already in front of the exeinvoke.o
>>
>> /var/tmp/jib-daholme/install/jpg/infra/builddeps/devkit-linux_x64/gcc4.9.2-OEL6.4+1.0/devkit-linux_x64-gcc4.9.2-OEL6.4+1.0.tar.gz/bin/gcc
>>  -Wl,-z,defs -Wl,-O1 -Wl,--allow-shlib-undefined
>> -L/scratch/dh198349/jdk9-hs/build/linux-x64/support/modules_libs/java.base/amd64
>>  
>> -L/scratch/dh198349/jdk9-hs/build/linux-x64/support/modules_libs/java.base/amd64/server
>>  -ljvm -lpthread
>> --sysroot=/var/tmp/jib-daholme/install/jpg/infra/builddeps/devkit-linux_x64/gcc4.9.2-OEL6.4+1.0/devkit-linux_x64-gcc4.9.2-OEL6.4+1.0.tar.gz/x86_64-unknown-linux-gnu/sysroot
>>  -o
>> /scratch/dh198349/jdk9-hs/build/linux-x64/support/test/hotspot/jtreg/native/bin/invoke
>>  
>> /scratch/dh198349/jdk9-hs/build/linux-x64/support/test/hotspot/jtreg/native/support/exeinvoke/exeinvoke.o
> 
> Sorry, "in front of" was a misleading expression. I meant placed *after*
> exeinvoke.o (reading from right to left the link command).
> 
> So on Ubuntu 16.04 x64 this fails (taken from the original build, the order 
> is like in your link command):
> 
> /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin 
> /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so 
> -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper 
> -plugin-opt=-fresolution=/tmp/cccQFwXy.res
> -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s 
> -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc 
> -plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr
> -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker 
> /lib64/ld-linux-x86-64.so.2 -z relro -o
> /home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/bin/invoke
>  /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o
> /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o 
> /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o
> -L/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/modules_libs/java.base/amd64
> -L/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/modules_libs/java.base/amd64/server
>  -L/usr/lib/gcc/x86_64-linux-gnu/5
> -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu 
> -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu 
> -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
> -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. --hash-style=both -z defs -O1 
> --allow-shlib-undefined -ljvm -lpthread
> /home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/support/exeinvoke/exeinvoke.o
>  -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed
> -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o 
> /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o
> 
> but this succeeds (where -ljvm is after exeinvoke.o):
> 
> /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin 
> /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so 
> -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper 
> -plugin-opt=-fresolution=/tmp/ccIRdp31.res
> -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s 
> -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc 
> -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s
> --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu 
> --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o
> /home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/bin/invoke
>  /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o
> /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o 
> /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o
> -L/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/modules_libs/java.base/amd64
> -L/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/modules_libs/java.base/amd64/server
>  -L/usr/lib/gcc/x86_64-linux-gnu/5
> -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu 
> -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu 
> -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
> -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. --hash-style=both -z defs -O1
> 

Re: strange error when running jtreg tests

2016-08-17 Thread Gustavo Romero
Hi David,

On 17-08-2016 00:38, David Holmes wrote:
> On 16/08/2016 8:41 AM, Gustavo Romero wrote:
>> On Ubuntu 16.04 PPC64 LE replacing -lpthread by -pthread in
>> ./hotspot/make/test/JtregNative.gmk:82 solves the issue on pthread_* symbols 
>> and
>> placing -ljvm (for instance) in front of ".../exeinvoke.o" solves the issue 
>> on
>> JNI_CreateJavaVM reference, however I'm really not sure what's the root 
>> cause.
> 
> I checked the link command being used (it is generated into a file when the 
> test-image is built) and the -ljvm is already in front of the exeinvoke.o
> 
> /var/tmp/jib-daholme/install/jpg/infra/builddeps/devkit-linux_x64/gcc4.9.2-OEL6.4+1.0/devkit-linux_x64-gcc4.9.2-OEL6.4+1.0.tar.gz/bin/gcc
>  -Wl,-z,defs -Wl,-O1 -Wl,--allow-shlib-undefined
> -L/scratch/dh198349/jdk9-hs/build/linux-x64/support/modules_libs/java.base/amd64
>  
> -L/scratch/dh198349/jdk9-hs/build/linux-x64/support/modules_libs/java.base/amd64/server
>  -ljvm -lpthread
> --sysroot=/var/tmp/jib-daholme/install/jpg/infra/builddeps/devkit-linux_x64/gcc4.9.2-OEL6.4+1.0/devkit-linux_x64-gcc4.9.2-OEL6.4+1.0.tar.gz/x86_64-unknown-linux-gnu/sysroot
>  -o
> /scratch/dh198349/jdk9-hs/build/linux-x64/support/test/hotspot/jtreg/native/bin/invoke
>  
> /scratch/dh198349/jdk9-hs/build/linux-x64/support/test/hotspot/jtreg/native/support/exeinvoke/exeinvoke.o

Sorry, "in front of" was a misleading expression. I meant placed *after*
exeinvoke.o (reading from right to left the link command).

So on Ubuntu 16.04 x64 this fails (taken from the original build, the order is 
like in your link command):

/usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin 
/usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so 
-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper 
-plugin-opt=-fresolution=/tmp/cccQFwXy.res
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s 
-plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc 
-plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr
-m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker 
/lib64/ld-linux-x86-64.so.2 -z relro -o
/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/bin/invoke
 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o 
/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o
-L/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/modules_libs/java.base/amd64
-L/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/modules_libs/java.base/amd64/server
 -L/usr/lib/gcc/x86_64-linux-gnu/5
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu 
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu 
-L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. --hash-style=both -z defs -O1 
--allow-shlib-undefined -ljvm -lpthread
/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/support/exeinvoke/exeinvoke.o
 -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed
-lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o 
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o

but this succeeds (where -ljvm is after exeinvoke.o):

/usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin 
/usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so 
-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper 
-plugin-opt=-fresolution=/tmp/ccIRdp31.res
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s 
-plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc 
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s
--sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu 
--as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o
/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/bin/invoke
 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o 
/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o
-L/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/modules_libs/java.base/amd64
-L/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/modules_libs/java.base/amd64/server
 -L/usr/lib/gcc/x86_64-linux-gnu/5
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu 
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu 
-L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. --hash-style=both -z defs -O1
/home/gromero/hg/jdk9/hs-comp/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/support/exeinvoke/exeinvoke.o
 -ljvm -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc
-lgcc --as-needed -lgcc_s --no-as-needed 
/usr/lib/gcc/x86_64-linux-gnu/5/crtend.o 

Re: strange error when running jtreg tests

2016-08-16 Thread David Holmes

On 16/08/2016 8:41 AM, Gustavo Romero wrote:

Hi,

I observed the same issue on Ubuntu 16.04 but not on RHEL 7.2.

RHEL 7.2:
https://paste.fedoraproject.org/409005/raw/

Ubuntu 16.04:
https://paste.fedoraproject.org/409004/raw/

I checked on PPC64 LE arch (Ubuntu 16.04 and RHEL 7.2, logs above). It fails 
also
on Ubuntu 16.04 x64 (but I could not check if it succeeds on RHEL 7.2 x64).

On Ubuntu 16.04 PPC64 LE replacing -lpthread by -pthread in
./hotspot/make/test/JtregNative.gmk:82 solves the issue on pthread_* symbols and
placing -ljvm (for instance) in front of ".../exeinvoke.o" solves the issue on
JNI_CreateJavaVM reference, however I'm really not sure what's the root cause.


I checked the link command being used (it is generated into a file when 
the test-image is built) and the -ljvm is already in front of the 
exeinvoke.o


/var/tmp/jib-daholme/install/jpg/infra/builddeps/devkit-linux_x64/gcc4.9.2-OEL6.4+1.0/devkit-linux_x64-gcc4.9.2-OEL6.4+1.0.tar.gz/bin/gcc 
-Wl,-z,defs -Wl,-O1 -Wl,--allow-shlib-undefined 
-L/scratch/dh198349/jdk9-hs/build/linux-x64/support/modules_libs/java.base/amd64 
-L/scratch/dh198349/jdk9-hs/build/linux-x64/support/modules_libs/java.base/amd64/server 
-ljvm -lpthread 
--sysroot=/var/tmp/jib-daholme/install/jpg/infra/builddeps/devkit-linux_x64/gcc4.9.2-OEL6.4+1.0/devkit-linux_x64-gcc4.9.2-OEL6.4+1.0.tar.gz/x86_64-unknown-linux-gnu/sysroot 
-o 
/scratch/dh198349/jdk9-hs/build/linux-x64/support/test/hotspot/jtreg/native/bin/invoke 
/scratch/dh198349/jdk9-hs/build/linux-x64/support/test/hotspot/jtreg/native/support/exeinvoke/exeinvoke.o


David
-


Maurizio, what distro/arch are you using?

Regards,
Gustavo



Re: strange error when running jtreg tests

2016-08-16 Thread Maurizio Cimadamore



On 16/08/16 14:19, David Simms wrote:


Another work-around is to use a "sanctioned dev kit" 
("--with-devkit=") and avoid problems with "new fangled distros and 
tools", see:


https://wiki.se.oracle.com/display/JPG/Devkit+build+instructions+for+JDK+9 

This doesn't work - at least for me - it gets a bit further, but then 
still fails:


Directory 
"/w/lt/9/dev/build/linux-x86_64-normal-server-release/testoutput/jdk_lang/JTwork" 
not found: creating
Directory 
"/w/lt/9/dev/build/linux-x86_64-normal-server-release/testoutput/jdk_lang/JTreport" 
not found: creating
Error: Cannot find observer class: 
jdk.test.failurehandler.jtreg.GatherDiagnosticInfoObserver


My jtreg is this:

$jtreg -version
jtreg, version 4.2 fcs b03
Built with Java(TM) 2 SDK, Version 1.7.0-b147 on July 29, 2016.
Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
Use is subject to license terms.
JCov 2.0-b18 beta
TestNG: version 6.9.5


Maurizio



On 16/08/16 11:39, Maurizio Cimadamore wrote:

Using Ubuntu 14.04 on x64.

Maurizio


On 15/08/16 23:41, Gustavo Romero wrote:

Hi,

I observed the same issue on Ubuntu 16.04 but not on RHEL 7.2.

RHEL 7.2:
https://paste.fedoraproject.org/409005/raw/

Ubuntu 16.04:
https://paste.fedoraproject.org/409004/raw/

I checked on PPC64 LE arch (Ubuntu 16.04 and RHEL 7.2, logs above). 
It fails also
on Ubuntu 16.04 x64 (but I could not check if it succeeds on RHEL 
7.2 x64).


On Ubuntu 16.04 PPC64 LE replacing -lpthread by -pthread in
./hotspot/make/test/JtregNative.gmk:82 solves the issue on pthread_* 
symbols and
placing -ljvm (for instance) in front of ".../exeinvoke.o" solves 
the issue on
JNI_CreateJavaVM reference, however I'm really not sure what's the 
root cause.


Maurizio, what distro/arch are you using?

Regards,
Gustavo









Re: strange error when running jtreg tests

2016-08-16 Thread Maurizio Cimadamore



On 16/08/16 14:19, David Simms wrote:


Another work-around is to use a "sanctioned dev kit" 
("--with-devkit=") and avoid problems with "new fangled distros and 
tools", see:


https://wiki.se.oracle.com/display/JPG/Devkit+build+instructions+for+JDK+9 


Sure - or running jtreg manually (which is what I'm doing).

But the question is: is this a bug?

Maurizio



On 16/08/16 11:39, Maurizio Cimadamore wrote:

Using Ubuntu 14.04 on x64.

Maurizio


On 15/08/16 23:41, Gustavo Romero wrote:

Hi,

I observed the same issue on Ubuntu 16.04 but not on RHEL 7.2.

RHEL 7.2:
https://paste.fedoraproject.org/409005/raw/

Ubuntu 16.04:
https://paste.fedoraproject.org/409004/raw/

I checked on PPC64 LE arch (Ubuntu 16.04 and RHEL 7.2, logs above). 
It fails also
on Ubuntu 16.04 x64 (but I could not check if it succeeds on RHEL 
7.2 x64).


On Ubuntu 16.04 PPC64 LE replacing -lpthread by -pthread in
./hotspot/make/test/JtregNative.gmk:82 solves the issue on pthread_* 
symbols and
placing -ljvm (for instance) in front of ".../exeinvoke.o" solves 
the issue on
JNI_CreateJavaVM reference, however I'm really not sure what's the 
root cause.


Maurizio, what distro/arch are you using?

Regards,
Gustavo









Re: strange error when running jtreg tests

2016-08-16 Thread David Simms


Another work-around is to use a "sanctioned dev kit" ("--with-devkit=") 
and avoid problems with "new fangled distros and tools", see:


https://wiki.se.oracle.com/display/JPG/Devkit+build+instructions+for+JDK+9


On 16/08/16 11:39, Maurizio Cimadamore wrote:

Using Ubuntu 14.04 on x64.

Maurizio


On 15/08/16 23:41, Gustavo Romero wrote:

Hi,

I observed the same issue on Ubuntu 16.04 but not on RHEL 7.2.

RHEL 7.2:
https://paste.fedoraproject.org/409005/raw/

Ubuntu 16.04:
https://paste.fedoraproject.org/409004/raw/

I checked on PPC64 LE arch (Ubuntu 16.04 and RHEL 7.2, logs above). 
It fails also
on Ubuntu 16.04 x64 (but I could not check if it succeeds on RHEL 7.2 
x64).


On Ubuntu 16.04 PPC64 LE replacing -lpthread by -pthread in
./hotspot/make/test/JtregNative.gmk:82 solves the issue on pthread_* 
symbols and
placing -ljvm (for instance) in front of ".../exeinvoke.o" solves the 
issue on
JNI_CreateJavaVM reference, however I'm really not sure what's the 
root cause.


Maurizio, what distro/arch are you using?

Regards,
Gustavo







Re: strange error when running jtreg tests

2016-08-16 Thread Maurizio Cimadamore

Using Ubuntu 14.04 on x64.

Maurizio


On 15/08/16 23:41, Gustavo Romero wrote:

Hi,

I observed the same issue on Ubuntu 16.04 but not on RHEL 7.2.

RHEL 7.2:
https://paste.fedoraproject.org/409005/raw/

Ubuntu 16.04:
https://paste.fedoraproject.org/409004/raw/

I checked on PPC64 LE arch (Ubuntu 16.04 and RHEL 7.2, logs above). It fails 
also
on Ubuntu 16.04 x64 (but I could not check if it succeeds on RHEL 7.2 x64).

On Ubuntu 16.04 PPC64 LE replacing -lpthread by -pthread in
./hotspot/make/test/JtregNative.gmk:82 solves the issue on pthread_* symbols and
placing -ljvm (for instance) in front of ".../exeinvoke.o" solves the issue on
JNI_CreateJavaVM reference, however I'm really not sure what's the root cause.

Maurizio, what distro/arch are you using?

Regards,
Gustavo





Re: strange error when running jtreg tests

2016-08-15 Thread Gustavo Romero
Hi,

I observed the same issue on Ubuntu 16.04 but not on RHEL 7.2.

RHEL 7.2:
https://paste.fedoraproject.org/409005/raw/

Ubuntu 16.04:
https://paste.fedoraproject.org/409004/raw/

I checked on PPC64 LE arch (Ubuntu 16.04 and RHEL 7.2, logs above). It fails 
also
on Ubuntu 16.04 x64 (but I could not check if it succeeds on RHEL 7.2 x64).

On Ubuntu 16.04 PPC64 LE replacing -lpthread by -pthread in
./hotspot/make/test/JtregNative.gmk:82 solves the issue on pthread_* symbols and
placing -ljvm (for instance) in front of ".../exeinvoke.o" solves the issue on
JNI_CreateJavaVM reference, however I'm really not sure what's the root cause.

Maurizio, what distro/arch are you using?

Regards,
Gustavo



Re: strange error when running jtreg tests

2016-08-15 Thread Maurizio Cimadamore

Yes - other colleagues seeing this too

Maurizio


On 13/08/16 00:56, David Holmes wrote:

Did you do a clean first? I've not seen nor heard of this before.




Re: strange error when running jtreg tests

2016-08-12 Thread David Holmes

On 13/08/2016 12:50 AM, Maurizio Cimadamore wrote:



On 12/08/16 14:12, David Holmes wrote:

On 12/08/2016 11:06 PM, Maurizio Cimadamore wrote:

Hi,

I've encountered this error when running jtreg tests from make using the
following command line

make test JT_HOME= 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 appeared after I refreshed my repo with latest sources. Anybody has
any clue as to what this is?


Did you run "make test-image" first?

If not I think make is applying a default compilation rule for .c
files and that ain't gonna work.


$ make test-image

ERROR: Build failed for target 'test-image' in configuration


Did you do a clean first? I've not seen nor heard of this before.

David
-



'linux-x86_64-normal-server-release' (exit code 2)
=== Output from failing command(s) repeated here ===
* 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



David


Maurizio





Re: strange error when running jtreg tests

2016-08-12 Thread Maurizio Cimadamore



On 12/08/16 14:12, David Holmes wrote:

On 12/08/2016 11:06 PM, Maurizio Cimadamore wrote:

Hi,

I've encountered this error when running jtreg tests from make using the
following command line

make test JT_HOME= 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 appeared after I refreshed my repo with latest sources. Anybody has
any clue as to what this is?


Did you run "make test-image" first?

If not I think make is applying a default compilation rule for .c 
files and that ain't gonna work.


$ make test-image

ERROR: Build failed for target 'test-image' in configuration 
'linux-x86_64-normal-server-release' (exit code 2)

=== Output from failing command(s) repeated here ===
* 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



David


Maurizio





Re: strange error when running jtreg tests

2016-08-12 Thread David Holmes

On 12/08/2016 11:06 PM, Maurizio Cimadamore wrote:

Hi,

I've encountered this error when running jtreg tests from make using the
following command line

make test JT_HOME= 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 appeared after I refreshed my repo with latest sources. Anybody has
any clue as to what this is?


Did you run "make test-image" first?

If not I think make is applying a default compilation rule for .c files 
and that ain't gonna work.


David


Maurizio