Configuration fails while compiling BoringSSL
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C++
- Star
- 492
- Fork
- 130
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện cấu hình CMake với GCC 15.2.1 và kiểm tra cách Hunter build dependency BoringSSL, đặc biệt là lỗi internal.h được báo cáo và các warning flags. Được xem là hoàn tất khi project configure thành công mà không gặp lỗi discarded-qualifiers.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cmake, cpp
- Lĩnh vực
- build-system
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100