Bug#1102606: guile-3.0 FTCBFS: wrong include path
Source: guile-3.0
Version: 3.0.10+really3.0.10-4
Tags: patch upstream
User: debian-cross@lists.debian.org
Usertags: ftcbfs
X-Debbugs-Cc: debian-cross@lists.debian.org
guile-3.0 fails to cross build in a very funky way. Have a look at the
log:
| /usr/bin/make -C libguile scmconfig.h
| make[3]: Entering directory '/build/reproducible-path/guile-3.0-3.0.10+really3.0.10/libguile'
| \
| if [ "yes" = "yes" ]; then \
| PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games cc -DHAVE_CONFIG_H -I.. \
| -I. -c -o gen-scmconfig.o gen-scmconfig.c; \
| else \
| powerpc64le-linux-gnu-gcc -DHAVE_CONFIG_H -DBUILDING_LIBGUILE=1 -I.. -I.. -I../lib -I../lib -iquote. -I/build/reproducible-path/guile-3.0-3.0.10+really3.0.10 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wmissing-prototypes -Wpointer-arith -fno-strict-aliasing -fwrapv -fvisibility=hidden -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/guile-3.0-3.0.10+really3.0.10=. -fstack-protector-strong -Wformat -Werror=format-security -DPACKAGE_PACKAGER='"Debian"' -DPACKAGE_PACKAGER_VERSION='"3.0.10+really3.0.10-4"' -DPACKAGE_PACKAGER_BUG_REPORTS='"http://www.debian.org/Bugs/Reporting"' -fno-stack-protector -flto -c -o gen-scmconfig.o gen-scmconfig.c; \
| fi
| In file included from ../libguile/inline.h:28,
| from ../libguile/gc.h:25,
| from ./strings.h:25,
| from /usr/include/string.h:462,
| from gen-scmconfig.c:142:
| ../libguile/scm.h:30:10: fatal error: libguile/scmconfig.h: No such file or directory
| 30 | #include "libguile/scmconfig.h"
| | ^~~~~~~~~~~~~~~~~~~~~~
| compilation terminated.
| make[3]: *** [Makefile:4469: gen-scmconfig.o] Error 1
| make[3]: Leaving directory '/build/reproducible-path/guile-3.0-3.0.10+really3.0.10/libguile'
| make[2]: *** [Makefile:2619: libguile/scmconfig.h] Error 2
| make[2]: Leaving directory '/build/reproducible-path/guile-3.0-3.0.10+really3.0.10'
| make[1]: *** [debian/rules:156: override_dh_auto_build] Error 2
| make[1]: Leaving directory '/build/reproducible-path/guile-3.0-3.0.10+really3.0.10'
| make: *** [debian/rules:72: binary-arch] Error 2
| dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2
Notably, /usr/include/string.h includes guile's strings.h. A system
header should not be including a package header. It also is a cross
build specific problem as it builds fine natively. The problem is rooted
in the "if [ "yes" = "yes" ]" branch earlier where one of those "yes"
actually is "$cross_compiling". The cross branch sneaks in an additional
-I. which causes the guile strings.h header to be picked up at the wrong
time. I'm attaching a patch for your convenience.
Helmut
--- guile-3.0-3.0.10+really3.0.10.orig/libguile/Makefile.am
+++ guile-3.0-3.0.10+really3.0.10/libguile/Makefile.am
@@ -70,7 +70,7 @@
$(AM_V_GEN) \
if [ "$(cross_compiling)" = "yes" ]; then \
$(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) -I$(top_builddir) \
- -I. -c -o $@ $<; \
+ -c -o $@ $<; \
else \
$(COMPILE) -c -o $@ $<; \
fi
Reply to: