adoptium / temurin-build

Eclipse Temurin™ build scripts - common across all releases/versions
Apache License 2.0
1.02k stars 249 forks source link

Build fails with errors when using GCC 8 #1081

Closed victornoel closed 4 years ago

victornoel commented 5 years ago

Platform: linux

Architecture: x86_64

I'm on latest Archlinux.

I tried to build the jdk11u with ./makejdk-any-platform.sh jdk11u but I got the following error:

/home/victor/Tools/openjdk-build/workspace/build/src/src/hotspot/share/adlc/dfa.cpp: In member function ‘const char* Expr::compute_external(const Expr*, const Expr*)’:
/home/victor/Tools/openjdk-build/workspace/build/src/src/hotspot/share/adlc/dfa.cpp:724:14: error: ‘char* strncat(char*, const char*, size_t)’ specified bound 2048 equals destination size [-Werror=stringop-overflow=]
       strncat(string_buffer, "+", STRING_BUFFER_LENGTH);
       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/victor/Tools/openjdk-build/workspace/build/src/src/hotspot/share/adlc/dfa.cpp:732:14: error: ‘char* strncat(char*, const char*, size_t)’ specified bound 2048 equals destination size [-Werror=stringop-overflow=]
       strncat(string_buffer, " + ", STRING_BUFFER_LENGTH);
       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/victor/Tools/openjdk-build/workspace/build/src/src/hotspot/share/adlc/dfa.cpp: In member function ‘const char* Expr::compute_expr(const Expr*, const Expr*)’:
/home/victor/Tools/openjdk-build/workspace/build/src/src/hotspot/share/adlc/dfa.cpp:746:14: error: ‘char* strncat(char*, const char*, size_t)’ specified bound 2048 equals destination size [-Werror=stringop-overflow=]
       strncat(string_buffer, "+", STRING_BUFFER_LENGTH);
       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There is one particularity, I changed the following because I'm experimenting with debug builds:

diff --git a/sbin/build.sh b/sbin/build.sh
index a17082d..736b7ec 100755
--- a/sbin/build.sh
+++ b/sbin/build.sh
@@ -257,8 +257,8 @@ buildingTheRestOfTheConfigParameters()
     addConfigureArg "--disable-zip-debug-info" ""
     addConfigureArg "--disable-debug-symbols" ""
   else
-    addConfigureArg "--with-debug-level=" "release"
-    addConfigureArg "--with-native-debug-symbols=" "none"
+    addConfigureArg "--with-debug-level=" "fastdebug"
+    addConfigureArg "--with-native-debug-symbols=" "external"
   fi
 }
karianna commented 5 years ago

@victornoel So the error only occurs with?:

addConfigureArg "--with-debug-level=" "fastdebug"
addConfigureArg "--with-native-debug-symbols=" "external"
victornoel commented 5 years ago

@karianna no, sorry, my comment was misleading, it has nothing to do with those changes.

I suppose it could be related to the version of GCC used on the host? Because I've seen this issue: https://bugs.openjdk.java.net/browse/JDK-8214444

victornoel commented 5 years ago

@karianna I suppose the "easy" solution would be to make the docker-based build work again (and for jdk11) so that the build can happen with a controlled environment instead of the host?

karianna commented 5 years ago

Ah yes, that's probably right - what's the output from the build script WRT to the GCC compiler version? Output should be at the top

victornoel commented 5 years ago

@karianna here it is:

configure: Using gcc C compiler version 8.3.0 [gcc (GCC) 8.3.0]
configure: Using gcc C++ compiler version 8.3.0 [g++ (GCC) 8.3.0]
karianna commented 5 years ago

Hmm, that's a very new GCC - I suspect that https://bugs.openjdk.java.net/browse/JDK-8214444 will need to get backported.

M-Davies commented 4 years ago

Hi @victornoel . It looks like this did get backported to 11 recently:

Could you try again with one of our newer binaries?

victornoel commented 4 years ago

@M-Davies so just to be clear, I'm building from the repository, not using one of the adoptopenjdk binaries :)

I tried again and now here are the errors I get:


ERROR: Build failed for targets 'product-images legacy-jre-image test-image' in configuration 'linux-x86_64-normal-server-fastdebug' (exit code 2) 

=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_objs_classLoader.o:
/home/victor/code/openjdk-build/workspace/build/src/src/hotspot/share/classfile/classLoader.cpp: In static member function 'static void ClassLoader::compile_the_world_in(char*, Handle, Thread*)':
/home/victor/code/openjdk-build/workspace/build/src/src/hotspot/share/classfile/classLoader.cpp:2040:12: error: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
 2040 |     strncpy(buffer, name, len - 6);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/home/victor/code/openjdk-build/workspace/build/src/src/hotspot/share/classfile/classLoader.cpp:173:26: note: length computed here
  173 |   size_t str_len = strlen(str);
      |                    ~~~~~~^~~~~
cc1plus: all warnings being treated as errors

* All command lines available in /home/victor/code/openjdk-build/workspace/build/src/build/linux-x86_64-normal-server-fastdebug/make-support/failure-logs.
=== End of repeated output ===

Btw I'm now using gcc 10.1.

karianna commented 4 years ago

@victornoel Can you send the output at the top of the run (where we set all of the configurations)

victornoel commented 4 years ago

@karianna is this it:

tarting ./makejdk-any-platform.sh to configure, build (Adopt)OpenJDK binary
Working dir is ./build/
[debug] COPY_MACOSX_FREE_FONT_LIB_FOR_JDK_FLAG=false
[debug] COPY_MACOSX_FREE_FONT_LIB_FOR_JRE_FLAG=false
JDK Image folder name: jdk
JRE Image folder name: jre
Searching for JDK_BOOT_DIR
Guessing JDK_BOOT_DIR: /usr/lib/jvm/java-11-openjdk
If this is incorrect explicitly configure JDK_BOOT_DIR
Boot dir set to /usr/lib/jvm/java-11-openjdk
# ============================
# OPENJDK BUILD CONFIGURATION:
# ============================
BUILD_CONFIG[ADOPT_PATCHES]="true"
BUILD_CONFIG[BRANCH]="dev"
BUILD_CONFIG[BUILD_FULL_NAME]="linux-x86_64--server-release"
BUILD_CONFIG[BUILD_VARIANT]="hotspot"
BUILD_CONFIG[CLEAN_DOCKER_BUILD]="false"
BUILD_CONFIG[CLEAN_GIT_REPO]="false"
BUILD_CONFIG[CLEAN_LIBS]="false"
BUILD_CONFIG[CONFIGURE_ARGS_FOR_ANY_PLATFORM]=""
BUILD_CONFIG[CONTAINER_NAME]="openjdk_container"
BUILD_CONFIG[COPY_MACOSX_FREE_FONT_LIB_FOR_JDK_FLAG]="false"
BUILD_CONFIG[COPY_MACOSX_FREE_FONT_LIB_FOR_JRE_FLAG]="false"
BUILD_CONFIG[DEBUG_DOCKER]="false"
BUILD_CONFIG[DEBUG_IMAGE_PATH]="debug-image"
BUILD_CONFIG[DISABLE_ADOPT_BRANCH_SAFETY]="false"
BUILD_CONFIG[DOCKER]="docker"
BUILD_CONFIG[DOCKER_FILE_PATH]=""
BUILD_CONFIG[DOCKER_SOURCE_VOLUME_NAME]="openjdk-source-volume-jdk11u-hotspot"
BUILD_CONFIG[FREETYPE]="true"
BUILD_CONFIG[FREETYPE_DIRECTORY]=""
BUILD_CONFIG[FREETYPE_FONT_BUILD_TYPE_PARAM]=""
BUILD_CONFIG[FREETYPE_FONT_VERSION]="2.9.1"
BUILD_CONFIG[JDK_BOOT_DIR]="/usr/lib/jvm/java-11-openjdk"
BUILD_CONFIG[JDK_PATH]="jdk"
BUILD_CONFIG[JRE_PATH]="jre"
BUILD_CONFIG[JVM_VARIANT]="server"
BUILD_CONFIG[KEEP_CONTAINER]="false"
BUILD_CONFIG[MACOSX_CODESIGN_IDENTITY]=""
BUILD_CONFIG[MAKE_ARGS_FOR_ANY_PLATFORM]="product-images legacy-jre-image"
BUILD_CONFIG[MAKE_COMMAND_NAME]="make"
BUILD_CONFIG[NUM_PROCESSORS]="1"
BUILD_CONFIG[OPENJDK_BUILD_NUMBER]=""
BUILD_CONFIG[OPENJDK_CORE_VERSION]="jdk11"
BUILD_CONFIG[OPENJDK_FEATURE_NUMBER]="11"
BUILD_CONFIG[OPENJDK_FOREST_NAME]="jdk11u"
BUILD_CONFIG[OPENJDK_SOURCE_DIR]="src"
BUILD_CONFIG[OPENJDK_UPDATE_VERSION]=""
BUILD_CONFIG[OS_ARCHITECTURE]="x86_64"
BUILD_CONFIG[OS_KERNEL_NAME]="linux"
BUILD_CONFIG[PATCHES]=""
BUILD_CONFIG[RELEASE]="false"
BUILD_CONFIG[REPOSITORY]="https://github.com/adoptopenjdk/openjdk-jdk11u"
BUILD_CONFIG[REUSE_CONTAINER]="true"
BUILD_CONFIG[SHALLOW_CLONE_OPTION]="--depth=1"
BUILD_CONFIG[SIGN]="false"
BUILD_CONFIG[TAG]=""
BUILD_CONFIG[TARGET_DIR]="target/"
BUILD_CONFIG[TARGET_FILE_NAME]="OpenJDK.tar.gz"
BUILD_CONFIG[TEST_IMAGE_PATH]="test"
BUILD_CONFIG[TMP_CONTAINER_NAME]="openjdk-copy-src"
BUILD_CONFIG[TMP_SPACE_BUILD]="false"
BUILD_CONFIG[USER_SUPPLIED_CONFIGURE_ARGS]=""
BUILD_CONFIG[USER_SUPPLIED_MAKE_ARGS]=""
BUILD_CONFIG[USE_DOCKER]="false"
BUILD_CONFIG[USE_JEP319_CERTS]="false"
BUILD_CONFIG[USE_SSH]="false"
BUILD_CONFIG[WORKING_DIR]="./build/"

There is also not long after that:

configure: WARNING: you should use --build, --host, --target
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.24... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... gawk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for windres... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking size of int... 4
checking size of long... 8
checking for unsigned long long int... yes
checking for long long int... yes
checking whether cpp computation of bit length in ftconfig.in works... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking whether munmap is declared... yes
checking for munmap's first parameter type... void *
checking for memcpy... yes
checking for memmove... yes
checking gcc compiler flag -pedantic to assure ANSI C works correctly... ok, adding to XX_ANSIFLAGS
checking gcc compiler flag -ansi to assure ANSI C works correctly... ok, adding to XX_ANSIFLAGS
checking for -fvisibility=hidden compiler flag... yes
checking for ZLIB... yes
checking for BZIP2... no
checking for BZ2_bzDecompress in -lbz2... yes
checking bzlib.h usability... yes
checking bzlib.h presence... yes
checking for bzlib.h... yes
checking for HARFBUZZ... yes
checking for library containing clock_gettime... none required
configure: creating ./config.status
config.status: creating ftoption.h
config.status: creating unix-cc.mk
config.status: creating unix-def.mk
config.status: creating ftconfig.h
config.status: executing libtool commands
configure:

Library configuration:
  external zlib: yes (pkg-config)
  bzip2:         yes (autoconf test)
  libpng:        no
  harfbuzz:      yes (pkg-config)

and later, I think after the openjdk source tree is retrieved and before the errors appears:

OpenJDK repo tag is jdk-11.0.8+1
Completed configuring the version string parameter, config args are now:  --with-milestone=fcs --with-version-opt=202005241613 --without-version-pre --with-version-build=1 --with-vendor-version-string=AdoptOpenJDK --with-vendor-url=https://adoptopenjdk.net/ --with-vendor-name=AdoptOpenJDK --with-vendor-bug-url=https://github.com/AdoptOpenJDK/openjdk-support/issues --with-vendor-vm-bug-url=https://github.com/AdoptOpenJDK/openjdk-support/issues
Building up the configure command...
which: no ccache in (/home/victor/.gem/ruby/2.7.0/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
Configuring jvm variants if provided
setting freetype dir to bundled
Completed configuring the version string parameter, config args are now:  --with-milestone=fcs --with-version-opt=202005241613 --without-version-pre --with-version-build=1 --with-vendor-version-string=AdoptOpenJDK --with-vendor-url=https://adoptopenjdk.net/ --with-vendor-name=AdoptOpenJDK --with-vendor-bug-url=https://github.com/AdoptOpenJDK/openjdk-support/issues --with-vendor-vm-bug-url=https://github.com/AdoptOpenJDK/openjdk-support/issues --with-boot-jdk=/usr/lib/jvm/java-11-openjdk --with-debug-level=release --with-native-debug-symbols=none --with-jvm-variants=server  --with-freetype=bundled
Configuring command and using the pre-built config params...
Should have the source, I'm at /home/victor/openjdk-build/workspace/build/src
Currently at '/home/victor/openjdk-build/workspace/build/src'
Running ./configure with arguments 'bash ./configure --verbose  --with-milestone=fcs --with-version-opt=202005241613 --without-version-pre --with-version-build=1 --with-vendor-version-string=AdoptOpenJDK --with-vendor-url=https://adoptopenjdk.net/ --with-vendor-name=AdoptOpenJDK --with-vendor-bug-url=https://github.com/AdoptOpenJDK/openjdk-support/issues --with-vendor-vm-bug-url=https://github.com/AdoptOpenJDK/openjdk-support/issues --with-boot-jdk=/usr/lib/jvm/java-11-openjdk --with-debug-level=release --with-native-debug-symbols=none --with-jvm-variants=server  --with-freetype=bundled '
Should have the source, I'm at /home/victor/openjdk-build/workspace/build/src
Currently at '/home/victor/openjdk-build/workspace/build/src'
Runnable configure script is not present
Generating runnable configure script at /home/victor/openjdk-build/workspace/build/src/build/.configure-support/generated-configure.sh
Using autoconf at /usr/bin/autoconf [autoconf (GNU Autoconf) 2.69]
configure: Configuration created at Sun May 24 18:13:30 CEST 2020.
checking for basename... /usr/bin/basename
checking for bash... /usr/bin/bash
checking for cat... /usr/bin/cat
checking for chmod... /usr/bin/chmod
checking for cmp... /usr/bin/cmp
checking for comm... /usr/bin/comm
checking for cp... /usr/bin/cp
checking for cut... /usr/bin/cut
checking for date... /usr/bin/date
checking for gdiff... no
checking for diff... /usr/bin/diff
checking for dirname... /usr/bin/dirname
checking for echo... /usr/bin/echo
checking for expr... /usr/bin/expr
checking for file... /usr/bin/file
checking for find... /usr/bin/find
checking for head... /usr/bin/head
checking for gunzip... /usr/bin/gunzip
checking for pigz... no
checking for gzip... /usr/bin/gzip
checking for ln... /usr/bin/ln
checking for ls... /usr/bin/ls
checking for mkdir... /usr/bin/mkdir
checking for mktemp... /usr/bin/mktemp
checking for mv... /usr/bin/mv
checking for nawk... no
checking for gawk... /usr/bin/gawk
checking for printf... /usr/bin/printf
checking for greadlink... no
checking for readlink... /usr/bin/readlink
checking for rm... /usr/bin/rm
checking for rmdir... /usr/bin/rmdir
checking for sh... /usr/bin/sh
checking for sort... /usr/bin/sort
checking for tail... /usr/bin/tail
checking for gtar... no
checking for tar... /usr/bin/tar
checking for tee... /usr/bin/tee
checking for touch... /usr/bin/touch
checking for tr... /usr/bin/tr
checking for uname... /usr/bin/uname
checking for uniq... /usr/bin/uniq
checking for wc... /usr/bin/wc
checking for which... /usr/bin/which
checking for xargs... /usr/bin/xargs
checking for gawk... gawk
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for a sed that does not truncate output... /usr/bin/sed
checking for cygpath... no
checking for df... /usr/bin/df
checking for cpio... no
checking for bsdcpio... /usr/bin/bsdcpio
checking for nice... /usr/bin/nice
checking for pandoc... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking openjdk-build os-cpu... linux-x86_64
checking openjdk-target os-cpu... linux-x86_64
checking compilation type... native
checking for top-level directory... /home/victor/openjdk-build/workspace/build/src
checking if custom source is suppressed (openjdk-only)... no
checking which variant of the JDK to build... normal
checking which debug level to use... release
checking which variants of the JVM to build... server
checking if absolute paths should be allowed in the build output... no, release build
checking for sysroot... 
checking for toolchain path... 
checking for extra path... 
checking where to store configuration... in default location
checking what configuration name to use... linux-x86_64-normal-server-release
checking for apt-get... no
checking for yum... no
checking for brew... no
checking for port... no
checking for pkgutil... no
checking for pkgadd... no
checking for gmake... no
checking for make... /usr/bin/make
configure: Testing potential make at /usr/bin/make, found using make in PATH
configure: Using GNU make at /usr/bin/make (version: GNU Make 4.3)
checking if make --output-sync is supported... yes
checking for output-sync value... none
checking if find supports -delete... yes
checking what type of tar was found... gnu
checking that grep (/usr/bin/grep) -Fx handles empty lines in the pattern list correctly... yes
checking for unzip... /usr/bin/unzip
checking for zip... /usr/bin/zip
checking for ldd... /usr/bin/ldd
checking for greadelf... no
checking for readelf... /usr/bin/readelf
checking for dot... /usr/bin/dot
configure: WARNING: Ignoring value of HG from the environment. Use command line variables instead.
checking for hg... /usr/bin/hg
checking for git... /usr/bin/git
checking for stat... /usr/bin/stat
checking for time... no
checking for flock... /usr/bin/flock
checking for dtrace... no
checking for gpatch... no
checking for patch... /usr/bin/patch
checking bash version... 5.0.16
checking if bash supports pipefail... yes
checking if bash supports errexit (-e)... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for default LOG value... 
checking headless only... no
checking for graphviz dot... yes
checking for pandoc... no, cannot generate full docs
checking full docs... no, missing dependencies
checking for cacerts file... default
checking if packaged modules are kept... yes (default)
configure: WARNING: Option --with-milestone is deprecated and will be ignored.
checking for version string... 11.0.8+1-202005241613
configure: Found potential Boot JDK using configure arguments
checking for Boot JDK... /usr/lib/jvm/java-11-openjdk
checking Boot JDK version... openjdk version "11.0.6" 2020-01-14 OpenJDK Runtime Environment (build 11.0.6+10) OpenJDK 64-Bit Server VM (build 11.0.6+10, mixed mode) 
checking for java in Boot JDK... ok
checking for javac in Boot JDK... ok
checking for javadoc in Boot JDK... ok
checking for jar in Boot JDK... ok
checking for jarsigner in Boot JDK... ok
checking if Boot JDK is 32 or 64 bits... 64
checking for local Boot JDK Class Data Sharing (CDS)... yes, created
checking for Build JDK... yes, will use output dir
configure: Using default toolchain gcc (GNU Compiler Collection)
checking for gcc... /usr/bin/gcc
checking resolved symbolic links for CC... no symlink
configure: Using gcc C compiler version 10.1.0 [gcc (GCC) 10.1.0]
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/gcc accepts -g... yes
checking for /usr/bin/gcc option to accept ISO C89... none needed
checking for g++... /usr/bin/g++
checking resolved symbolic links for CXX... no symlink
configure: Using gcc C++ compiler version 10.1.0 [g++ (GCC) 10.1.0]
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/g++ accepts -g... yes
checking how to run the C preprocessor... /usr/bin/gcc -E
checking how to run the C++ preprocessor... /usr/bin/g++ -E
checking for ld... ld
configure: Rewriting LD_JAOTC to "/usr/bin/ld"
configure: Using gcc linker version 2.34.0 [GNU ld (GNU Binutils) 2.34.0]
checking for ar... ar
configure: Rewriting AR to "/usr/bin/ar"
checking for strip... strip
configure: Rewriting STRIP to "/usr/bin/strip"
checking for nm... nm
configure: Rewriting NM to "/usr/bin/nm"
checking for gobjcopy... no
checking for objcopy... objcopy
configure: Rewriting OBJCOPY to "/usr/bin/objcopy"
checking for gobjdump... no
checking for objdump... objdump
configure: Rewriting OBJDUMP to "/usr/bin/objdump"
checking for c++filt... c++filt
configure: Rewriting CXXFILT to "/usr/bin/c++filt"
checking for jtreg... no
checking for jtreg test harness... no, not found
checking for jib... no
checking if @file is supported by gcc... yes
checking if CC supports "-m64"... yes
checking if CXX supports "-m64"... yes
checking if both CC and CXX support "-m64"... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking size of int *... 8
checking for target address size... 64 bits
checking whether byte ordering is bigendian... no
checking if native warnings are errors... true (default)
checking if CC supports "-Xassembler -mrelax-relocations=no"... yes
checking if CXX supports "-Xassembler -mrelax-relocations=no"... yes
checking if both CC and CXX support "-Xassembler -mrelax-relocations=no"... yes
checking for library containing clock_gettime... none required
checking if CXX supports "-std=gnu++98 -Werror"... yes
checking if CC supports "-fno-delete-null-pointer-checks -Werror"... yes
checking if CXX supports "-fno-delete-null-pointer-checks -Werror"... yes
checking if both CC and CXX support "-fno-delete-null-pointer-checks -Werror"... yes
checking if CC supports "-fno-lifetime-dse -Werror"... yes
checking if CXX supports "-fno-lifetime-dse -Werror"... yes
checking if both CC and CXX support "-fno-lifetime-dse -Werror"... yes
checking if CC supports "-fmacro-prefix-map=/home/victor/openjdk-build/workspace/build/src/="... yes
checking if CXX supports "-fmacro-prefix-map=/home/victor/openjdk-build/workspace/build/src/="... yes
checking if both CC and CXX support "-fmacro-prefix-map=/home/victor/openjdk-build/workspace/build/src/="... yes
checking if CC supports "-ffp-contract=off"... yes
checking if CXX supports "-ffp-contract=off"... yes
checking if both CC and CXX support "-ffp-contract=off"... yes
checking if BUILD_CXX supports "-std=gnu++98 -Werror"... yes
checking if BUILD_CC supports "-fno-delete-null-pointer-checks -Werror"... yes
checking if BUILD_CXX supports "-fno-delete-null-pointer-checks -Werror"... yes
checking if both BUILD_CC and BUILD_CXX support "-fno-delete-null-pointer-checks -Werror"... yes
checking if BUILD_CC supports "-fno-lifetime-dse -Werror"... yes
checking if BUILD_CXX supports "-fno-lifetime-dse -Werror"... yes
checking if both BUILD_CC and BUILD_CXX support "-fno-lifetime-dse -Werror"... yes
checking if BUILD_CC supports "-fmacro-prefix-map=/home/victor/openjdk-build/workspace/build/src/="... yes
checking if BUILD_CXX supports "-fmacro-prefix-map=/home/victor/openjdk-build/workspace/build/src/="... yes
checking if both BUILD_CC and BUILD_CXX support "-fmacro-prefix-map=/home/victor/openjdk-build/workspace/build/src/="... yes
checking if BUILD_CC supports "-ffp-contract=off"... yes
checking if BUILD_CXX supports "-ffp-contract=off"... yes
checking if both BUILD_CC and BUILD_CXX support "-ffp-contract=off"... yes
checking what type of native debug symbols to use... none
checking if we should add external native debug symbols to the shipped bundles... no
checking for dtrace tool... not found, cannot build dtrace
checking sys/sdt.h usability... yes
checking sys/sdt.h presence... yes
checking for sys/sdt.h... yes
checking if dtrace should be built... no, missing dependencies
checking if Hotspot gtest unit tests should be built... yes
checking if static link of stdc++ is possible... yes
checking how to link with libstdc++... static
checking for X... libraries , headers 
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for X11/extensions/shape.h... yes
checking for X11/extensions/Xrender.h... yes
checking for X11/extensions/XTest.h... yes
checking for X11/Intrinsic.h... yes
checking for X11/extensions/Xrandr.h... yes
checking if XlinearGradient is defined in Xrender.h... yes
checking cups/cups.h usability... yes
checking cups/cups.h presence... yes
checking for cups/cups.h... yes
checking cups/ppd.h usability... yes
checking cups/ppd.h presence... yes
checking for cups/ppd.h... yes
checking fontconfig/fontconfig.h usability... yes
checking fontconfig/fontconfig.h presence... yes
checking for fontconfig/fontconfig.h... yes
Using freetype: bundled
checking for ALSA... yes
checking for which libjpeg to use... bundled
checking for which giflib to use... bundled
checking for PNG... yes
checking for which libpng to use... bundled
checking for compress in -lz... yes
checking for which zlib to use... system
checking for system zlib functionality... ok
checking for which lcms to use... bundled
checking for cos in -lm... yes
checking for dlopen in -ldl... yes
checking if zgc can be built... yes
checking if jvmci module jdk.internal.vm.ci should be built... yes
checking if graal module jdk.internal.vm.compiler should be built... yes
checking if aot should be enabled... yes
checking if cds should be enabled... yes
checking if elliptic curve crypto implementation is present... yes
checking if jtreg failure handler should be built... no, missing jtreg
checking if the CDS classlist generation should be enabled... yes
checking if any translations should be excluded... no
checking if man pages should be built... yes
checking for number of cores... 4
checking for memory size... 7864 MB
checking for appropriate number of jobs to run in parallel... 4
checking flags for boot jdk java command ...  -Duser.language=en -Duser.country=US  -XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=/home/victor/openjdk-build/workspace/build/src/build/linux-x86_64-normal-server-release/configure-support/classes.jsa -Xshare:auto 
checking flags for boot jdk java command for big workloads...  -Xms64M -Xmx1600M -XX:ThreadStackSize=1536
checking flags for bootcycle boot jdk java command for big workloads... -Xms64M -Xmx1600M -XX:ThreadStackSize=1536
checking flags for boot jdk java command for small workloads...  -XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1
checking whether to use sjavac... no
checking whether to use javac server... yes
checking If precompiled header is enabled... yes
checking that precompiled headers work... yes
checking is ccache enabled... no
checking if build directory is on local disk... yes
checking JVM features for JVM variant 'server'... "aot cds cmsgc compiler1 compiler2 epsilongc g1gc graal jfr jni-check jvmci jvmti management nmt parallelgc serialgc services vm-structs zgc"
configure: creating /home/victor/openjdk-build/workspace/build/src/build/linux-x86_64-normal-server-release/configure-support/config.status
config.status: creating /home/victor/openjdk-build/workspace/build/src/build/linux-x86_64-normal-server-release/spec.gmk
config.status: creating /home/victor/openjdk-build/workspace/build/src/build/linux-x86_64-normal-server-release/bootcycle-spec.gmk
config.status: creating /home/victor/openjdk-build/workspace/build/src/build/linux-x86_64-normal-server-release/buildjdk-spec.gmk
config.status: creating /home/victor/openjdk-build/workspace/build/src/build/linux-x86_64-normal-server-release/compare.sh
config.status: creating /home/victor/openjdk-build/workspace/build/src/build/linux-x86_64-normal-server-release/Makefile

====================================================
A new configuration has been successfully created in
/home/victor/openjdk-build/workspace/build/src/build/linux-x86_64-normal-server-release
using configure arguments '--verbose --with-milestone=fcs --with-version-opt=202005241613 --without-version-pre --with-version-build=1 --with-vendor-version-string=AdoptOpenJDK --with-vendor-url=https://adoptopenjdk.net/ --with-vendor-name=AdoptOpenJDK --with-vendor-bug-url=https://github.com/AdoptOpenJDK/openjdk-support/issues --with-vendor-vm-bug-url=https://github.com/AdoptOpenJDK/openjdk-support/issues --with-boot-jdk=/usr/lib/jvm/java-11-openjdk --with-debug-level=release --with-native-debug-symbols=none --with-jvm-variants=server --with-freetype=bundled'.

Configuration summary:
* Debug level:    release
* HS debug level: product
* JVM variants:   server
* JVM features:   server: 'aot cds cmsgc compiler1 compiler2 epsilongc g1gc graal jfr jni-check jvmci jvmti management nmt parallelgc serialgc services vm-structs zgc' 
* OpenJDK target: OS: linux, CPU architecture: x86, address length: 64
* Version string: 11.0.8+1-202005241613 (11.0.8)

Tools summary:
* Boot JDK:       openjdk version "11.0.6" 2020-01-14 OpenJDK Runtime Environment (build 11.0.6+10) OpenJDK 64-Bit Server VM (build 11.0.6+10, mixed mode)  (at /usr/lib/jvm/java-11-openjdk)
* Toolchain:      gcc (GNU Compiler Collection)
* C Compiler:     Version 10.1.0 (at /usr/bin/gcc)
* C++ Compiler:   Version 10.1.0 (at /usr/bin/g++)

Build performance summary:
* Cores to use:   4
* Memory limit:   7864 MB

The following warnings were produced. Repeated here for convenience:
WARNING: Ignoring value of HG from the environment. Use command line variables instead.
WARNING: Option --with-milestone is deprecated and will be ignored.
victornoel commented 4 years ago

ah, actually, I re-ran everything without changing the options to have fastdebug ,and now I got this error which is different than the previous one:

Compiling 8 files for jdk.unsupported.desktop
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/home/victor/openjdk-build/workspace/build/src/src/hotspot/os/linux/osContainer_linux.cpp: In static member function 'static jlong OSContainer::read_memory_limit_in_bytes()':
/home/victor/openjdk-build/workspace/build/src/src/hotspot/os/linux/osContainer_linux.cpp:482:22: error: deprecated conversion from string constant to 'char*' [-Werror=write-strings]
  482 |       char* format = "%s " JULONG_FORMAT;
/home/victor/openjdk-build/workspace/build/src/src/hotspot/os/linux/osContainer_linux.cpp: In static member function 'static jlong OSContainer::memory_and_swap_limit_in_bytes()':
/home/victor/openjdk-build/workspace/build/src/src/hotspot/os/linux/osContainer_linux.cpp:505:22: error: deprecated conversion from string constant to 'char*' [-Werror=write-strings]
  505 |       char* format = "%s " JULONG_FORMAT;
cc1plus: all warnings being treated as errors
make[3]: *** [lib/CompileJvm.gmk:153: /home/victor/openjdk-build/workspace/build/src/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/osContainer_linux.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [make/Main.gmk:276: hotspot-server-libs] Error 2

ERROR: Build failed for targets 'product-images legacy-jre-image test-image' in configuration 'linux-x86_64-normal-server-release' (exit code 2) 

=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_objs_osContainer_linux.o:
/home/victor/openjdk-build/workspace/build/src/src/hotspot/os/linux/osContainer_linux.cpp: In static member function 'static jlong OSContainer::read_memory_limit_in_bytes()':
/home/victor/openjdk-build/workspace/build/src/src/hotspot/os/linux/osContainer_linux.cpp:482:22: error: deprecated conversion from string constant to 'char*' [-Werror=write-strings]
  482 |       char* format = "%s " JULONG_FORMAT;
/home/victor/openjdk-build/workspace/build/src/src/hotspot/os/linux/osContainer_linux.cpp: In static member function 'static jlong OSContainer::memory_and_swap_limit_in_bytes()':
/home/victor/openjdk-build/workspace/build/src/src/hotspot/os/linux/osContainer_linux.cpp:505:22: error: deprecated conversion from string constant to 'char*' [-Werror=write-strings]
  505 |       char* format = "%s " JULONG_FORMAT;
cc1plus: all warnings being treated as errors

* All command lines available in /home/victor/openjdk-build/workspace/build/src/build/linux-x86_64-normal-server-release/make-support/failure-logs.
=== End of repeated output ===

No indication of failed target found.
Hint: Try searching the build log for '] Error'.
Hint: See doc/building.html#troubleshooting for assistance.

make[1]: *** [/home/victor/openjdk-build/workspace/build/src/make/Init.gmk:305: main] Error 2
make: *** [/home/victor/openjdk-build/workspace/build/src/make/Init.gmk:186: product-images] Error 2
karianna commented 4 years ago

Ah, try passing through --configure-args --disable-warnings-as-errors as a parameter to the makejdk-any-platform.sh (I may have the syntax wrong there)

victornoel commented 4 years ago

@karianna ok, let me close this issue because it's really a problem that can only be tackled by the openjdk project. thanks for the idea to disable warnings