[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fix a 'make dist' bug
From: |
Bruno Haible |
Subject: |
fix a 'make dist' bug |
Date: |
Fri, 19 Feb 2021 23:37:04 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-201-generic; KDE/5.18.0; x86_64; ; ) |
The generated tarball is only usable on the same platform on which it was
generated.
How to reproduce: I use a system that has libtextstyle not installed in /usr
but instead in a directory that I indicate through the --prefix option and
CPPFLAGS and LDFLAGS variables. I can build poke (from the git repository),
but when I run "make distcheck", it fails:
/bin/bash ../libtool --tag=CC --mode=compile gcc -ftrapv -DHAVE_CONFIG_H -I.
-I../../../libpoke -I../poke -I../gl-libpoke -I../../../gl-libpoke
-I../../../common -DPKL_DEBUG
-DPKGDATADIR=\"/POKE/poke/build-64/poke-0.90/_inst/share/poke\"
-DPKGINFODIR=\"/POKE/poke/build-64/poke-0.90/_inst/share/info\"
-DLOCALEDIR=\"/POKE/poke/build-64/poke-0.90/_inst/share/locale\"
-fvisibility=hidden -DBUILDING_LIBPOKE -DJITTER_DISPATCH_DIRECT_THREADING=1 -I
/POKE/poke/build-64/poke-0.90/jitter -I
/POKE/poke/build-64/poke-0.90/_build/sub/jitter -I
/POKE/poke/build-64/poke-0.90/jitter/machine/x86_64 -I
/POKE/poke/build-64/poke-0.90/_inst/include -Wall
-I/arch/x86_64-linux-gnu/gnu-inst-gc/7.4.2/include -g -O2 -MT
libpoke_la-pvm.lo -MD -MP -MF .deps/libpoke_la-pvm.Tpo -c -o libpoke_la-pvm.lo
`test -f 'pvm.c' || echo '../../../libpoke/'`pvm.c
libtool: compile: gcc -ftrapv -DHAVE_CONFIG_H -I. -I../../../libpoke -I../poke
-I../gl-libpoke -I../../../gl-libpoke -I../../../common -DPKL_DEBUG
-DPKGDATADIR=\"/POKE/poke/build-64/poke-0.90/_inst/share/poke\"
-DPKGINFODIR=\"/POKE/poke/build-64/poke-0.90/_inst/share/info\"
-DLOCALEDIR=\"/POKE/poke/build-64/poke-0.90/_inst/share/locale\"
-fvisibility=hidden -DBUILDING_LIBPOKE -DJITTER_DISPATCH_DIRECT_THREADING=1 -I
/POKE/poke/build-64/poke-0.90/jitter -I
/POKE/poke/build-64/poke-0.90/_build/sub/jitter -I
/POKE/poke/build-64/poke-0.90/jitter/machine/x86_64 -I
/POKE/poke/build-64/poke-0.90/_inst/include -Wall
-I/arch/x86_64-linux-gnu/gnu-inst-gc/7.4.2/include -g -O2 -MT libpoke_la-pvm.lo
-MD -MP -MF .deps/libpoke_la-pvm.Tpo -c ../../../libpoke/pvm.c -fPIC -DPIC -o
.libs/libpoke_la-pvm.o
In file included from
/POKE/poke/build-64/poke-0.90/jitter/jitter/jitter-instruction.h:34:0,
from ../../libpoke/pvm.jitter:170,
from ../../../libpoke/pvm-program.h:22,
from ../../../libpoke/pvm.c:31:
/POKE/poke/build-64/poke-0.90/jitter/jitter/jitter-print.h:31:71: fatal error:
textstyle.h: No such file or directory
compilation terminated.
make[3]: *** [Makefile:2386: libpoke_la-pvm.lo] Error 1
make[3]: Leaving directory '/POKE/poke/build-64/poke-0.90/_build/sub/libpoke'
make[2]: *** [Makefile:2102: all] Error 2
make[2]: Leaving directory '/POKE/poke/build-64/poke-0.90/_build/sub/libpoke'
make[1]: *** [Makefile:2032: all-recursive] Error 1
make[1]: Leaving directory '/POKE/poke/build-64/poke-0.90/_build/sub'
make: *** [Makefile:2250: distcheck] Fehler 1
What's going on? The sub-build run by Automake's 'distcheck' target does not
use my --prefix, CPPFLAGS, LDFLAGS arguments. So it runs in an environment
that does not have libtextstyle. But it uses the file
jitter/jitter/jitter-config.h which was generated by the outer build and which
contains
#define JITTER_HAVE_LIBTEXTSTYLE 1
And that's because this file has been added to the tarball. But config.h files
are platform dependent and therefore should never be added to the tarball.
Here is a proposed fix. With it, I can run "make distcheck", and the tarball
no longer contains jitter-config.h. The fix follows the recommended pattern
from https://www.gnu.org/software/automake/manual/html_node/The-dist-Hook.html .
0001-Don-t-package-jitter-jitter-config.h-into-the-tarbal.patch
Description: Text Data
- fix a 'make dist' bug,
Bruno Haible <=