Re: Building on FreeBSD 14.4

Jeff Aitken via dovecot <[email protected]> Mon, 18 May 2026 20:04:14 -0400
Newsgroups gmane.mail.imap.dovecot
Message-ID <[email protected]>
Looks like my previous message may still be waiting on moderator approval.  After manually hacking at src/auth/Makefile, I had claude take a look:

Here's the summary of the problem and the fix:

Root cause: In 2.4.4, am__append_8 was changed to include both $(LIBDOVECOT_LUA) (a .la file dep) and $(LUA_LIBS) (raw linker flags: -L/usr/local/lib -llua-5.4 -lm). This append goes into auth_libs, which is used verbatim in auth_DEPENDENCIES. GNU make treats everything in a target's prerequisite list as files to build — it handles -l<name> specially, but -L<path> is taken literally, causing "no rule to make target '-L/usr/local/lib'".                                                               

Fix:
  1. Strip $(LUA_LIBS) from am__append_8 — leave only $(LIBDOVECOT_LUA) (the actual file dep)
  2. Add am__append_10 = $(LUA_LIBS), scoped to plugin mode only (AUTH_LUA_PLUGIN_TRUE && HAVE_LUA_TRUE) — in non-plugin mode, $(LUA_LIBS) is already covered by AUTH_LUA_LDADD
  3. Append $(am__append_10) to the five LDADD variables that need it
  
 To apply: patch src/auth/Makefile.in /path/to/patch-src-auth-Makefile.in


—Jeff


> On May 18, 2026, at 19:46, Jeff Aitken via dovecot <[email protected]> wrote:
> 
> You definitely want gmake on FreeBSD.  Also, I’m not sure if the post I sent made it through or not, but the patch I posted (for src/auth/Makefile.in) allowed me to compile cleanly (other than the "libtool: warning: Linking the shared library […]” warnings).
> 
> 
> —Jeff
> 
> 
>> On May 18, 2026, at 18:59, Mel P via dovecot <[email protected]> wrote:
>> 
>> On 2026-05-17 16:59, Frank Volf via dovecot wrote:
>>>   Hi,
>>>   I'm trying to build dovecot-2.4.4 on FreeBSD 14.4 and I get a strange
>>>   error message.
>> [...]
>>>     make[3]: don't know how to make -L/usr/local/lib. Stop
>>>     make[3]: stopped making "all" in /home/volf/dovecot-2.4.4/src/auth
>>>     *** Error code 1
>> 
>> The Dovecot ports use gmake, so you probably need to install and use the GNU bintools (gmake, m4, autoconf, etc.) to build it manually.
>> 
>> Also, the PR Michael Grimm posted contains a skeleton for a Dovecot 2.4 port.  You might try that instead.
>> _______________________________________________
>> dovecot mailing list -- [email protected]
>> To unsubscribe send an email to [email protected]
> 
> _______________________________________________
> dovecot mailing list -- [email protected]
> To unsubscribe send an email to [email protected]

_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]