为什么警告会导致 openJDK-11 构建崩溃?

发布于 2025-01-12 18:11:52 字数 2491 浏览 4 评论 0原文

我需要

git clone --depth 1 --branch jdk-11+28 https://github.com/openjdk/jdk.git

在 aarm64 NAME="Simply Linux", VERSION="9.1 (Destiny)" 上

构建以下 openJDK我运行:

    bash ./configure
    make images > make.log

它失败并出现以下错误 (make.log)

Building target 'images' in configuration 'linux-aarch64-normal-server-release'
    Warning: No mercurial configuration present and no .src-rev
    Compiling 117 files for BUILD_java.compiler.interim
    Compiling 394 files for BUILD_jdk.compiler.interim
    Compiling 299 files for BUILD_jdk.javadoc.interim
    
    ERROR: Build failed for target 'images' in configuration 'linux-aarch64-normal-server-release' (exit code 2) 
    
    === Output from failing command(s) repeated here ===
    * For target hotspot_variant-server_tools_adlc_objs_dfa.o:
    /home/user/jdk/src/hotspot/share/adlc/dfa.cpp: In member function ‘const char* Expr::compute_external(const Expr*, const Expr*)’:
    /home/user/jdk/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/user/jdk/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/user/jdk/src/hotspot/share/adlc/dfa.cpp: In member function ‘const char* Expr::compute_expr(const Expr*, const Expr*)’:
    /home/user/jdk/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);
           ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1plus: all warnings being treated as errors
    
    * All command lines available in /home/user/jdk/build/linux-aarch64-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.

我做错了什么? 在哪里可以提交有关 openjdk11 的错误报告,或者讨论这个问题?

I need to build following openJDK

git clone --depth 1 --branch jdk-11+28 https://github.com/openjdk/jdk.git

on aarm64 NAME="Simply Linux", VERSION="9.1 (Destiny)"

For that I run:

    bash ./configure
    make images > make.log

And it fails with following error (make.log)

Building target 'images' in configuration 'linux-aarch64-normal-server-release'
    Warning: No mercurial configuration present and no .src-rev
    Compiling 117 files for BUILD_java.compiler.interim
    Compiling 394 files for BUILD_jdk.compiler.interim
    Compiling 299 files for BUILD_jdk.javadoc.interim
    
    ERROR: Build failed for target 'images' in configuration 'linux-aarch64-normal-server-release' (exit code 2) 
    
    === Output from failing command(s) repeated here ===
    * For target hotspot_variant-server_tools_adlc_objs_dfa.o:
    /home/user/jdk/src/hotspot/share/adlc/dfa.cpp: In member function ‘const char* Expr::compute_external(const Expr*, const Expr*)’:
    /home/user/jdk/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/user/jdk/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/user/jdk/src/hotspot/share/adlc/dfa.cpp: In member function ‘const char* Expr::compute_expr(const Expr*, const Expr*)’:
    /home/user/jdk/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);
           ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1plus: all warnings being treated as errors
    
    * All command lines available in /home/user/jdk/build/linux-aarch64-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.

What am I doing wrong?
Where can I submit a bug report about openjdk11, or discuss this issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文