Hi Phong,

At 2026-07-21T14:07:10+0900, Nguyễn Gia Phong wrote:
> On 2026-07-19 at 10:08-05:00, G. Branden Robinson wrote:
> > At 2026-07-19T10:38:35+0200, Alexis (surryhill) wrote:
> > > Testing this rc on macOS with nixpkgs I noticed the following
> > > changes:
> > > 
> > > * The build fails with:
> > > 
> > >   /nix/store/5vmd3cqj6skjajg0yj9jl8dsddwp0700-bash-5.3p9/bin/bash: \
> > >     line 35: ./soelim: No such file or directory
> > [...]
> > >
> > >         GEN      doc/line-layout.eps
> > >     make: *** [Makefile:20231: doc/line-layout.eps] Error 127
> >
> > Thanks for the report.  I've fixed both of these and pushed the
> > fixes to Git.
> 
> Thanks got the quick fixes.  The build on Guix is facing
> the same issues, could the rc2 tarball be published
> so the build status can be confirmed?

There is no rc2 tarball; I haven't published one.  If the issues Alexis
found are the only ones that came up, my next distribution archive
release will be 1.25.0 final.

> Alternatively, I'm trying to switch to building from Git (we are
> trying to avoid artefacts like generated configure where possible) and
> without the .git directory (which is not reproducible) configure is
> failing to find the version:

Right.  You now need to specify `--enable-maintainer-mode` to
"configure" when building from Git.

In my next push, this will be clearer.  Here's an exhibit from my
working copy.

commit c992a09f15da28759ee070670bc04983b403012f
Author:     G. Branden Robinson <[email protected]>
AuthorDate: Mon Jul 20 21:50:36 2026 -0500
Commit:     G. Branden Robinson <[email protected]>
CommitDate: Mon Jul 20 21:50:36 2026 -0500

    INSTALL.REPO: Document `--enable-maintainer-mode`.

diff --git a/INSTALL.REPO b/INSTALL.REPO
index 8f29994ec..3b6aa46ea 100644
--- a/INSTALL.REPO
+++ b/INSTALL.REPO
@@ -83,7 +83,7 @@ You can now run the "configure" script.  It produces the 
"config.status"
 script, which generates the Makefile.  Then run "make" to build the
 groff project.  You can perform these actions from the source tree.

-    $ ./configure
+    $ ./configure --enable-maintainer-mode
     $ make # run with -j option if desired

 You can alternatively build groff outside of its source tree, which is
@@ -92,7 +92,7 @@ undertake development.

     $ mkdir build
     $ cd build
-    $ ../configure
+    $ ../configure --enable-maintainer-mode
     $ make # run with -j option if desired

 A separate build tree need not be a subdirectory of the source.

>     configure flags: ("CONFIG_SHELL=.../bin/bash"
>                       "SHELL=.../bin/bash"
>                       "--prefix=...groff-1.25.0.rc2"
>                       "--enable-fast-install"
>                       "--docdir=   groff-1.25.0.rc2-doc/share/doc/groff"
>                       "--build=x86_64-unknown-linux-gnu")
>     configure: WARNING: unrecognized options: --enable-fast-install
>     checking that groff version string has valid format...  invalid
>     configure: groff's version string must start with three decimal
>     integers separated by dots.  "" does not match.
> 
> How is this version string constructed?

README:
    This is the "groff" document formatting system, a reimplementation
    and extension of the AT&T "troff" typesetting system for Unix
    operating systems.  The version number is given in the file
    ".tarball-version" if you are building from a distribution archive;
    otherwise, building from its Git repository stores it in the file
    ".version".

If you're doing an out-of-tree build, then the presence of ".version" in
your Git working copy can confuse a human because its contents can get
very stale, but it doesn't confuse the build system--I'll explain below.
You can delete it and start an out-of-tree build anew.

The rules for generating these files are as follows.

$ nl -ba Makefile.am | sed -n 872,877p
   872  # Version files - see script "build-aux/git-version-gen".
   873  .version:
   874          $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
   875  dist-hook:
   876          $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
   877

So why doesn't a stale, or even absent, ".version" file break a groff
build?

As shown above, anything that, via a make(1) target rule, declares
".version" as a prerequisite causes it to be created.

But "configure" runs _before_ make(1), so how does the configure script
determine the version number?

Via the Autoconf macro `GROFF_MAKE_SHORT_VERSION`.

$ nl -ba m4/groff.m4 | sed -n 21,31p
    21  # Construct a short form of the groff version string.
    22  #
    23  # SHORT_VERSION contains the MAJOR_VERSION, MINOR_VERSION, and a portion
    24  # of the REVISION, separated by dots.  Only the part of REVISION before
    25  # the first '.' is used.  For example, if REVISION is
    26  # '3.real.434-5aafd', then SHORT_VERSION is 'x.yy.3', where x and yy are
    27  # MAJOR_VERSION and MINOR_VERSION, respectively.
    28  AC_DEFUN([GROFF_MAKE_SHORT_VERSION], [
    29    AC_SUBST([SHORT_VERSION],
    30             m4_bregexp(AC_PACKAGE_VERSION,[^\(\w+\.\w+\.\w+\).*$],[\1]))
    31  ])

Does this help?

If anything about this stuff is still murky, we might have to call upon
Bertrand Garrigues; he's the real authority on it.  ;-)

Regards,
Branden

Attachment: signature.asc
Description: PGP signature

  • ... G. Branden Robinson
    • ... Alexis (surryhill)
      • ... G. Branden Robinson
        • ... Alexis (surryhill)
        • ... Nguyễn Gia Phong via discussion of the GNU roff typesetting system and related software
          • ... G. Branden Robinson
            • ... G. Branden Robinson
            • ... Nguyễn Gia Phong via discussion of the GNU roff typesetting system and related software
              • ... G. Branden Robinson

Reply via email to