URL:
  <https://savannah.gnu.org/bugs/?68901>

                 Summary: GROFF_G incorrectly enables the g prefix when troff
fails to run
                   Group: GNU roff
               Submitter: jaipaul
               Submitted: Thu 12 Nov 2026 09:44:51 AM UTC
                Category: General
                Severity: 3 - Normal
              Item Group: Build/Installation
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Unlocked
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Thu 12 Nov 2026 09:44:51 AM UTC By: Jaipaul Cheernam <jaipaul>
 In groff 1.25.0 the GROFF_G macro enables the "g" command prefix
  whenever troff produces anything other than exactly "1".
  
  During cross-compilation the troff found on PATH is the freshly built
  GNU troff, but run bare it cannot load its device files (the font/
  device search paths aren't configured). It therefore prints an error
  instead of reporting .g = 1, e.g.:
  
      troff: fatal error: cannot load 'DESC' description file for device 'ps'
  
  Because the probe merges stderr into stdout (2>&1), that error text
  becomes the output, which is not "1", so configure concludes an
  incompatible troff is installed and enables the prefix. Only prefixed
  binaries are then installed (gtroff, gnroff, gtbl, geqn, ...), while
  programs expecting troff, nroff, tbl, and eqn cannot find them. A
  visible downstream effect is man-db producing empty output for man
  pages.
  
  Expected behavior: enable the "g" prefix only when troff runs
  successfully and reports that it is not GNU troff. If the probe fails
  to run, leave the prefix disabled.
  
  This complements the fix for Savannah #68775, which handled the case of
  no troff being installed at all.
  
  (Optional) It would also help to let users override "g" explicitly via
  the environment.
Attaching my solution as patch






    _______________________________________________________
File Attachments:

Name: 0001-m4-groff.m4-GROFF_G-dont-prefix-when-troff-fails.patch Size: 1.3KiB

<https://file.savannah.gnu.org/file/0001-m4-groff.m4-GROFF_G-dont-prefix-when-troff-fails.patch?file_id=59199>



    AGPL NOTICE

These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-c89d7006507cdbd54dfda18fc30dbd6650539e45.tar.gz

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68901>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to