rui314 / mold

Mold: A Modern Linker 🦠
MIT License
13.69k stars 448 forks source link

mold fails to build on Debian sid on most of the archs (`error: implicit declaration of function`) #1279

Open sylvestre opened 3 weeks ago

sylvestre commented 3 weeks ago

I am aware that it is in thirdparty code but mold is failing to build on most of Debian architectures with gcc 13 with:


In file included from /<<PKGBUILDDIR>>/third-party/mimalloc/src/prim/prim.c:25:
/<<PKGBUILDDIR>>/third-party/mimalloc/src/prim/unix/prim.c: In function ‘_mi_prim_getenv’:
/<<PKGBUILDDIR>>/third-party/mimalloc/src/prim/unix/prim.c:737:19: error: implicit declaration of function ‘getenv’ [-Werror=implicit-function-declaration]
  737 |   const char* s = getenv(name);
      |                   ^~~~~~
/<<PKGBUILDDIR>>/third-party/mimalloc/src/prim/unix/prim.c:618:1: note: ‘getenv’ is defined in header ‘<stdlib.h>’; did you forget to ‘#include <stdlib.h>’?

See https://buildd.debian.org/status/package.php?p=mold