Re: groff 1.25.0.rc2 on Alpine Linux

Bruno Haible via discussion of the GNU roff typesetting system and related software <[email protected]> Mon, 03 Aug 2026 17:30:43 +0200
Newsgroups gmane.comp.printing.groff.general
Message-ID <4185359.N7aMVyhfb1@cagnes>
This is a multi-part message in MIME format.

--nextPart16574166.JCcGWNJJiE
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="utf-8"

On Alpine Linux 3.24, I see two test failures:


FAIL: src/preproc/eqn/tests/neqn-finds-matching-eqn.sh
======================================================

/home/bruno/groff-1.25.0.rc2/build-64/neqn: exec: line 56: @g@eqn: not found

GNU eqn (groff) version 1.25.0.rc2
FAIL src/preproc/eqn/tests/neqn-finds-matching-eqn.sh (exit status: 1)

FAIL: src/preproc/eqn/tests/neqn-smoke-test.sh
==============================================

/home/bruno/groff-1.25.0.rc2/build-64/neqn: exec: line 56: @g@eqn: not found

FAIL src/preproc/eqn/tests/neqn-smoke-test.sh (exit status: 1)


Indeed, line 56 of the generated 'neqn' script looks like this:

  exec @g@eqn -T ascii "$@"

The reason is that the 'sed' program on this platform (from BusyBox)
ignores '-e' options when a '-f' option is present, regardless whether
the '-e' options come before or after the '-f' option.

Here's a proposed fix.

Verified by manually modifying the Makefile accordingly. (I can't regenerate
a snapshot tarball for testing, because of the missing epsf.texi problem
<https://savannah.gnu.org/bugs/?68566>).

Bruno



--nextPart16574166.JCcGWNJJiE
Content-Disposition: attachment;
 filename="0001-build-Fix-generation-of-neqn-script-on-Alpine-Linux.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="UTF-8";
 name="0001-build-Fix-generation-of-neqn-script-on-Alpine-Linux.patch"

From 9df22259961372aaf839d301a99d7490c3089258 Mon Sep 17 00:00:00 2001
From: Bruno Haible <[email protected]>
Date: Mon, 3 Aug 2026 17:10:28 +0200
Subject: [PATCH] build: Fix generation of 'neqn' script on Alpine Linux.

* src/preproc/eqn/eqn.am (neqn): Use two separate 'sed' invocations, as
BusyBox 'sed' ignores '-e' options if a '-f' option is present.
---
 src/preproc/eqn/eqn.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/preproc/eqn/eqn.am b/src/preproc/eqn/eqn.am
index 0c353c2a9..1f57443ef 100644
--- a/src/preproc/eqn/eqn.am
+++ b/src/preproc/eqn/eqn.am
@@ -59,9 +59,9 @@ src/preproc/eqn/eqn-lex.$(OBJEXT): src/preproc/eqn/eqn.hpp
 
 neqn: $(top_srcdir)/src/preproc/eqn/neqn.sh $(SH_DEPS_SED_SCRIPT)
 	$(AM_V_GEN)sed -f $(SH_DEPS_SED_SCRIPT) \
-	       -e 's/[@]g[@]/$(g)/g' \
-	       -e $(SH_SCRIPT_SED_CMD) \
 	       $(top_srcdir)/src/preproc/eqn/neqn.sh \
+	 | sed -e 's/[@]g[@]/$(g)/g' \
+	       -e $(SH_SCRIPT_SED_CMD) \
 	       >[email protected] \
 	&& chmod +x [email protected] \
 	&& mv [email protected] $@
-- 
2.53.0


--nextPart16574166.JCcGWNJJiE--