Installed f77blas.h fails to compile on develop: undefined OPENBLAS_API and OPENBLAS_EXPORT
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #6116 của @martin-frbg — đã merge
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- c, cmake
- Lĩnh vực
- api, build-system
Hướng nghiên cứu
Start by reproducing the failure: install the library and compile the one-line test.c against the installed headers with gcc. The header is generated in Makefile.install and the CMake path from common_interface.h and openblas_config.h, so compare that with how cblas.h already strips OPENBLAS_EXPORT. Done means the installed f77blas.h compiles cleanly on both build paths. Where OPENBLAS_API and OPENBLAS_EXPORT come from is in common.h and exports.h.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
On develop (b366de2d66111344cd867576810ad71651674b9e), the installed f77blas.h fails to compile on its own:
#include <f77blas.h>
int main(void) { return 0; }
gcc -c -I"$PREFIX/include" test.c
With GCC 15.2 this gives 887 errors. The first is at the direct OPENBLAS_EXPORT declaration:
f77blas.h:52:16: error: expected ‘;’ before ‘void’
The following declarations then produce errors such as:
f77blas.h:59:11: error: ‘OPENBLAS_API’ declared as function returning a function
cblas.h on its own compiles.
Makefile.install generates f77blas.h by including openblas_config.h and copying common_interface.h verbatim. The CMake generation path does the same when f77blas.h is enabled.
common_interface.h contains both OPENBLAS_API(name) declarations and a direct OPENBLAS_EXPORT on openblas_set_num_threads_. However, the installed openblas_config.h defines neither macro. Internally, common.h supplies OPENBLAS_API, while exports.h supplies OPENBLAS_EXPORT.
The OPENBLAS_API conversion came from da494a58 ("windows needs declaration to match definition"), merged through #5577. v0.3.34 predates that merge; its common_interface.h uses neither annotation.
The installed header needs handling for both macros in both generation paths. An OPENBLAS_API alias alone still leaves the direct OPENBLAS_EXPORT declaration unresolved. The existing cblas.h generation already removes OPENBLAS_EXPORT; analogous handling for f77blas.h, or suitable public macro definitions, may be appropriate.
Observed after make TARGET=NEOVERSEN1 DYNAMIC_ARCH=0 NO_FORTRAN=1 and installation on aarch64 Linux with GCC 15.2. The CMake path was checked by source inspection. Found with AI assistance.
- Ngôn ngữ chính
- C
- Star
- 7.6k
- Fork
- 1.7k
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 53
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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.
Issue khác của OpenMathLib/OpenBLAS
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
OpenMathLib/OpenBLAS#6119 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
openblas_set_threads_callback_function is a silent no-op on WindowsCó thể đã có người làm @martin-frbg đã nhận 9 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 43/100
OpenMathLib/OpenBLAS#6108 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
OpenMathLib/OpenBLAS#6104 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
OpenMathLib/OpenBLAS#6103 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
OpenMathLib/OpenBLAS#6102 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của OpenMathLib/OpenBLAS
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
OpenPrinting/cups#1772 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
snowballstem/snowball#311 ·
-
tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100