https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114895
Bug ID: 114895 Summary: Build failure with !HAVE_WORKING_STAT Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- [31724s] libtool: compile: /home/abuild/rpmbuild/BUILD/gcc-14.0.1+git9885/obj-x86_64-suse-linux/./gcc/xgcc -B/home/abuild/rpmbuild/BUILD/gcc-14.0.1+git9885/obj-x86_64-suse-linux/./gcc/ -B/usr/x86_64-suse-linux/bin/ -B/usr/x86_64-suse-linux/lib/ -isystem /usr/x86_64-suse-linux/include -isystem /usr/x86_64-suse-linux/sys-include -DHAVE_CONFIG_H -I. -I../../../../libgfortran -iquote../../../../libgfortran/io -I../../../../libgfortran/../gcc -I../../../../libgfortran/../gcc/config -I../../.././gcc -I../../../../libgfortran/../libgcc -I../../libgcc -I../../../../libgfortran/../libbacktrace -I../../libbacktrace -I../libbacktrace -std=gnu11 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -Werror=implicit-function-declaration -Werror=vla -fcf-protection -mshstk -fcx-fortran-rules -ffunction-sections -fdata-sections -g -O2 -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -m32 -MT unix.lo -MD -MP -MF .deps/unix.Tpo -c ../../../../libgfortran/io/unix.c -fPIC -DPIC -o .libs/unix.o [31724s] ../../../../libgfortran/io/unix.c: In function ‘find_file’: [31724s] ../../../../libgfortran/io/unix.c:1704:26: error: ‘id’ undeclared (first use in this function) [31724s] 1704 | # define FIND_FILE0_ARGS id, path [31724s] | ^~ [31724s] ../../../../libgfortran/io/unix.c:1778:30: note: in expansion of macro ‘FIND_FILE0_ARGS’ [31724s] 1778 | u = find_file0 (unit_root, FIND_FILE0_ARGS); [31724s] | ^~~~~~~~~~~~~~~ [31724s] ../../../../libgfortran/io/unix.c:1704:26: note: each undeclared identifier is reported only once for each function it appears in [31724s] 1704 | # define FIND_FILE0_ARGS id, path [31724s] | ^~ [31724s] ../../../../libgfortran/io/unix.c:1778:30: note: in expansion of macro ‘FIND_FILE0_ARGS’ [31724s] 1778 | u = find_file0 (unit_root, FIND_FILE0_ARGS); [31724s] | ^~~~~~~~~~~~~~~ [31724s] make[6]: *** [Makefile:6863: unix.lo] Error 1 which is because find_file does #if defined(__MINGW32__) && !HAVE_WORKING_STAT id = id_from_path (path); #endif RDLOCK (&unit_rwlock); retry: u = find_file0 (unit_root, FIND_FILE0_ARGS); so as long as __MINGW32__ is not defined this won't work. The fix might be to remove the __MINGW32__ part of the conditional. (and no, I didn't yet know how we arrived at !HAVE_WORKING_STAT - this is on x86_64 linux, but with a -j1 build - see https://bugzilla.suse.com/show_bug.cgi?id=1223169)