Installed f77blas.h fails to compile on develop: undefined OPENBLAS_API and OPENBLAS_EXPORT
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
- #6116 来自 @martin-frbg —— 已合并
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- c, cmake
- 领域
- api, build-system
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- C
- 星标
- 7.6k
- 派生
- 1.7k
- 平均合并
- 1 天 13 小时
- 30 天内合并 PR
- 37
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenMathLib/OpenBLAS 的其他 Issue
-
openblas_set_threads_callback_function is a silent no-op on Windows可能已有人在做 @martin-frbg 于 10 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 43/100
OpenMathLib/OpenBLAS#6108 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
OpenMathLib/OpenBLAS#6104 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 58/100
OpenMathLib/OpenBLAS#6103 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 52/100
OpenMathLib/OpenBLAS#6102 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 65/100
OpenMathLib/OpenBLAS#6100 · 2 条评论 ·
维护者通常 1 天内回复
查看 OpenMathLib/OpenBLAS 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
FujiNetWIFI/fujinet-firmware#2079 ·
维护者通常 1 天内回复
-
bug Official Image release/25.12 Supported Device target/kirkwood
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
area/archive bug
难度 2/5 1-3 小时 新手友好度 76/100
DarkFlippers/qUnleashed#374 ·
维护者通常 1 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 84/100
VirusTotal/yara#2255 ·
-
难度 2/5 1-3 小时 新手友好度 66/100