Source: aribas Version: 1.64-6 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
aribas fails to cross build from source for three distinct reasons. 1. debian/rules intends to build differently when building for i386, but what it actually does is conditionalizing what it builds on. Please refer to man dpkg-architecture for a definition of "build" and "host." 2. debian/rules forces the build architecture compiler. The simplest fix is letting dpkg's buildtools.mk initiatlize CC. 3. debian/patches/casting_pointers (unintentionally?!) reverts debian/patches/no_strip. As such stripping is performed with the build architecture strip. Doing so also happens to break DEB_BUILD_OPTIONS=nostrip as well as generation of -dbgsym packages. Please consider applying the attached patch to fix all of the above. Helmut
diff --minimal -Nru aribas-1.64/debian/changelog aribas-1.64/debian/changelog --- aribas-1.64/debian/changelog 2016-12-09 19:06:43.000000000 +0100 +++ aribas-1.64/debian/changelog 2021-08-01 20:47:12.000000000 +0200 @@ -1,3 +1,13 @@ +aribas (1.64-6.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Fix build vs. host confusion in debian/rules. + + Let dpkg's buildtools.mk supply a compiler. + + Stop reverting d/patches/no_strip in d/patches/casting_pointers. + + -- Helmut Grohne <hel...@subdivi.de> Sun, 01 Aug 2021 20:47:12 +0200 + aribas (1.64-6) unstable; urgency=low * Installed emacsen-startup, as proposed by Kevin Ryde (thanks!) diff --minimal -Nru aribas-1.64/debian/patches/casting_pointers aribas-1.64/debian/patches/casting_pointers --- aribas-1.64/debian/patches/casting_pointers 2016-12-09 19:06:43.000000000 +0100 +++ aribas-1.64/debian/patches/casting_pointers 2021-08-01 20:47:12.000000000 +0200 @@ -549,15 +549,6 @@ # This is the size of the ARIBAS heap in Megabytes # The value should not exceed one half of the RAM of your machine # If MEMFLAG is not defined, MEM=2 will be used by default -@@ -48,7 +48,7 @@ - - $(PROGRAM): $(OBJECTS) $(ASSOBJECTS) - $(CC) -o $(PROGRAM) $(LFLAGS) $(OBJECTS) $(ASSOBJECTS) -- -+ strip $(PROGRAM) - clean: - \rm *.o - Index: aribas-1.64/src/LINUX/README =================================================================== --- aribas-1.64.orig/src/LINUX/README 2010-02-10 21:17:30.000000000 +0100 @@ -650,15 +641,6 @@ # MEM may be set to any integer value from 1 to 32. # This is the size of the ARIBAS heap in Megabytes # The value should not exceed one half of the RAM of your machine -@@ -44,7 +44,7 @@ - - $(PROGRAM): $(OBJECTS) - $(CC) -o $(PROGRAM) $(OBJECTS) -- -+ strip $(PROGRAM) - clean: - \rm *.o - Index: aribas-1.64/src/print.c =================================================================== --- aribas-1.64.orig/src/print.c 2010-02-10 21:17:11.000000000 +0100 diff --minimal -Nru aribas-1.64/debian/rules aribas-1.64/debian/rules --- aribas-1.64/debian/rules 2016-12-09 19:06:43.000000000 +0100 +++ aribas-1.64/debian/rules 2021-08-01 20:47:10.000000000 +0200 @@ -1,10 +1,12 @@ #!/usr/bin/make -f +-include /usr/share/dpkg/buildtools.mk + %: dh $@ override_dh_auto_build: - if [ "$(DEB_BUILD_ARCH)" = "i386" ];\ + if [ "$(DEB_HOST_ARCH)" = "i386" ];\ then \ cp src/LINUX/arito386.S src;\ MAKEFILE=LINUX/Makefile.linux;\ @@ -16,7 +18,7 @@ EXTRAFLAGS="-DUNiX -DPROTO";\ fi;\ cd src && make -f $$MAKEFILE\ - CC=gcc\ + CC=$(CC)\ CFLAGS="$(OPTFLAGS) $$EXTRAFLAGS"\ ASSOBJECTS="$$ASSOBJECTS"