Configuration fails while compiling BoringSSL
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 492
- フォーク
- 130
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Summary
Cmake fails to configure the build (GCC 15.2) due to a compilation error during BoringSSL:
make[3]: warning: -j8 forced in submake: resetting jobserver mode.
In file included from /xxx/.hunter/_Base/15ca502/2341084/9613f97/Build/BoringSSL/Source/crypto/fipsmodule/bcm.c:31:
/xxx/.hunter/_Base/15ca502/2341084/9613f97/Build/BoringSSL/Source/crypto/fipsmodule/../internal.h: In function ‘OPENSSL_memchr’:
/xxx/.hunter/_Base/15ca502/2341084/9613f97/Build/BoringSSL/Source/crypto/fipsmodule/../internal.h:1027:10: error: return discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
1027 | return memchr(s, c, n);
| ^~~~~~
cc1: all warnings being treated as errors
make[5]: *** [CMakeFiles/fipsmodule.dir/build.make:79: CMakeFiles/fipsmodule.dir/crypto/fipsmodule/bcm.c.o] Error 1
This is GCC 15.2.1, which defaults to gnu23, which imposes memchr() and others should return const pointers when passed arguments are const -- then compilation fails due to -Werror.
Expected behavior
The project would configure without problems.
Actual behavior
The project doesn't configure properly.
Relevant log output
make[3]: warning: -j8 forced in submake: resetting jobserver mode.
In file included from /xxx/.hunter/_Base/15ca502/2341084/9613f97/Build/BoringSSL/Source/crypto/fipsmodule/bcm.c:31:
/xxx/.hunter/_Base/15ca502/2341084/9613f97/Build/BoringSSL/Source/crypto/fipsmodule/../internal.h: In function ‘OPENSSL_memchr’:
/xxx/.hunter/_Base/15ca502/2341084/9613f97/Build/BoringSSL/Source/crypto/fipsmodule/../internal.h:1027:10: error: return discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
1027 | return memchr(s, c, n);
| ^~~~~~
cc1: all warnings being treated as errors
make[5]: *** [CMakeFiles/fipsmodule.dir/build.make:79: CMakeFiles/fipsmodule.dir/crypto/fipsmodule/bcm.c.o] Error 1
Possible Solution
The proper solution is BoringSSL upstream fixing their codebase to C23; or upstream properly setting -std=c17 or whatever they're using; or simply removing -Werror=discarded-qualifiers.
A workaround is to set -Wno-error=discarded-qualifiers during the build of this particular dependency, but I'm not sure how to do it with this Hunter thing. Any help is appreciated.
Version
v0.1.37
Would you like to work on fixing this bug ?
Maybe
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
GCC 15.2.1 を使用して CMake 構成を再現し、Hunter が BoringSSL 依存関係をどのようにビルドするかを調査します。特に、報告されている internal.h の失敗と warning flags を確認します。プロジェクトが discarded-qualifiers エラーなしで正常に構成できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cmake, cpp
- 領域
- build-system
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100