error when running jtreg tests
Erik Joelsson
erik.joelsson at oracle.com
Tue Dec 13 16:13:28 UTC 2016
This is a bug in hotspot/make/test/JtregNative.gmk. A library parameter
like -ldl should be set to a LIBS variable and not LDFLAGS. Our default
gcc does not react to this, but later versions do, which is why these
bugs tend to sneak in.
/Erik
On 2016-12-13 16:56, Maurizio Cimadamore wrote:
> I think the problem is caused by a quirk in my gcc - if I compile
> something with
>
> gcc -ldl foo.cpp
>
> it fails with messages similar to the one I mentioned. To make it work
> I have to do:
>
> gcc foo.cpp -ldl
>
> On the other hand, the gcc version included in the dev toolkit works
> with both variants.
>
> Maurizio
>
>
>
> On 13/12/16 15:44, Maurizio Cimadamore wrote:
>> Using the devkit worked - but this is odd as it was working as of
>> last week, and it seems like the linker gets passed the flag -ldl
>> which you need to avoid this kind of issues (and I do have libdl.so
>> installed).
>>
>> Maurizio
>>
>>
>> On 13/12/16 15:08, Maurizio Cimadamore wrote:
>>>
>>>
>>> On 13/12/16 14:51, Erik Joelsson wrote:
>>>> What version of GCC are you using? This looks like a hotspot jtreg
>>>> native test that can't be compiled with your toolchain.
>>> gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
>>> Copyright (C) 2015 Free Software Foundation, Inc.
>>> This is free software; see the source for copying conditions. There
>>> is NO
>>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>>> PURPOSE.
>>>
>>>
>>>>
>>>> To work around it, you should be able to run something like this:
>>>>
>>>> $ make build-test-jdk-jtreg-native jdk-image && make test-only
>>>> TEST=jdk_util
>>>>
>>>> Maybe you also need build-test-failure-handler and build-test-lib.
>>>> Not sure.
>>> No luck - that fails with this:
>>>
>>> Error: Cannot find observer class:
>>> jdk.test.failurehandler.jtreg.GatherDiagnosticInfoObserver
>>>
>>>
>>> Maurizio
>>>>
>>>> /Erik
>>>>
>>>>
>>>> On 2016-12-13 15:43, Maurizio Cimadamore wrote:
>>>>> Hi,
>>>>> i'm trying to run tests as follows:
>>>>>
>>>>> make tests TEST=jdk_util
>>>>>
>>>>> And I get this:
>>>>>
>>>>> Building target 'test' in configuration
>>>>> 'linux-x86_64-normal-server-release'
>>>>> Building JVM variant 'server' with features 'all-gcs cds compiler1
>>>>> compiler2 fprof jni-check jvmci jvmti management nmt services
>>>>> vm-structs'
>>>>> /usr/bin/find: ‘/w/lt/9/dev/hotspot/test/compiler/native’: No such
>>>>> file or directory
>>>>> /usr/bin/find: ‘/w/lt/9/dev/hotspot/test/compiler/native’: No such
>>>>> file or directory
>>>>> /w/lt/9/dev/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/support/exeFPRegs/exeFPRegs.o:
>>>>> In function `closeHandle':
>>>>> /w/lt/9/dev/hotspot/make/test/../../test/runtime/jni/CalleeSavedRegisters/exeFPRegs.c:48:
>>>>> undefined reference to `dlclose'
>>>>> /w/lt/9/dev/hotspot/make/test/../../test/runtime/jni/CalleeSavedRegisters/exeFPRegs.c:49:
>>>>> undefined reference to `dlerror'
>>>>> /w/lt/9/dev/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/support/exeFPRegs/exeFPRegs.o:
>>>>> In function `loadJVM':
>>>>> /w/lt/9/dev/hotspot/make/test/../../test/runtime/jni/CalleeSavedRegisters/exeFPRegs.c:69:
>>>>> undefined reference to `dlopen'
>>>>> /w/lt/9/dev/hotspot/make/test/../../test/runtime/jni/CalleeSavedRegisters/exeFPRegs.c:77:
>>>>> undefined reference to `dlsym'
>>>>> /w/lt/9/dev/hotspot/make/test/../../test/runtime/jni/CalleeSavedRegisters/exeFPRegs.c:88:
>>>>> undefined reference to `dlerror'
>>>>> collect2: error: ld returned 1 exit status
>>>>> make[3]: ***
>>>>> [/w/lt/9/dev/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/bin/FPRegs]
>>>>> Error 1
>>>>> JtregNative.gmk:117: recipe for target
>>>>> '/w/lt/9/dev/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/bin/FPRegs'
>>>>> failed
>>>>> make/Main.gmk:410: recipe for target
>>>>> 'build-test-hotspot-jtreg-native' failed
>>>>> make[2]: *** [build-test-hotspot-jtreg-native] Error 1
>>>>> make[2]: *** Waiting for unfinished jobs....
>>>>>
>>>>> ERROR: Build failed for target 'test' 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_exeFPRegs_BUILD_TEST_FPRegs_link:
>>>>> /w/lt/9/dev/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/support/exeFPRegs/exeFPRegs.o:
>>>>> In function `closeHandle':
>>>>> /w/lt/9/dev/hotspot/make/test/../../test/runtime/jni/CalleeSavedRegisters/exeFPRegs.c:48:
>>>>> undefined reference to `dlclose'
>>>>> /w/lt/9/dev/hotspot/make/test/../../test/runtime/jni/CalleeSavedRegisters/exeFPRegs.c:49:
>>>>> undefined reference to `dlerror'
>>>>> /w/lt/9/dev/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/support/exeFPRegs/exeFPRegs.o:
>>>>> In function `loadJVM':
>>>>> /w/lt/9/dev/hotspot/make/test/../../test/runtime/jni/CalleeSavedRegisters/exeFPRegs.c:69:
>>>>> undefined reference to `dlopen'
>>>>> /w/lt/9/dev/hotspot/make/test/../../test/runtime/jni/CalleeSavedRegisters/exeFPRegs.c:77:
>>>>> undefined reference to `dlsym'
>>>>> /w/lt/9/dev/hotspot/make/test/../../test/runtime/jni/CalleeSavedRegisters/exeFPRegs.c:88:
>>>>> undefined reference to `dlerror'
>>>>> collect2: error: ld returned 1 exit status
>>>>> === End of repeated output ===
>>>>> === Make failure sequence repeated here ===
>>>>> JtregNative.gmk:117: recipe for target
>>>>> '/w/lt/9/dev/build/linux-x86_64-normal-server-release/support/test/hotspot/jtreg/native/bin/FPRegs'
>>>>> failed
>>>>> make/Main.gmk:410: recipe for target
>>>>> 'build-test-hotspot-jtreg-native' failed
>>>>> === End of repeated output ===
>>>>> Hint: Try searching the build log for the name of the first failed
>>>>> target.
>>>>> Hint: If caused by a warning, try configure
>>>>> --disable-warnings-as-errors.
>>>>>
>>>>> /w/lt/9/dev/make/Init.gmk:286: recipe for target 'main' failed
>>>>> make[1]: *** [main] Error 1
>>>>> /w/lt/9/dev/make/Init.gmk:185: recipe for target 'test' failed
>>>>> make: *** [test] Error 2
>>>>>
>>>>>
>>>>> Any idea of what is wrong? My spec.gmk points to the latest jtreg
>>>>> (I ran configure with --with-jtreg)
>>>>>
>>>>> Thanks
>>>>> Maurizio
>>>>>
>>>>
>>>
>>
>
More information about the build-dev
mailing list