https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115107
--- Comment #14 from anlauf at gcc dot gnu.org --- (In reply to Natalie Perlin from comment #9) > All rebuilt, gnu/14.1.0 with openmpi/4.1.6, revised configuration of the > software stack (spack-stack). Still the same error with > [-Wimplicit-function-declaration]. > > Verified a build of the same stack with gnu/13.2.0 and openmpi/4.1.6. The > same location in the code gives warning, instead of the error, during the > build. Same package, different version of gcc. Please see below snippets of > the builds: > > 1. Build with gnu/13.2.0 gives the following: > ----------------------- > ... > /scratch2/NCEPDEV/stmp1/role.epic/spack-stack/spack-stack-1.6.0/spack/lib/ > spack/env/gcc/gcc -DHAVE_CONFIG_H -I. -I. > -I../../../src/libjasper/include/jasper -I../../../src/libjasper/include -g > -O2 -MT jas_getopt.lo -MD -MP -MF .deps/jas_getopt.Tpo -c jas_getopt.c -o > jas_getopt.o > jas_getopt.c: In function 'jas_getopt': > jas_getopt.c:129:49: warning: implicit declaration of function > 'jas_eprintf'; did you mean 'vsnprintf'? [-Wimplicit-function-declaration] > 129 | jas_eprintf("unknown > long option %s\n", s); > | ^~~~~~~~~~~ > | vsnprintf > ... > ----------------------- > > 2. Build with gnu/14.1.0 gives the following: > ----------------------- > ... > /scratch2/NCEPDEV/stmp1/role.epic/spack-stack/spack-stack-1.6.0_gnu14/spack/ > lib/spack/env/gcc/gcc -DHAVE_CONFIG_H -I. -I. > -I../../../src/libjasper/include/jasper -I../../../src/libjasper/include -g > -O2 -MT jas_getopt.lo -MD -MP -MF .deps/jas_getopt.Tpo -c jas_getopt.c -o > jas_getopt.o > jas_getopt.c: In function 'jas_getopt': > jas_getopt.c:129:49: error: implicit declaration of function 'jas_eprintf'; > did you mean 'vsnprintf'? [-Wimplicit-function-declaration] > 129 | jas_eprintf("unknown > long option %s\n", s); > | ^~~~~~~~~~~ > | vsnprintf > make[4]: *** [Makefile:349: jas_getopt.lo] Error 1 > ... > ----------------------- > > Any suggestions?.. The original jasper files look fine to me: https://github.com/jasper-software/jasper/blob/master/src/libjasper/base/jas_getopt.c which includes https://github.com/jasper-software/jasper/blob/master/src/libjasper/include/jasper/jas_debug.h Looks like spack either does not generate proper include paths, or a bad include file is found. > Has a version of gnu/13.3.0 become available that might have the ICE fix?.. See https://gcc.gnu.org/gcc-13/ .