[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fix build failure during "make distcheck"
From: |
Bruno Haible |
Subject: |
fix build failure during "make distcheck" |
Date: |
Fri, 17 Jul 2020 19:17:32 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-179-generic; KDE/5.18.0; x86_64; ; ) |
Hi,
There is currently a build failure during "make distcheck":
Making check in testsuite
make[2]: Entering directory '/POKE/poke/poke-0.1-beta/_build/sub/testsuite'
Making check in poke.libpoke
make[3]: Entering directory
'/POKE/poke/poke-0.1-beta/_build/sub/testsuite/poke.libpoke'
make values
make[4]: Entering directory
'/POKE/poke/poke-0.1-beta/_build/sub/testsuite/poke.libpoke'
/bin/bash ../../libtool --tag=CC --mode=link gcc -g -O2 -o values
values-values.o ../../gl/libgnu.la ../../libpoke/libpoke.la
libtool: link: gcc -g -O2 -o .libs/values values-values.o
../../gl/.libs/libgnu.a -lreadline ../../libpoke/.libs/libpoke.so
-L/POKE/poke/poke-0.1-beta/_build/sub/jitter/lib -lgc -pthread -Wl,-rpath
-Wl,/POKE/poke/poke-0.1-beta/_inst/lib
gcc: error: values-values.o: No such file or directory
make[4]: *** [Makefile:1764: values] Error 1
make[4]: Leaving directory
'/POKE/poke/poke-0.1-beta/_build/sub/testsuite/poke.libpoke'
make[3]: *** [Makefile:1907: check-am] Error 2
make[3]: Leaving directory
'/POKE/poke/poke-0.1-beta/_build/sub/testsuite/poke.libpoke'
make[2]: *** [Makefile:1773: check-recursive] Error 1
make[2]: Leaving directory '/POKE/poke/poke-0.1-beta/_build/sub/testsuite'
What happens is that
1) Because testsuite/Makefile.am defines EXTRA_DIST to contain the
directory(!)
poke.libpoke, the distribution tarball contains all files of this
directory.
2) Since my initial build is a build in srcdir, it contains also the
values-values.o file. Look:
$ tar tf poke-0.1-beta.tar.gz |grep '\.o$'
poke-0.1-beta/testsuite/poke.libpoke/values-values.o
poke-0.1-beta/testsuite/poke.mi-json/mi_json-mi-json.o
$ tar tf poke-0.1-beta.tar.gz |grep '\.libs'
poke-0.1-beta/testsuite/poke.libpoke/.libs/
poke-0.1-beta/testsuite/poke.libpoke/.libs/lt-values
poke-0.1-beta/testsuite/poke.libpoke/.libs/values
poke-0.1-beta/testsuite/poke.mi-json/.libs/
3) "make distcheck" executes a VPATH build. It finds the values-values.o file
already present in the srcdir, therefore does not build it in the builddir.
The link command line then fails.
There are three possible fixes to this situations:
(a) List only individual files in EXTRA_DIST. Enumerate them! Then you don't
need to worry about garbage files (editor backups, core dumps, whatever)
getting accidentally packaged in the tarball.
(b) Use a dist-hook to remove unnecessary files from a distribution. See
https://www.gnu.org/software/automake/manual/html_node/The-dist-Hook.html
(c) List only individual files in EXTRA_DIST, for directories that may contain
built files. For directories that contain only data files, list the
directory, but use 'git status' to make sure the directory contains no
extra / garbage files.
Here are two patches, that implement (a) or (c), respectively. Either fixes
"make distcheck". My preference is (a), since it's
- the safest and
- consistent with uses of EXTRA_DIST in other GNU packages.
0001-Fix-build-failure-during-make-distcheck-alt1.patch
Description: Text Data
0001-Fix-build-failure-during-make-distcheck-alt2.patch
Description: Text Data
- fix build failure during "make distcheck",
Bruno Haible <=