Installed f77blas.h fails to compile on develop: undefined OPENBLAS_API and OPENBLAS_EXPORT
Maintainer antworten meist innerhalb von 1 Tag
Ein zugehöriger Pull Request wurde bereits gemerged.
- #6116 von @martin-frbg — gemerged
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- c, cmake
- Bereich
- api, build-system
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- C
- Sterne
- 7.6k
- Forks
- 1.7k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 53
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus OpenMathLib/OpenBLAS
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
OpenMathLib/OpenBLAS#6119 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
openblas_set_threads_callback_function is a silent no-op on WindowsEvtl. vergeben @martin-frbg hat das vor 9 Tagen übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 43/100
OpenMathLib/OpenBLAS#6108 · 2 Kommentare · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
OpenMathLib/OpenBLAS#6104 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 58/100
OpenMathLib/OpenBLAS#6103 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
OpenMathLib/OpenBLAS#6102 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in OpenMathLib/OpenBLAS
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
OpenPrinting/cups#1772 ·
Maintainer antworten meist innerhalb von 1 Tag
-
tech-debt
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
antoxa2584x/nfsu2-sw#44 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag