Blosc / Blosc/python-blosc2

Build fails to pass `-std=c99` flag: `blosc2.h: error: ‘for’ loop initial declaration used outside C99 mode`

Offen
#320 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
211
Forks
58
Ø Merge
1 T. 17 Std.
Gemergte PRs (30 T.)
6

Beschreibung

`blosc2` itself sets `-std=gnu99` in its own CMakeLists, however those are not used by `py-blosc2` when external `blosc2` is linked against. So the flag is not passed, but it is required:

```
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_python_py-blosc2/py311-blosc2/work/blosc2-2.5.1/_skbuild/macosx-10.6-ppc-3.11/cmake-build/blosc2/blosc2_ext.c:1253:
/opt/local/include/blosc2.h: In function ‘blosc2_meta_exists’:
/opt/local/include/blosc2.h:2162: error: ‘for’ loop initial declaration used outside C99 mode
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Inspect the py-blosc2 CMake configuration used when an external blosc2 is linked, then reproduce the failure in blosc2_ext.c with the external blosc2.h. Done when that configuration supplies the required C99 mode and the external-blosc2 build completes without the reported error.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
c, cmake, python
Bereich
build-system
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
38/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.