🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #6000

Bug#1155164: a56 FTCBFS: fails stripping keybld

#6000
From: Helmut Grohne
Date: Tue, 24 Nov 2026 21:00
91 lines
4236 bytes
--9Ce/AGDVWfaHoMpA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Source: a56
Version: 1.3+dfsg-15
Tags: patch upstream
User: debian-cross@lists.debian.org
Usertags: ftcbfs

a56 fails to cross build from source as it fails stripping keybld. They
keybld tool is in a strange position as it is both run during build and
installed into the package. The upstream Makefile partially recognizes
this and compiles it using $(HOSTCC). Unfortunately, that results in it
being the wrong architecture for packaging. There is no right here as
the installed one must be host and the run one must be build. What we
actually need here is building them twice. I am attaching a patch to the
Makefile that implements this need. When HOSTCC equals CC, there is no
need to build them twice, so my patch ensures that the native case
remains as before. Please consider forwarding the patch upstream.

Helmut

--9Ce/AGDVWfaHoMpA
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="cross.patch"

--- a56-1.3+dfsg.orig/Makefile
+++ a56-1.3+dfsg/Makefile
@@ -63,6 +63,13 @@
 #DEFINES = -DYYDEBUG -DLDEBUG $(CCDEFS)
 
 CFLAGS += $(DEBUG) $(DEFINES) $(CPPFLAGS) $(LDFLAGS)
+HOSTCFLAGS += $(DEBUG) $(DEFINES) $(HOSTCPPFLAGS) $(HOSTLDFLAGS)
+
+ifeq ($(CC),$(HOSTCC))
+HOST_KEYBLD = keybld
+else
+HOST_KEYBLD = host_keybld
+endif
 
 all:	keybld a56 toomf a56-tobin bin2h
 
@@ -71,20 +78,30 @@
 	@$(POSTPROCESS) a56
 
 keybld:	keybld.o ksubs.o
-	$(HOSTCC) $(CFLAGS) -o keybld keybld.o ksubs.o
+	$(CC) $(CFLAGS) -o keybld keybld.o ksubs.o
 	@$(POSTPROCESS) keybld
 
+host_keybld: host_keybld.o host_ksubs.o
+	$(HOSTCC) $(HOSTCFLAGS) -o host_keybld host_keybld.o host_ksubs.o
+	@$(POSTPROCESS) host_keybld
+
 keybld.o:	keybld.c
-	$(HOSTCC) $(CFLAGS) -c keybld.c
+	$(CC) $(CFLAGS) -c keybld.c
+
+host_keybld.o: keybld.c
+	$(HOSTCC) $(HOSTCFLAGS) -c keybld.c -o host_keybld.o
 
 ksubs.o:	subs.c
-	$(HOSTCC) $(CFLAGS) -c subs.c
+	$(CC) $(CFLAGS) -c subs.c
 	$(MV) subs.o ksubs.o
 
+host_ksubs.o: subs.c
+	$(HOSTCC) $(HOSTCFLAGS) -c subs.c -o host_ksubs.o
+
 lex.o:	lex.c a56.h gram.h
 
-kparse.c:	a56.key keybld
-	./keybld < a56.key > kparse.c
+kparse.c:	a56.key $(HOST_KEYBLD)
+	./$(HOST_KEYBLD) < a56.key > kparse.c
 
 gram.c gram.h:	a56.y
 	@echo "[expect 2 shift/reduce conflicts here]"
@@ -112,7 +129,7 @@
 
 main.o:	a56.h gram.h
 
-clean:	; rm -f a56 toomf y.output *.o *.out tmp *.bak a56.tar.gz keybld
+clean:	; rm -f a56 toomf y.output *.o *.out tmp *.bak a56.tar.gz keybld host_keybld
 
 spotless:	clean
 	rm -f gram.c lexyy.c gram.h toktab.c kparse.c

--9Ce/AGDVWfaHoMpA--
Technical Details
Message-ID: <O35Ml-dWvb-9@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Helmut Grohne <helmut@subdivi.de>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1155164: a56 FTCBFS: fails stripping keybld
Date: Tue, 24 Nov 2026 22:00:01 +0100
Message-ID: <O35Ml-dWvb-9@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Tue Nov 24 20:51:10 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.451
Reply-To: Helmut Grohne <helmut@subdivi.de>, 1155164@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: packages@qa.debian.org
X-Debian-Pr-Message: report 1155164
X-Debian-Pr-Package: src:a56
X-Debian-Pr-Keywords: patch upstream
X-Debian-Pr-Source: a56
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="9Ce/AGDVWfaHoMpA"
Content-Disposition: inline
X-Reportbug-Version: 13.2.0
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2004775
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 91
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Sun, 22 Nov 2026 16:54:31 +0100
X-Original-Message-ID: <20261122155431.GA3853607@subdivi.de>