Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Installed f77blas.h fails to compile on develop: undefined OPENBLAS_API and OPENBLAS_EXPORT

Chiusa
#6,112 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #6116 di @martin-frbg — integrata

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c, cmake
Ambito
api, build-system

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C
Stelle
7.6k
Fork
1.7k
Merge medio
1g 19h
PR unite (30g)
53

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenMathLib/OpenBLAS

Tutte le issue di OpenMathLib/OpenBLAS

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.