GNU bug report logs -
#78960
VPATH build fails
Previous Next
Reported by: Bruno Haible <bruno <at> clisp.org>
Date: Sat, 5 Jul 2025 10:00:02 UTC
Severity: normal
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#78960: VPATH build fails
which was filed against the coreutils package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 78960 <at> debbugs.gnu.org.
--
78960: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78960
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
On 05/07/2025 10:59, Bruno Haible via GNU coreutils Bug Reports wrote:
> Hi,
>
> The coreutils CI build part that does a "make distcheck" today fails,
> whereas on 2025-06-30 it succeeded [1].
>
> The problem can be reproduced as follows:
>
> 1)
> $ ./bootstrap --no-git --gnulib-srcdir=$GNULIB_SRCDIR
> $ ./configure
> $ make
> $ make dist
>
> 2)
> Unpack the tarball, cd into its directory.
>
> 3)
> $ mkdir bb
> $ cd bb
> $ ../configure
> $ make V=1
> ...
> depbase=`echo src/pinky.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> gcc -I. -I.. -I./lib -Ilib -I../lib -Isrc -I../src -g -O2 -MT src/pinky.o -MD -MP -MF $depbase.Tpo -c -o src/pinky.o ../src/pinky.c &&\
> mv -f $depbase.Tpo $depbase.Po
> gcc -g -O2 -Wl,--as-needed -o src/pinky src/pinky.o src/libver.a lib/libcoreutils.a lib/libcoreutils.a
> rm -f src/speedlist.h
> /arch/local/x86_64-linux/bin/mkdir -p src
> ( for opt in -dM -xdumpmacros -qshowmacros -PD; do \
> gcc -I. -I.. -I./lib -Ilib -I../lib -Isrc -I../src -g -O2 -E $opt ../src/termios.c 2>&1 && break; \
> done ) | /bin/bash ../src/speedgen src/speedlist.ht
> chmod a-w src/speedlist.ht
> mv src/speedlist.ht src/speedlist.h
> depbase=`echo src/stty.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> gcc -I. -I.. -I./lib -Ilib -I../lib -Isrc -I../src -g -O2 -MT src/stty.o -MD -MP -MF $depbase.Tpo -c -o src/stty.o src/stty.c &&\
> mv -f $depbase.Tpo $depbase.Po
> cc1: fatal error: src/stty.c: No such file or directory
> compilation terminated.
> make[2]: *** [Makefile:13092: src/stty.o] Error 1
> make[2]: Leaving directory '/COREUTILS/coreutils/coreutils-20250411/bb'
> make[1]: *** [Makefile:23441: all-recursive] Error 1
> make[1]: Leaving directory '/COREUTILS/coreutils/coreutils-20250411/bb'
> make: *** [Makefile:9356: all] Error 2
>
> Comparing the compilation commands for pinky.c and stty.c, you can see
> that ../src/pinky.c and src/stty.c are referenced. But in a VPATH build,
> src/stty.c does not exist.
>
> This is caused by commit 017fc50bb6797ac2d71e46fef8f559acb0f44c5d.
> If I locally revert this commit, "make V=1" succeeds.
>
> Bruno
>
> [1] https://github.com/coreutils/ci-check/actions
I did test a VPATH build from `make dist`,
but only a parallel build with `make -j4`, which does pass.
I pushed the following which passes both types of builds here.
Marking this as done.
cheers,
Padraig
diff --git a/src/local.mk b/src/local.mk
index 537032578..fb763c4db 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -708,7 +708,7 @@ src/version.h: Makefile
# -PD: MSVC (usable with a wrapper such as cccl from the SWIG project)
getmacopts = -dM -xdumpmacros -qshowmacros -PD
-CLEANFILES += src/speedlist.h
+BUILT_SOURCES += src/speedlist.h
src/speedlist.h: src/termios.c lib/config.h src/speedgen
$(AM_V_GEN)rm -f $@
$(AM_V_at)${MKDIR_P} src
@@ -718,8 +718,6 @@ src/speedlist.h: src/termios.c lib/config.h src/speedgen
$(AM_V_at)chmod a-w $@t
$(AM_V_at)mv $@t $@
-src/stty.c: src/speedlist.h
-
# Generates a list of macro invocations like:
# SINGLE_BINARY_PROGRAM(program_name_str, main_name)
# once for each program list on $(single_binary_progs). Note that
[Message part 3 (message/rfc822, inline)]
Hi,
The coreutils CI build part that does a "make distcheck" today fails,
whereas on 2025-06-30 it succeeded [1].
The problem can be reproduced as follows:
1)
$ ./bootstrap --no-git --gnulib-srcdir=$GNULIB_SRCDIR
$ ./configure
$ make
$ make dist
2)
Unpack the tarball, cd into its directory.
3)
$ mkdir bb
$ cd bb
$ ../configure
$ make V=1
...
depbase=`echo src/pinky.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -I. -I.. -I./lib -Ilib -I../lib -Isrc -I../src -g -O2 -MT src/pinky.o -MD -MP -MF $depbase.Tpo -c -o src/pinky.o ../src/pinky.c &&\
mv -f $depbase.Tpo $depbase.Po
gcc -g -O2 -Wl,--as-needed -o src/pinky src/pinky.o src/libver.a lib/libcoreutils.a lib/libcoreutils.a
rm -f src/speedlist.h
/arch/local/x86_64-linux/bin/mkdir -p src
( for opt in -dM -xdumpmacros -qshowmacros -PD; do \
gcc -I. -I.. -I./lib -Ilib -I../lib -Isrc -I../src -g -O2 -E $opt ../src/termios.c 2>&1 && break; \
done ) | /bin/bash ../src/speedgen src/speedlist.ht
chmod a-w src/speedlist.ht
mv src/speedlist.ht src/speedlist.h
depbase=`echo src/stty.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -I. -I.. -I./lib -Ilib -I../lib -Isrc -I../src -g -O2 -MT src/stty.o -MD -MP -MF $depbase.Tpo -c -o src/stty.o src/stty.c &&\
mv -f $depbase.Tpo $depbase.Po
cc1: fatal error: src/stty.c: No such file or directory
compilation terminated.
make[2]: *** [Makefile:13092: src/stty.o] Error 1
make[2]: Leaving directory '/COREUTILS/coreutils/coreutils-20250411/bb'
make[1]: *** [Makefile:23441: all-recursive] Error 1
make[1]: Leaving directory '/COREUTILS/coreutils/coreutils-20250411/bb'
make: *** [Makefile:9356: all] Error 2
Comparing the compilation commands for pinky.c and stty.c, you can see
that ../src/pinky.c and src/stty.c are referenced. But in a VPATH build,
src/stty.c does not exist.
This is caused by commit 017fc50bb6797ac2d71e46fef8f559acb0f44c5d.
If I locally revert this commit, "make V=1" succeeds.
Bruno
[1] https://github.com/coreutils/ci-check/actions
This bug report was last modified 5 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.