configure - gcc >4.6 needed for JDK9 build
Mike Burton
mikeb at mycosystems.co.uk
Thu Jan 26 17:33:22 UTC 2017
I get the same error as before, eventually:
1. First of all failed writing to failure-logs/ This seems to happen on every clean” build, could it be fixed?
I needed to mkdir -p /home/openjdk/dev/jdk9/build/linux-x86_64-normal-server-release/make-support/failure-logs
2. The error from 1. was:
/home/openjdk/dev/jdk9/jdk/src/java.desktop/share/native/libawt/java2d/loops/ProcessPath.c: In function 'ProcessPath':
/home/openjdk/dev/jdk9/jdk/src/java.desktop/share/native/libawt/java2d/loops/ProcessPath.c:846:42: error: 'params[0]' may be used uninitialized in this function [-Werror=uninitialized]
/home/openjdk/dev/jdk9/jdk/src/java.desktop/share/native/libawt/java2d/loops/ProcessPath.c:786:12: note: 'params[0]' was declared here
/home/openjdk/dev/jdk9/jdk/src/java.desktop/share/native/libawt/java2d/loops/ProcessPath.c: At top level:
cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" [-Werror]
cc1: all warnings being treated as errors
make[3]: *** [/home/openjdk/dev/jdk9/build/linux-x86_64-normal-server-release/support/native/java.desktop/libawt/ProcessPath.o] Error 1
make[2]: *** [java.desktop-libs] Error 1
3. So I tried `bash configure --disable-warnings-as-errors` Then `make clean images` errored as before:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++.a(ctype.o): relocation R_X86_64_32S against `vtable for std::ctype<wchar_t>' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[3]: *** [/home/openjdk/dev/jdk9/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/gtest/libjvm.so] Error 1
make[2]: *** [hotspot-server-libs] Error 1
ERROR: Build failed for target 'images' in configuration 'linux-x86_64-normal-server-release' (exit code 2)
=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_gtest_objs_BUILD_GTEST_LIBJVM_link:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++.a(ctype.o): relocation R_X86_64_32S against `vtable for std::ctype<wchar_t>' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++.a: could not read symbols: Bad value
Mike
> On 26 Jan 2017, at 16:00, Erik Joelsson <erik.joelsson at oracle.com> wrote:
>
> The option is --disable-hotspot-gtest.
>
> /Erik
>
>
> On 2017-01-26 16:55, Mike Burton wrote:
>> When I do `bash configure —disable-gtest` it errors with:
>> unrecognised options: —disable-gtest
>>
>> Mike
>>
>>
>>> On 26 Jan 2017, at 15:36, Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com> wrote:
>>>
>>> This is an issue with gtest, which is a bit special.
>>>
>>> If you use --disable-gtest with configure, can you build successfully then?
>>>
>>> /Magnus
>>>
>>>> 25 jan. 2017 kl. 09:34 skrev Mike Burton <mikeb at mycosystems.co.uk>:
>>>>
>>>>
>>>>>> On 24 Jan 2017, at 21:25, Kim Barrett <kim.barrett at oracle.com> wrote:
>>>>>>
>>>>>> On Jan 23, 2017, at 5:34 AM, Mike Burton <mikeb at mycosystems.co.uk> wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I ran an OpenJDK Hack Day session on Saturday, at which some people got stuck on lost a fair bit of time, failing to build JDK9. Then we found that updating gcc from 4.6 to 4.8 fixed it.
>>>>>> Could the `configure` script be updated (by running get-source.sh) so as to check for minimum required gcc version?
>>>>>>
>>>>>> Best Regards
>>>>>>
>>>>>> Mike Burton
>>>>> I don’t think there is supposed to be a requirement for gcc > 4.6 in JDK 9. I’m pretty
>>>>> sure there are folks still building with older versions. It would be helpful to know the
>>>>> details of the platform and the error messages that led to the conclusion that something
>>>>> more recent was required.
>>>> Platform is Ubuntu 14.04, error message below:
>>>>
>>>> === Output from failing command(s) repeated here ===
>>>> * For target hotspot_variant-server_libjvm_gtest_objs_BUILD_GTEST_LIBJVM_link:
>>>> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++.a(ctype.o): relocation R_X86_64_32S against `vtable for std::ctype<wchar_t>' can not be used when making a shared object; recompile with -fPIC
>>>> /usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++.a: could not read symbols: Bad value
>>>> collect2: ld returned 1 exit status
>>>> === End of repeated output ===
>>>>
>>>>
>
More information about the build-dev
mailing list