Describe the bug
I configure JDK with a high-version GCC in my aarch64 environment, which is
* C Compiler: Version 12.3.1 (at /usr/bin/gcc)
* C++ Compiler: Version 12.3.1 (at /usr/bin/g++)
However, it shows a build fail with error infos below:
In file included from /usr/include/features.h:503,
from /usr/include/bits/libc-header-start.h:33,
from /usr/include/stdint.h:26,
from /usr/lib/gcc/aarch64-openEuler-linux/12/include/stdint.h:9,
from /home/jihaodi/jeandle-jdk/src/hotspot/share/utilities/debug.hpp:34,
from /home/jihaodi/jeandle-jdk/src/hotspot/share/memory/allocation.hpp:29,
from /home/jihaodi/jeandle-jdk/src/hotspot/share/classfile/classLoaderData.hpp:28,
from /home/jihaodi/jeandle-jdk/src/hotspot/share/precompiled/precompiled.hpp:34:
In function 'ssize_t read(int, void*, size_t)',
inlined from 'bool read_fully(const char*, char*, size_t)' at /home/jihaodi/jeandle-jdk/src/hotspot/os_cpu/linux_aarch64/vm_version_linux_aarch64.cpp:188:29,
inlined from 'static void VM_Version::get_compatible_board(char*, int)' at /home/jihaodi/jeandle-jdk/src/hotspot/os_cpu/linux_aarch64/vm_version_linux_aarch64.cpp:218:19:
/usr/include/bits/unistd.h:28:10: error: argument 2 is null but the corresponding size argument 3 value is [1, 18446744073709551615] [-Werror=nonnull]
28 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
/usr/include/bits/unistd-decl.h: In static member function 'static void VM_Version::get_compatible_board(char*, int)':
/usr/include/bits/unistd-decl.h:29:16: note: in a call to function 'ssize_t __read_alias(int, void*, size_t)' declared with attribute 'access (write_only, 2, 3)'
29 | extern ssize_t __REDIRECT_FORTIFY (__read_alias, (int __fd, void *__buf,
| ^~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option '-Wno-template-id-cdtor' may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
gmake[3]: *** [lib/CompileJvm.gmk:161: /home/jihaodi/jeandle-jdk/build/linux-aarch64-server-fastdebug/hotspot/variant-server/libjvm/objs/vm_version_linux_aarch64.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
I also try GCC 10, that is OK.
Minimal reproduce steps
AArch64 build in GCC version >= 12 (maybe).
Expected behavior
Build successfully.
Additional context
This is not a jeandle's bug, maybe a known issue in JDK bug system:
https://bugs.openjdk.org/browse/JDK-8339331
Describe the bug
I configure JDK with a high-version GCC in my aarch64 environment, which is
However, it shows a build fail with error infos below:
I also try GCC 10, that is OK.
Minimal reproduce steps
AArch64 build in GCC version >= 12 (maybe).
Expected behavior
Build successfully.
Additional context
This is not a jeandle's bug, maybe a known issue in JDK bug system:
https://bugs.openjdk.org/browse/JDK-8339331