[2026-05-23 13:49] Bakul Shah <[email protected]> > > On May 23, 2026, at 1:33 PM, Philipp <[email protected]> wrote: > > > > Hi > > > > When building on FreeBSD you need additional LDFLAGS and CPPFLAGS which > > includes the localbase. For simpler setup the configure.ac contains > > a check for FreeBSD and adds the localbase to the compiler flags. > > > > The problem is the command to find the localbase assumes the portstree > > is availible. When the portstree is not availible the configure script > > fails while checking for connect. > > > > So the command is: > > > >> echo '.include <bsd.port.mk>' | make -k -f /dev/stdin -V LOCALBASE > > > > and gives following output on my machine: > > > >> make: /usr/share/mk/bsd.port.mk:27: Cannot open /usr/ports/Mk/bsd.port.mk > >> in /dev/stdin:1 > >> make: Fatal errors encountered -- cannot continue > >> make: stopped in /home/satanist > > > > /home/satanist is my home directory. Only the last line is written to > > stdout and the exitcode is 1. > > > > I have some ideas how to fix this: > > > > * only output a warning when FreeBSD is detected > > * fallback to /usr/local/ when the command fails > > * remove the special handling completly > > * add a specia --localbase to configure when run on *BSD > > > > I have no idea what the best way is to fix this. > > What about just creating /usr/port/Mk/* ? > I just did that (unmounted /usr/port and added the above dir) > and ./configure completed fine.
I'm not sure if you want to help me getting nmh build or find a fix for the issue. So to be clear: I'm able to workaround this issue. Why I have written the mail: I would argue building should either work without having to tinker on your system or fail with a reasonable error message. So I would say this is a bug in the build system. Philipp
