build: native build fails with GCC 15 (ubuntu-26.04): implicit fopen64 in vendored ioapi.c
Los mantenedores suelen responder en 1 día
@kalwalt ya está trabajando en esto.
Desde el 17/11/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Summary
The native build fails with GCC 15. GitHub's ubuntu-latest now runs ubuntu-26.04 with GCC 15.2.0, and there lib/SRC/ARUtil/ioapi.c no longer compiles. #117 pins the test job to ubuntu-24.04 as a stopgap. This issue is for the real fix: make the native build work with GCC 15 without touching lib/SRC/**, which CONTRIBUTING keeps unmodified, by adding a compile definition in the build system.
The errors
From run 44119363224 (#116), job build, step "Build and test WebARKitLib":
lib/SRC/ARUtil/ioapi.c:144:16: error: implicit declaration of function ‘fopen64’; did you mean ‘fopen’? [-Wimplicit-function-declaration]
lib/SRC/ARUtil/ioapi.c:144:14: error: assignment to ‘FILE *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
lib/SRC/ARUtil/ioapi.c:240:11: error: implicit declaration of function ‘ftello64’; did you mean ‘ftello’? [-Wimplicit-function-declaration]
lib/SRC/ARUtil/ioapi.c:298:9: error: implicit declaration of function ‘fseeko64’; did you mean ‘fseeko’? [-Wimplicit-function-declaration]
make[2]: *** [.../WebARKitNFT.dir/.../lib/SRC/ARUtil/ioapi.c.o] Error 1
The two runs compared
| Run | Branch | Image | Compiler | Result |
|---|---|---|---|---|
| 40030611008 | dev |
ubuntu-24.04 |
GNU 13.3.0 | green |
| 44119363224 | feat/115-external-detector (#116) |
ubuntu-26.04 |
GNU 15.2.0 | fails in ioapi.c |
The failure has nothing to do with #116. Any push to ubuntu-latest hits it.
Why it happens
ioapi.hdefines_GNU_SOURCEunder__linux, so that glibc declares the*64functions.- But
ioapi.cincludes<stdlib.h>and<string.h>beforeioapi.h. By the time_GNU_SOURCEis defined, glibc's feature macros are already fixed, sofopen64,ftello64andfseeko64are never declared. - GCC 13 accepted the implicit declarations with a warning. Since GCC 14,
-Wimplicit-function-declarationand-Wint-conversionare errors by default in C.
Possible fixes (build system only)
Either definition would go on the minizip sources (ioapi.c, unzip.c, zip.c), or on the whole WebARKitNFT target, in WebARKit/WebARKitTrackers/WebARKitNFT/CMakeLists.txt:
USE_FILE32API. The Emscripten build already sets it on exactly these three files.ioapi.hthen mapsfopen64/ftello64/fseeko64tofopen/ftell/fseek. The cost is 32-bit file offsets in minizip; probably irrelevant for marker archives, but worth confirming._LARGEFILE64_SOURCE, passed on the command line so it applies before any system header. glibc then declares the*64functions and the code keeps 64-bit offsets._GNU_SOURCE, passed on the command line. This is whatioapi.halready tries to do. Its define only comes too late becauseioapi.cincludes<stdlib.h>first, so-D_GNU_SOURCEfrom the build system is the closest to what the header intended. It also enables the other GNU extensions for whichever files it is applied to.
Whichever is chosen, CI should go back to ubuntu-latest, or move to a pinned ubuntu-26.04, once the build is green on GCC 15.
Scope: open-ended
The build stopped at ioapi.c, so nothing compiled after it has been tried with GCC 15. The jump from GCC 13 to 15 may surface more errors than these:
- elsewhere in the vendored C sources;
- in the OpenCV-based
WebARKitLibtarget; - in the tests.
A pinned ubuntu-26.04 job, or a local GCC 15 build, is the way to find the full list before deciding on the fix.
Related: #117 (the stopgap pin), #116 (where the failure first showed up).
- Lenguaje dominante
- C++
- Estrellas
- 21
- Forks
- 8
- Merge medio
- 3 h 42 min
- PR fusionados (30 d)
- 22
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de webarkit/WebARKitLib
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
webarkit/WebARKitLib#131 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
webarkit/WebARKitLib#114 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 93/100
webarkit/WebARKitLib#107 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
webarkit/WebARKitLib#130 ·
Los mantenedores suelen responder en 1 día
-
feat(nft): let a consumer supply its own NFTDetectorPosiblemente ocupada @kalwalt la tomó hace 6 días. AbiertoC/C++ code documentation Emscripten enhancement
webarkit/WebARKitLib#115 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de webarkit/WebARKitLib
Issues similares
-
bug fixed form parser medium priority tokenizer
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
compatibility prio:normal
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NatronGitHub/openfx-misc#320 ·
Los mantenedores suelen responder en 1 día
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client areaPosiblemente ocupada @lijy91 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
libnativeapi/nativeapi#53 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día
-
agent-ready area:analysis bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
pauljohanneskraft/Acai#609 ·
Los mantenedores suelen responder en 10 días