编译OpenJDK8:specified bound depends on the length of the source argument

简介: 编译OpenJDK8:specified bound depends on the length of the source argument

详细错误如下:


/home/tsrj/tsjdk8-project/tsjdk8-252/hotspot/src/share/vm/runtime/arguments.cpp: In static member function ‘static void Arguments::fix_appclasspath()’:
/home/tsrj/tsjdk8-project/tsjdk8-252/hotspot/src/share/vm/runtime/arguments.cpp:3459:12: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
     strncpy(copy, src, strlen(src) + 1);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~

 代码看起来没问题,所以去掉报错即可:


make/linux/makefiles/gcc.make:204


注释掉WARNINGS_ARE_ERRORS = -Werror

目录
相关文章
CMake Error: The source “xxx“ does not match the source “yyy“ used to generate cache. Re-run cmake
CMake Error: The source “xxx“ does not match the source “yyy“ used to generate cache. Re-run cmake
914 0
|
6月前
|
人工智能 机器人 测试技术
【CMake报错】Cannot specify compile definitions for target “PRIVATE“ which is not built...
【CMake报错】Cannot specify compile definitions for target “PRIVATE“ which is not built...
|
6月前
|
Java Android开发 Kotlin
@JvmDefault is only supported since JVM target 1.8. Recompile with '-jvm-target 1.8’
@JvmDefault is only supported since JVM target 1.8. Recompile with '-jvm-target 1.8’
43 5
|
6月前
target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target S
target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target S
100 0
|
6月前
|
Java
No tag [else] defined in tag library imported with prefix [c]] with root cause
No tag [else] defined in tag library imported with prefix [c]] with root cause 错误处理
49 0
关于 CMake编译出出现错误“Could not find compiler set in environment variable RC:” 的解决方法
关于 CMake编译出出现错误“Could not find compiler set in environment variable RC:” 的解决方法
关于 CMake编译出出现错误“Could not find compiler set in environment variable RC:” 的解决方法
|
Ubuntu C语言
【ubuntu】2.c:(.text+0xd2): undefined reference to `pthread_create‘ collect2: error: ld returned
【ubuntu】2.c:(.text+0xd2): undefined reference to `pthread_create‘ collect2: error: ld returned
144 0
编译OpenJDK11:configure: error: Target CPU mismatch. We are building for x86_64 but CL is for “版“; exp
编译OpenJDK11:configure: error: Target CPU mismatch. We are building for x86_64 but CL is for “版“; exp
170 0
|
C++
编译OpenJDK11:fixpath Unknown argument: -nologo
编译OpenJDK11:fixpath Unknown argument: -nologo
120 0
java中出现Syntax error, annotations are only available if source level is 1.5 or greater
java中出现Syntax error, annotations are only available if source level is 1.5 or greater
java中出现Syntax error, annotations are only available if source level is 1.5 or greater