Hi Branden,

On Thu, Sep 11, 2025 at 09:29:20AM -0500, G. Branden Robinson wrote:
> Hi Alex,
> 
> At 2025-09-11T10:59:19+0200, Alejandro Colomar wrote:
> > I'm trying hard to have reproducible builds, so that I can verify that
> > my build system produces the same exact thing as long as the tools
> > used with it are the same (or a reasonably similar version).
> 
> A worthy goal!
> 
> > I found that groff(1) doesn't seem to be consistent, as it produces
> > slightly different output on different runs.  Here's just an example:
> 
> Are all of the variable segments of output like your example?  Namely,
> do they:
> 
> 1.  affect only output prepared for the 'html' device, and
> 2.  exhibit differences only in lines starting with 'x F' in the grout?

Possibly.

There are some that are not HTML, but they differ in the version, which
is my fault, not yours, so I need to fix it.  So far, I haven't seen
any other difference that's not my fault and is not HTML and x.
I can't confirm 100% at the moment, due to my fault.

        $ diff -u 
/home/alx/src/linux/man-pages/man-pages/main/.tmp/man/man2/wait.2.cat.set 
/home/alx/src/linux/man-pages/man-pages/contrib/.tmp/man/man2/wait.2.cat.set
        --- 
/home/alx/src/linux/man-pages/man-pages/main/.tmp/man/man2/wait.2.cat.set   
2025-09-11 23:10:57.284618106 +0200
        +++ 
/home/alx/src/linux/man-pages/man-pages/contrib/.tmp/man/man2/wait.2.cat.set2025-09-11
 23:09:52.903741956 +0200
        @@ -6576,10 +6576,10 @@
         t6.15
         N45
         h24
        -t77
        +t86
         N45
         h24
        -tg1d0de...
        +tge5785...
         h24
         t2025
         N45

I should check this.  I probably want to not use the version during
linting...  I suspect I did it to lint something as close as to what's
installed as possible, but I think I regret that.  I should leave that
to 'installcheck', and have the usual linters lint only what we have in
the repo.

> > Did I inadvertently do something that would trigger such a difference?
> 
> I doubt it.
> 
> > I used the same exact system to produce both files.  I was testing
> > that some changes to the Linux man-pages build system (which are just
> > cosmetic changes) are in fact cosmetic, so I'm surprised to see these
> > changes.
> > 
> > Is groff(1) just random in some sense?  Would it be possible to remove
> > that randomness from groff(1)?
> 
> I'll need to look at what data structure is being used to house the list
> of file names that get dumped into GNU troff(1)'s output for HTML
> devices.  I suspect that feature was put in as a grohtml(1) debugging
> aid, as there's nothing about it that necessarily couples it to the HTML
> format.  Output for any target device could dump into its grout the list
> of input files that were read during formatting.
> 
> It's possible that the data structure is effectively an unordered map,
> and so is subject to the host system's stochastic and history-dependent
> dynamic memory allocations.  However, I'm not strongly confident about
> that because the output doesn't seem quite random _enough_.
> 
> Anyway, one shouldn't theorize ahead of facts, so I'll check out the
> data structure and see what there is to see.

Sounds plausible.


Have a lovely night!
Alex

-- 
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).

Attachment: signature.asc
Description: PGP signature

Reply via email to