Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 585868 - dev-java/icedtea-3.0.1 build failure with GCC 6 -- numerous issues.
Summary: dev-java/icedtea-3.0.1 build failure with GCC 6 -- numerous issues.
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
Depends on:
Blocks: gcc-6
  Show dependency tree
Reported: 2016-06-13 21:24 UTC by Aric Belsito
Modified: 2016-08-24 22:52 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Aric Belsito 2016-06-13 21:24:45 UTC
Please see the following threads:

And the following gentoo bug:

First of all, dev-java/icedtea-3.0.1 with the CFLAGS="-march=native -O2 -pipe" builds correctly on GCC 5.

dev-java/icedtea-3.0.1 with the CFLAGS="-march=native -pipe" does not build correctly  even with GCC 5 because the configuration script automatically appends `-O3' the the CFLAGS, meaning that icedtea builds with the `-fdelete-null-pointer-checks' flag that causes segmentation faults (See 3) GCC 6 adds -fdelete-null-pointer-checks to the `-O2' optimization level, so it will always segmentation fault unless we unconditionally append `-fno-delete-null-pointer-checks' in CFLAGS until they fix the issue upstream. The OpenJDK developers don't seem to be interested in backporting changes.

Second of all, because dev-java/icedtea-3.0.1 is not compatible with the C++11 standard, we need to pass `-std=c++98' to configure. Interestingly, passing `-std=c++98' in CXXFLAGS is ignored, while it works if passed in CFLAGS only.

Finally, GCC 6 makes dead storage elimination much more aggressive, so instead of passing `-flifetime-dse=1' as GCC 5 does, it passes `-flifetime-dse=2', which also causes segmentation faults.
Comment 1 Aric Belsito 2016-06-13 21:38:48 UTC
One can build dev-java/icedtea with `-O2' or `-O3' with GCC 5 and GCC 6 if we append the C/CXXFLAGS:

What's interesting is that GCC 5 doesn't necessarily need the flag in some cases. Would be nice to have some people verify..

for GCC 5:
for GCC 6:
"-std=c++98 -fno-delete-null-pointer-checks -flifetime-dse=1"
Comment 2 Aric Belsito 2016-06-14 05:06:23 UTC
False alarm on GCC 5.x -- I still can't get it to build and run with `-O3'. I'm not sure why.
Comment 3 Andrew John Hughes 2016-08-24 21:32:57 UTC
This is obsolete; icedtea-3.1.0 and icedtea- both support GCC 6.

"The OpenJDK developers don't seem to be interested in backporting changes." -- what is this based on, exactly?
Comment 4 Aric Belsito 2016-08-24 22:52:09 UTC

That was the feeling I got from the 2nd thread I linked in the issue -- sorry if I'm putting words in other people's mouths. :P

Confirming that it is obsolete now. Closing.