>Synopsis: print/htmldoc: malfunction through packaging bug (build
dir leaks into binary path)
>Category: user ports
>Environment:
System : OpenBSD 7.9
Details : OpenBSD 7.9 (GENERIC.MP) #449: Wed May 6 13:17:25
MDT 2026
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
Architecture: OpenBSD.amd64
Machine : amd64
>Description:
Sorry if this is an inappropriate way to file bug reports, I am a
non-OpenBSD developer compatibility-testing his fetchmail and bogofilter
and leafnode packages on OpenBSD, too, but my main drivers are Fedora
Linux and FreeBSD - and I haven't found something better how to report
bugs in a port.
htmldoc-1.9.23 (installed as package through pkg_add; up to date as of
2026-05-30, per pkg_add -uv)
- like its predecessor versions before - leak their build directory
layout into the packages.
The result is a long chain of htmldoc error messages (many more
repetitions of this):
ERR005: Unable to open font width file
/usr/obj/ports/htmldoc-1.9.23/fake-amd64/usr/local/share/htmldoc/fonts/Times-Bold.afm!
ERR005: Unable to open font width file
/usr/obj/ports/htmldoc-1.9.23/fake-amd64/usr/local/share/htmldoc/fonts/Helvetica-Bold.afm!
ERR005: Unable to open font width file
/usr/obj/ports/htmldoc-1.9.23/fake-amd64/usr/local/share/htmldoc/fonts/Times-Roman.afm!
Prior versions of htmldoc in the past instead used to leak a literal(!)
${DESTDIR} as path prefix.
>How-To-Repeat:
1. Install git and htmldoc packages.
2. git clone https://gitlab.com/fetchmail/fetchmail.git
3. cd fetchmail
4. cp fetchmail-FAQ.html fetchmail-FAQ-print.html
5. /usr/local/bin/htmldoc --logoimage bighand.png --batch fetchmail-FAQ.book
See hundreds of ERR005 messages
>Fix:
Please make sure that the package's build-time path, for instance,
/usr/obj/ports/htmldoc-1.9.23/fake-amd64/, does not end up in the built
binaries.
Workaround (system-specific, this works for amd64):
doas mkdir -p /usr/obj/ports/htmldoc-1.9.23/
doas ln -sfn / /usr/obj/ports/htmldoc-1.9.23/fake-`uname -m`
doas chmod a+x /usr/obj