bugGNU roff - Bugs: bug #67268, [devpdf] multiple Make targets try...

 
 

bug #67268: [devpdf] multiple Make targets try to create "download" file

Submitter:  Dave <barx>
Submitted:  Tue 01 Jul 2025 10:20:04 PM UTC
   
 
Category:  Font devpdf Severity:  3 - Normal
Item Group:  Build/Installation Status:  Fixed
Privacy:  Public Assigned to:  deri
Open/Closed:  Closed Planned Release:  1.24.0
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Jump to the original submission

Sat 20 Sep 2025 12:15:15 AM UTC, comment #12: 


commit 6198245eac8f51a17b222118b02102a9c2ea4519
Author: Deri James <deri@chuzzlewit.myzen.co.uk>
Date:   Thu Jul 24 17:57:44 2025 +0100

    Improve build logic.

    * font/devpdf/util/BuildFoundries.pl: If any warnings issued
    during run, exit code 2 at end of run. This will abort any
    build. Change to Notice any information only messages.
    Remove code which copied grops fonts to gropdf (Branden added
    this to devpdf.am so is now unnecessary).

    * src/devices/gropdf/gropdf.pl: Exit with code 2 if any
    warnings issued during run (this will stop a 'make'). Report
    a 'Notice' if duplicate font entries and 1 is incorrect.
    Report path of download file in messages.

    * src/devices/gropdf.1.man: Document exit status.

    * contrib/mom/mom.am:
    * doc/doc.am: -W flag no longer required

    Continues fixing Savannah #67268.


G. Branden Robinson <gbranden>
Group administrator
Thu 24 Jul 2025 06:15:01 PM UTC, comment #11: 

Deri reverted apparently all of my changes, so remounting the mounted head of this dead bug on his wall rather than mine.

G. Branden Robinson <gbranden>
Group administrator
Thu 24 Jul 2025 05:19:15 PM UTC, comment #10: 

I have just pushed fixes for this and bug #67207.

* font/devpdf/util/BuildFoundries.pl: If any warnings issued
during run, exit code 2 at end of run. This will abort any
build. Change to Notice any information only messages.
Remove code which copied grops fonts to gropdf (Branden added
this to devpdf.am so is now unnecessary).

* src/devices/gropdf/gropdf.pl: Exit with code 2 if any
warnings issued during run (this will stop a 'make'). Report
a 'Notice' if duplicate font entries and 1 is incorrect.
Report path of download file in messages.

* src/devices/gropdf.1.man: Document exit status.

* contrib/mom/mom.am:
* doc/doc.am: -W flag no longer required

Continues fixing Savannah #67268.


Deri James <deri>
Group Member
Sat 05 Jul 2025 12:50:36 PM UTC, comment #9: 

Whoops, I forgot to copy much of the final form of the last commit's ChangeLog entry into the commit message.

Here's the fuller version from the ChangeLog file.


2025-07-03  G. Branden Robinson <g.branden.robinson@gmail.com>

        * font/devpdf/util/BuildFoundries.pl (LoadFoundry): Stop
        throwing notice about grops(1) font [description file] being
        copied; this notification was far away from where the rewrite
        was actually happening.  Drop now-unused `gotf` scalar.
        (UseGropsVersion): If we're being strict and the destination
        font description file name (scalar `gfontbase`) already exists,
        emit a `Notice()` that we're not overwriting it.  If we are
        rewriting it, emit the aforementioned notice here, where it
        happens.  Drop redundant/unnecessary (depending on whether a
        file open was sucessfule) close of `GF` file handle.

        * font/devpdf/devpdf.am: Tidy up for better build reliability.
        (font/devpdf/util/BuildFoundries): Stop manipulating the
        "download" file.
        (font/devpdf/download): Move the file's comment header from
        here...
        * font/devpdf/download.in: ...to here.
        * font/devpdf/devpdf.am (font/devpdf/download): Use
        "BuildFoundries"'s new `--download` option to construct the
        target from "download.in".  Stop setting write permission on the
        generated download file in the build tree; it's no longer
        necessary.  Stop giving "BuildFoundries" a search path in the
        "font/devps" directory; use "font/devpdf" instead.  This is what
        ultimately angered "make distcheck"; now that make(1) produces
        the "pdf" device's font description files for the default
        foundry (copying them from "font/grops", there's no need for
        "BuildFoundries" to rewrite them, in either directory.

        Fixes <https://savannah.gnu.org/bugs/?67268>.  Thanks to Dave
        Kemper for the report.


G. Branden Robinson <gbranden>
Group administrator
Fri 04 Jul 2025 03:12:37 PM UTC, comment #8: 


commit b53278be5deb5b6bc4a290ee73ba1e9e1d326134
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Jul 4 04:14:25 2025 -0500

    [gropdf]: Add `-W` option.

    ... to make font embedding warnings fatal.

    * src/devices/gropdf/gropdf.pl: Add global scalar `makeWarningsFatal`.
      Recognize option when calling `GetOptions()`.

      (LoadFont): Fall over dead if embedding fails.

    * src/devices/gropdf/gropdf.pl (usage):
    * src/devices/gropdf/gropdf.1.man (Options): Document it.

    Begins fixing Savannah #67268.

commit bfd77135f31b067e4a21ccb9f3f496cc3672365d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Jul 4 08:56:00 2025 -0500

    [doc]: Use new gropdf `-W` option.

    * doc/doc.am (DOC_PDFMOM): Append `-P -W` to `pdfmom` arguments.

    Building from a distribution archive fails at this commit because this
    change exposes a latent error that should be fatal in a groff build.

    Log:

    Use of uninitialized value $file in substr at .../groff-1.23.0.3459-bb549/_build/sub/gropdf line 1188, <__ANONIO__> line 4.
    Use of uninitialized value $file in substr at .../groff-1.23.0.3459-bb549/_build/sub/gropdf line 1195, <__ANONIO__> line 4.
    Use of uninitialized value $file in concatenation (.) or string at .../groff-1.23.0.3459-bb549/_build/sub/gropdf line 1195, <__ANONIO__> line 4.
      GEN      doc/groff-man-pages-cover.groff
      GROFF    doc/groff-man-pages.pdf
    Use of uninitialized value $file in substr at .../groff-1.23.0.3459-bb549/_build/sub/gropdf line 1188, <__ANONIO__> line 4.
    Use of uninitialized value $file in substr at .../groff-1.23.0.3459-bb549/_build/sub/gropdf line 1195, <__ANONIO__> line 4.
    Use of uninitialized value $file in concatenation (.) or string at .../groff-1.23.0.3459-bb549/_build/sub/gropdf line 1195, <__ANONIO__> line 4.
    gropdf: fatal error: unable to embed font file for 'Times-Roman' (TR) (missing entry in 'download' file?)

    Continues fixing Savannah #67268.

commit 2738ad12bb6db9d1f8f0e338797b8d8b61ebe7ce
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Jul 4 08:56:56 2025 -0500

    contrib/mom/mom.am: Run `pdfmom` with `-P -W`.

    * contrib/mom/mom.am (MOMPDFMOM): Append `-P -W` to `pdfmom` arguments.

    Continues fixing Savannah #67268.

commit 9aac02a7c38ed00341ae9e8044bbca1b3e6f195e
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Jul 4 09:10:49 2025 -0500

    [gropdf]: Skip blank lines in "download" file.

    * src/devices/gropdf/gropdf.pl (LoadDownload): Skip lines that consist
      only of whitespace.

    Continues fixing Savannah #67268.

commit d5832598ec8bb3968269a88eed80930365e764d4
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Jul 4 09:28:19 2025 -0500

    [devpdf]: Add debugging diags to BuildFoundries.

    * font/devpdf/util/BuildFoundries.pl: Throw more `Notice` (debugging)
      diagnostic messages...
      (RunAfmtodit): ...when running `afmtodit`...
      (UseGropsVersion): ...when trying to open a font description file for
      writing...
      (LoadDownload): ...and when the download file cannot be opened.

    Continues fixing Savannah #67268.

commit d4302d172486c33d6cd59495f8a37906404de8be
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Jul 4 09:35:07 2025 -0500

    [devpdf]: Make `--strict` option stricter.

    * font/devpdf/util/BuildFoundries.pl: Make `--strict` option stricter,
      turning more warnings fatal...

      (LoadFoundry): ...when an embeddable font file is known to be
      unavailable, when a grops(1) font description file is unreadable, when
      afmtodit(1) fails [the inference is indirect]...

      (RunAfmtodit): ...when a font description file has an unexpected
      format...

      (UseGropsVersion): ...when a font description file can't be created,
      when one being read lacks an `internalname` directive, and when the
      file can't be opened for reading.

    Continues fixing Savannah #67268.

commit bf35831c05e4b8bc26cf95cf819fcb47b5b29480
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Jul 4 09:18:59 2025 -0500

    [devpdf]: Give BuildFoundries `--download` option.

    * font/devpdf/util/BuildFoundries.pl: Support new `--download` option,
      taking an input download file as argument and storing it to new
      `downloadFile` scalar.  Default to "download" as before.

      (LoadDownload): Throw `notice` diagnostic if we can't open the
      "download" file, and report the error encountered by `open()`.

    Continues fixing Savannah #67268.

commit 20d59d263fed685cdf8007910a2aeff3079d3786
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Wed Jul 2 09:30:10 2025 -0500

    [devpdf]: Fix Savannah #67268.

    * font/devpdf/devpdf.am: Tidy up for better build reliability.

      (font/devpdf/util/BuildFoundries): Stop handling the "download" file.

      (font/devpdf/download): Move the file's comment header from here...

    * font/devpdf/download.in: ...to here.

    * font/devpdf/devpdf.am (font/devpdf/download): Use "BuildFoundries"'s
      new `--download` option to construct the target from "download.in".
      Stop setting write permission on the generated download file in the
      build tree; it's no longer necessary.

    Fixes <https://savannah.gnu.org/bugs/?67268>.  Thanks to Dave Kemper for
    the report.


G. Branden Robinson <gbranden>
Group administrator
Thu 03 Jul 2025 09:53:11 AM UTC, comment #7: 

Quoting http://lists.gnu. ... -07/msg00018.html :


>> font/devpdf/download: $(devpdffontencdata) $(devpdffontmapdata) \
>>   font/devpdf/DESC font/devpdf/Foundry font/devpdf/util/BuildFoundries
>>         $(AM_V_GEN)$(MKDIR_P) $(top_builddir)/font/devpdf \
>>         && echo "# foundry      ps-font-name    ps-font-file" >$@.tmp \
>>         && echo "# A blank foundry is the default." >>$@.tmp \
>>         &&


> This is a bit confusing!! Why are you touching download here? We now
> have download.in so why not include your comments in that file - job
> done once.


An oversight.


>> MOSTLYCLEANFILES += font/devpdf/util/BuildFoundries
>> font/devpdf/util/BuildFoundries: \
>>   $(devpdf_srcdir)/util/BuildFoundries.pl $(SH_DEPS_SED_SCRIPT) afmtodit
>>         $(AM_V_GEN)$(MKDIR_P) $(top_builddir)/font/devpdf/util \
>> # ...snip...
>>         && cp -f $(top_srcdir)/font/devpdf/download.in \
>>                  $(top_builddir)/font/devpdf/download


> This is the important bit and can replace your echo statements above, since this is the bit which populates download with Symbol-Slanted.


Yes, except that should happen in the target responsible for creating
the "download" file, not some other file.

>> We shouldn't have two different rules creating "font/devpdf/download".
>> That's just asking for trouble.


> Yes, its the bit I added in the commit before yours. I don't mind if
> it gets run when BuildFoundries is built or when it is run, but we
> don't want the echos.


Agreed.

When replying to Savannah ticket updates by email, the *only* address you need to reply to is one like this:


To: 108747-bugs-savannah <savannah-trackers@gnu.org>


The "fullname" you're given to reply to will be different; it is simply your numeric Savannah user ID, I think.

G. Branden Robinson <gbranden>
Group administrator
Wed 02 Jul 2025 11:36:01 PM UTC, comment #6: 

Deri's reply to comment #3 (http://lists.gnu. ... -07/msg00018.html) seemed to make it to bug-groff but not savannah, for some reason.

Reopening this ticket for now, since said reply suggests a bit of refinement is needed in the build system.

Dave <barx>
Group Member
Wed 02 Jul 2025 04:33:51 PM UTC, comment #5: 

comment #3:

> We shouldn't have two different rules creating
> "font/devpdf/download".  That's just asking for trouble.


If solving that reduces the number of situations in which one must "make clean" before building, that's a win for build times.  Having run both steps to fix the "download" file, I reminded myself why I usually skip the first.

(The naïve solution failed in a curious manner:

$ rm font/devpdf/download
$ make
  GEN      font/devpdf/download
BuildFoundries: notice: copied grops font AB
BuildFoundries: notice: copied grops font ABI
BuildFoundries: notice: copied grops font AI
BuildFoundries: notice: copied grops font AR
BuildFoundries: notice: copied grops font BMB
BuildFoundries: notice: copied grops font BMBI
BuildFoundries: notice: copied grops font BMI
BuildFoundries: notice: copied grops font BMR
BuildFoundries: notice: copied grops font CB
BuildFoundries: notice: copied grops font CBI
BuildFoundries: notice: copied grops font CI
BuildFoundries: notice: copied grops font CR
BuildFoundries: notice: copied grops font HB
BuildFoundries: notice: copied grops font HBI
BuildFoundries: notice: copied grops font HI
BuildFoundries: notice: copied grops font HNB
BuildFoundries: notice: copied grops font HNBI
BuildFoundries: notice: copied grops font HNI
BuildFoundries: notice: copied grops font HNR
BuildFoundries: notice: copied grops font HR
BuildFoundries: notice: copied grops font NB
BuildFoundries: notice: copied grops font NBI
BuildFoundries: notice: copied grops font NI
BuildFoundries: notice: copied grops font NR
BuildFoundries: notice: copied grops font PB
BuildFoundries: notice: copied grops font PBI
BuildFoundries: notice: copied grops font PI
BuildFoundries: notice: copied grops font PR
BuildFoundries: notice: copied grops font S
BuildFoundries: notice: copied grops font TB
BuildFoundries: notice: copied grops font TBI
BuildFoundries: notice: copied grops font TI
BuildFoundries: notice: copied grops font TR
BuildFoundries: notice: copied grops font ZCMI
BuildFoundries: notice: copied grops font ZD
BuildFoundries: notice: copied grops font EURO
chmod: cannot access 'font/devpdf/download': No such file or directory
make: *** [Makefile:17495: font/devpdf/download] Error 1

So it claimed to build font/devpdf/download...and then couldn't find it.)

Dave <barx>
Group Member
Wed 02 Jul 2025 02:29:32 PM UTC, comment #4: 


comment #3:

> Here's what it looks like in the Git trunk, as of commit


Er...as of commit bace292cafa, 29 June.

G. Branden Robinson <gbranden>
Group administrator
Wed 02 Jul 2025 02:27:26 PM UTC, comment #3: 


comment #1:

> The clue is in your download file, it has 6 lines of comment at the top which occurs when BuildFoundries.pl is run multiple times without an intervening file removal (make clean/distclean).

[...]

> Try a 'make clean' then check font/devpdf/download has been removed, and 'make -j' should then work (hopefully!). (Although Branden has recently made some changes to devpdf.am I believe the above info is still true).


I *think* I've fixed the Automake file so that the constructed "font/devpdf/download" won't repeatedly grow like this.

Here's what it looks like in the Git trunk, as of commit


font/devpdf/download: $(devpdffontencdata) $(devpdffontmapdata) \
  font/devpdf/DESC font/devpdf/Foundry font/devpdf/util/BuildFoundries
        $(AM_V_GEN)$(MKDIR_P) $(top_builddir)/font/devpdf \
        && echo "# foundry      ps-font-name    ps-font-file" >$@.tmp \
        && echo "# A blank foundry is the default." >>$@.tmp \
        && PATH="$(abs_top_builddir)$(GROFF_PATH_SEPARATOR)$(abs_top_builddir)/build-aux$(GROFF_PATH_SEPARATOR)$(PATH)" \
             $(abs_top_builddir)/font/devpdf/util/BuildFoundries \
               --strict $(abs_top_builddir)/font/devpdf \
               '$(abs_top_srcdir)/font/devps:$(abs_top_builddir)/font/devps' \
               >>$@.tmp \
        && chmod u+w $@ \
        && mv $@.tmp $@


However I see that I should get rid of the end of the "BuildFoundries" target, earlier in the file:


MOSTLYCLEANFILES += font/devpdf/util/BuildFoundries
font/devpdf/util/BuildFoundries: \
  $(devpdf_srcdir)/util/BuildFoundries.pl $(SH_DEPS_SED_SCRIPT) afmtodit
        $(AM_V_GEN)$(MKDIR_P) $(top_builddir)/font/devpdf/util \
# ...snip...
        && cp -f $(top_srcdir)/font/devpdf/download.in \
                 $(top_builddir)/font/devpdf/download


We shouldn't have two different rules creating "font/devpdf/download".  That's just asking for trouble.

G. Branden Robinson <gbranden>
Group administrator
Wed 02 Jul 2025 12:56:41 AM UTC, comment #2: 

Ugh.  Not the first time I've been burned by that, either.  One day I'll learn.  Sorry for the bogus report.

Dave <barx>
Group Member
Wed 02 Jul 2025 12:37:43 AM UTC, comment #1: 

The clue is in your download file, it has 6 lines of comment at the top which occurs when BuildFoundries.pl is run multiple times without an intervening file removal (make clean/distclean). There is a new file "../font/devpdf/download.in" which is copied to font/devpdf/download if it does not exist. This file:-

[derij@pip build (master)]$ cat ../font/devpdf/download.in
        Symbol-Slanted  StandardSymSL.pfb

holds the entry you need.

Try a 'make clean' then check font/devpdf/download has been removed, and 'make -j' should then work (hopefully!). (Although Branden has recently made some changes to devpdf.am I believe the above info is still true).

Deri James <deri>
Group Member
Tue 01 Jul 2025 10:20:04 PM UTC, original submission:  

I previously built groff on June 19; I built again today, based on the most recent git (as of this writing, through commit 69d9eba36).  This is a new build warning:

  GROFF    doc/groff-man-pages.pdf
gropdf: warning: unable to embed font file for 'Symbol-Slanted' (SS) (missing entry in 'download' file?)

Indeed, "egrep 'SS|Slanted' font/devpdf/download" outputs nothing.

Attaching full output from build, and full font/devpdf/download file generated during the build.  Let me know what other information is useful.

Dave <barx>
Group Member

 

Attached Files

Attached Files
file #57354:  build.log added by barx (12KiB - text/plain)
file #57355:  download added by barx (3.0KiB - application/octet-stream)

(Note: upload size limit is set to 4.0MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by deri (Posted a comment)
  • -email is unavailable- added by barx (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    History

    Follow 17 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-07-24 gbranden Assigned togbranden deri
    2025-07-04 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.24.0
    2025-07-03 gbranden CategoryGeneral Font devpdf
        Severity2 - Minor 3 - Normal
        StatusNone In Progress
        Assigned toNone gbranden
        Summarygropdf: warning: unable to embed font file for 'Symbol-Slanted' [devpdf] multiple Make targets try to create "download" file
    2025-07-02 barx StatusInvalid None
        Assigned tobarx None
        Open/ClosedClosed Open
    2025-07-02 barx StatusNone Invalid
        Assigned toNone barx
        Open/ClosedOpen Closed
    2025-07-01 barx Attached File- Added build.log, #57354
        Attached File- Added download, #57355

    Back to the top

    Powered by Savane 3.16-8b18.
    Corresponding source code