Summary: | dev-java/icedtea-3.4.0: ICE with GCC-7.1 (ccache) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alexey Shvetsov <alexxy> |
Component: | Current packages | Assignee: | Andrew John Hughes <gnu_andrew> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | chewi, java, jstein, plevine457, proxy-maint, samuelbernardo.mail |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | ~arch only; ccache | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 617524 | ||
Attachments: | build.log |
Description
Alexey Shvetsov
2017-07-08 09:37:43 UTC
Created attachment 481976 [details]
build.log
build.log
Alexey, thank you for your bug reports. Tickets will be assigned even faster, if you assign your own tickets directly as author. We prepared a JavaScript plugin [1] for greasemonkey [2] which makes this very fast and easy. [1] https://github.com/mgorny/bug-assign-user-js [2] https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ Did you try to build it without ccache ? As I expected I couldn't reproduce compiler crash without ccache feature. I would propose to check $FEATURES for ccache flag and disable it for icedtea. (In reply to Alexei Kharitonov from comment #4) > As I expected I couldn't reproduce compiler crash without ccache feature. I > would propose to check $FEATURES for ccache flag and disable it for icedtea. It already warns about it right at the start. OpenJDK actually promotes ccache despite the issues so we didn't want to disable it unconditionally. (In reply to James Le Cuirot from comment #5) > (In reply to Alexei Kharitonov from comment #4) > > As I expected I couldn't reproduce compiler crash without ccache feature. I > > would propose to check $FEATURES for ccache flag and disable it for icedtea. > > It already warns about it right at the start. OpenJDK actually promotes > ccache despite the issues so we didn't want to disable it unconditionally. I wouldn't be so sure of that. I think a more accurate interpretation would be Oracle don't bother doing anything much with the build system in released versions. In 9, you'll find: changeset: 953:a757bcc8bbe4 user: ihse date: Wed Jan 29 11:04:37 2014 +0100 summary: 8027584: Disable ccache by default which includes - if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then - printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n" - printf "$CCACHE_HELP_MSG\n" - HELP_MSG_MISSING_DEPENDENCY([ccache]) - printf "$HELP_MSG\n" - printf "\n" - fi - I'm for disabling it FWIW. (In reply to Andrew John Hughes from comment #6) > (In reply to James Le Cuirot from comment #5) > > (In reply to Alexei Kharitonov from comment #4) > > > As I expected I couldn't reproduce compiler crash without ccache feature. I > > > would propose to check $FEATURES for ccache flag and disable it for icedtea. > > > > It already warns about it right at the start. OpenJDK actually promotes > > ccache despite the issues so we didn't want to disable it unconditionally. > > I wouldn't be so sure of that. I think a more accurate interpretation would > be Oracle don't bother doing anything much with the build system in released > versions. In 9, you'll find: > > changeset: 953:a757bcc8bbe4 > user: ihse > date: Wed Jan 29 11:04:37 2014 +0100 > summary: 8027584: Disable ccache by default > > which includes > > - if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = > "xno"; then > - printf "Build performance tip: ccache gives a tremendous speedup for > C++ recompilations.\n" > - printf "$CCACHE_HELP_MSG\n" > - HELP_MSG_MISSING_DEPENDENCY([ccache]) > - printf "$HELP_MSG\n" > - printf "\n" > - fi > - > > I'm for disabling it FWIW. Agree, otherwise bugs will be posted after every new version bump in tree. If it is evident that ccache forces the build process to fail and we know about it ahead, then I don't see printint warning message only as rational, even if it is a workaround and bug is hidden in compiler itself. *** Bug 609986 has been marked as a duplicate of this bug. *** Does it help to clean ccache? Will the ICE still occur afterwards on 2nd compilation while using new cache entries? The bug can be reproduced on my end with FEATURES=ccache USE=pch (in a profile in which "pch" isn't masked). The problem seems to be a conflict between icedtea's/openjdk's usage of ccache and Gentoo's. Openjdk does not support any ccache wrappers (see http://mail.openjdk.java.net/pipermail/build-dev/2016-February/016563.html). Testing with a modified ebuild showed that if FEATURES=ccache and USE=pch is set but "--disable-ccache" is passed to configure, the build succeeds. Similarly if FEATURES=-ccache and USE=pch is set, and "--enable-ccache" is passed to configure, the build succeeds. Hopefully someone else can confirm this. Maybe "--disable-ccache" should be unconditionally passed. AFAIK, portage's ccache wrappers still work fine. (In reply to Peter Levine from comment #10) > Similarly if FEATURES=-ccache and USE=pch is set, and "--enable-ccache" is > passed to configure, the build succeeds. Actually, this was a mistake. > Maybe "--disable-ccache" should be unconditionally passed. AFAIK, portage's > ccache wrappers still work fine. Nevermind. The cache isn't being generated when "--disable-ccache" is passed so it appears "--enable-ccache" is needed. The actual line causing the ICE is: CCACHE_COMPRESS=1 CCACHE_SLOPPINESS=time_macros /usr/bin/ccache /usr/bin/g++ -DLINUX -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/var/tmp/portage/dev-java/icedtea-3.7.0/work/icedtea-3.7.0/openjdk-boot/hotspot/src/share/vm/prims -I/var/tmp/portage/dev-java/icedtea-3.7.0/work/icedtea-3.7.0/openjdk-boot/hotspot/src/share/vm -I/var/tmp/portage/dev-java/icedtea-3.7.0/work/icedtea-3.7.0/openjdk-boot/hotspot/src/share/vm/precompiled -I/var/tmp/portage/dev-java/icedtea-3.7.0/work/icedtea-3.7.0/openjdk-boot/hotspot/src/cpu/x86/vm -I/var/tmp/portage/dev-java/icedtea-3.7.0/work/icedtea-3.7.0/openjdk-boot/hotspot/src/os_cpu/linux_x86/vm -I/var/tmp/portage/dev-java/icedtea-3.7.0/work/icedtea-3.7.0/openjdk-boot/hotspot/src/os/linux/vm -I/var/tmp/portage/dev-java/icedtea-3.7.0/work/icedtea-3.7.0/openjdk-boot/hotspot/src/os/posix/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"25.161-b12\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"portage\"" -DHOTSPOT_LIB_ARCH=\"amd64\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -DDERIVATIVE_ID="\"IcedTea 3.7.0\"" -DDISTRIBUTION_ID="\"Gentoo Base System release 2.4.1, package Gentoo icedtea-3.7.0\"" -march=skylake -O2 -pipe -DTARGET_OS_FAMILY_linux -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_linux_x86 -DTARGET_OS_ARCH_MODEL_linux_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -fvisibility=hidden -m64 -pipe -fno-strict-aliasing -g -fno-omit-frame-pointer -DTARGET_OS_FAMILY_linux -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_linux_x86 -DTARGET_OS_ARCH_MODEL_linux_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -fvisibility=hidden -m64 -pipe -fno-strict-aliasing -g -fno-omit-frame-pointer -O3 -DVM_LITTLE_ENDIAN -D_LP64=1 -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -march=skylake -O2 -pipe -fno-delete-null-pointer-checks -fno-lifetime-dse -std=gnu++98 -DDTRACE_ENABLED -c -MMD -MP -MF ../generated/dependencies/adaptiveFreeList.o.d -fpch-deps -o adaptiveFreeList.o /var/tmp/portage/dev-java/icedtea-3.7.0/work/icedtea-3.7.0/openjdk-boot/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/adaptiveFreeList.cpp From https://ccache.samba.org/manual.html#_precompiled_headers: > use the -include compiler option to include the precompiled header > (i.e., don’t use #include in the source code to include the header); If, after build failure, I move to the directory that the build failed in (`cd /var/tmp/portage/dev-java/icedtea-3.7.0/work/icedtea-3.7.0/openjdk.build-boot/hotspot/linux_amd64_compiler2/product`) and I add '-include /var/tmp/portage/dev-java/icedtea-3.7.0/work/icedtea-3.7.0/openjdk-boot/hotspot/src/share/vm/precompiled/precompiled.hpp' to the offending command line above, there is no ICE. *** Bug 658064 has been marked as a duplicate of this bug. *** The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d7a236e7ef784335d49acaba02ad4127df32377 commit 9d7a236e7ef784335d49acaba02ad4127df32377 Author: James Le Cuirot <chewi@gentoo.org> AuthorDate: 2018-06-28 22:13:20 +0000 Commit: James Le Cuirot <chewi@gentoo.org> CommitDate: 2018-06-28 22:13:20 +0000 dev-java/icedtea: Disable ccache unconditionally as it always breaks Closes: https://bugs.gentoo.org/624230 Package-Manager: Portage-2.3.41, Repoman-2.3.9 dev-java/icedtea/icedtea-3.8.0.ebuild | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) |