Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 685426 - dev-java/openjdk-8.212_p03 - .../work/jdk8u-jdk8u212-b03/hotspot/src/share/vm/adlc/dfa.cpp:399:3: error: multi-line comment [-Werror=comment]
Summary: dev-java/openjdk-8.212_p03 - .../work/jdk8u-jdk8u212-b03/hotspot/src/share/vm...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-05-09 04:27 UTC by Mihai Moldovan
Modified: 2019-05-09 19:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (1557372666-install-dev-java_openjdk-8.212_p03:8::gentoo.out,166.15 KB, text/plain)
2019-05-09 04:27 UTC, Mihai Moldovan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mihai Moldovan 2019-05-09 04:27:19 UTC
Created attachment 575564 [details]
build.log

While the ebuild(s) do add the -Wno-error flag, it doesn't come into effect since the OpenJDK build system appends -Werror after it - taking precedence.

With newer, stricter GCC versions (currently using 8.3.0), compilation fails.
Comment 1 Mihai Moldovan 2019-05-09 12:31:32 UTC
The issue seems to be that hotspot always *appends* -Werror and friends unconditionally to the flags value. The BSD Makefiles don't do that, but instead depend upon a variable called COMPILER_WARNINGS_FATAL.

Looking around, it seems like this variable was once used widely within the build system, but replaced with other stuff later on. The BSD Makefile references are merely left-overs, which makes things complicated. Further, more recent OpenJDK releases have overhauled the hotspot build system and introduced proper configure flags.

Backporting this is difficult, but luckily, also unneeded. I worked around the problem by guarding the places that hardcode -Werror with COMPILER_WARNINGS_FATAL conditionals and adding a new configure switch to change this variable, including putting it into the spec file, so that it's actually available to the build system later on.

It certainly does feel a bit hacky, but OpenJDK 8 is basically on life support now anyway with very little changed to be expected.

Filing a PR for this.
Comment 2 Larry the Git Cow gentoo-dev 2019-05-09 19:02:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9a7ca5bb0f8625c96d30e8285c0c4e802abb5cb

commit e9a7ca5bb0f8625c96d30e8285c0c4e802abb5cb
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2019-05-09 18:53:30 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2019-05-09 19:02:27 +0000

    dev-java/openjdk: fix build on gcc-9 by passing -Wno-error
    
    Closes: https://bugs.gentoo.org/685426
    Package-Manager: Portage-2.3.66, Repoman-2.3.12
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-java/openjdk/openjdk-8.212_p03.ebuild | 3 +++
 1 file changed, 3 insertions(+)