Created attachment 686475 [details] emerge --info output It fails with if [ -n "`/usr/bin/x86_64-pc-linux-gnu-nm /var/tmp/portage/dev-java/openjdk-11.0.10_p9/work/jdk11u-jdk-11.0.10-ga/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/abstractCompiler.o | /bin/grep -e _ZdaPv -e _ZdlPv -e _Znam -e _Znwm | /bin/grep ' U '`" ]; then /bin/echo "/var/tmp/portage/dev-java/openjdk-11.0.10_p9/work/jdk11u-jdk-11.0.10-ga/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/abstractCompiler.o: Error: Use of global operators new and delete is not allowed in Hotspot:"; /usr/bin/x86_64-pc-linux-gnu-nm /var/tmp/portage/dev-java/openjdk-11.0.10_p9/work/jdk11u-jdk-11.0.10-ga/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/abstractCompiler.o | /usr/bin/x86_64-pc-linux-gnu-c++filt | /bin/grep -E '[^:]operator (new|delete)' | /bin/grep ' U '; /bin/echo "See: /var/tmp/portage/dev-java/openjdk-11.0.10_p9/work/jdk11u-jdk-11.0.10-ga/make/hotspot/lib/CompileJvm.gmk"; exit 1; fi
Unfortunately that's not the error, I'd ask for build.log but I imagine it's the same as in your report from last year that was missing the opposite bit of information (having both is useful). --- /var/tmp/portage/dev-java/openjdk-11.0.8_p10/work/jdk11u-jdk-11.0.8-ga/src/jdk.pack/share/native/common-unpack/constants.h:206:37: error: left operand of shift expression '(-1 << 13)' is negative [-fpermissive] 206 | AO_UNUSED_MBZ = (-1)<<13, // options bits reserved for future use. | ~~~~^~~~ /var/tmp/portage/dev-java/openjdk-11.0.8_p10/work/jdk11u-jdk-11.0.8-ga/src/jdk.pack/share/native/common-unpack/constants.h:206:39: error: enumerator value for 'AO_UNUSED_MBZ' is not an integer constant 206 | AO_UNUSED_MBZ = (-1)<<13, // options bits reserved for future use. --- Looking at your CXXFLAGS that's caused by -std=c++17 (can reproduce), so try removing it. I don't recommend to set this globally. This would normally cause failure with gcc11 as well (which uses c++17 by default) but the problem is that option is being overridden: -std=gnu++98 -m64 -march=native -O2 -std=c++17 Guess(?) ebuild could strip the option if fixing this is wanted.
(In reply to Ionen Wolkens from comment #1) > Unfortunately that's not the error, I'd ask for build.log but I imagine it's > the same as in your report from last year that was missing the opposite bit > of information (having both is useful). > > --- > /var/tmp/portage/dev-java/openjdk-11.0.8_p10/work/jdk11u-jdk-11.0.8-ga/src/ > jdk.pack/share/native/common-unpack/constants.h:206:37: error: left operand > of shift expression '(-1 << 13)' is negative [-fpermissive] > 206 | AO_UNUSED_MBZ = (-1)<<13, // options bits reserved > for future use. > | ~~~~^~~~ > /var/tmp/portage/dev-java/openjdk-11.0.8_p10/work/jdk11u-jdk-11.0.8-ga/src/ > jdk.pack/share/native/common-unpack/constants.h:206:39: error: enumerator > value for 'AO_UNUSED_MBZ' is not an integer constant > 206 | AO_UNUSED_MBZ = (-1)<<13, // options bits reserved > for future use. > --- > > Looking at your CXXFLAGS that's caused by -std=c++17 (can reproduce), so try > removing it. I don't recommend to set this globally. > > This would normally cause failure with gcc11 as well (which uses c++17 by > default) but the problem is that option is being overridden: > -std=gnu++98 -m64 -march=native -O2 -std=c++17 > > Guess(?) ebuild could strip the option if fixing this is wanted. Yes, thanks, it was the C++17 flag. C++20 is ante portas.
Yes, it would make sense for the ebuild to strip this flag. 11u is a legacy JDK and I don't see us accepting patches to make the code work with C++ standards that are little older than the JDK itself (11u was released on 2018-09-25)
Leaving this open for maintainers to decide instead.
those flags are not supposed to be set by users. project determines standard it adheres to, not user. I don't think we should filter that flag either, it's incorrect configuration, can't prevent all of it. closing. please do not use -std in CXXFLAGS =)