🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.freebsd.current
Article #237

Re: fatal error: 'sasl.h' file not found

#237
From: bob prohaska
Date: Wed, 25 Nov 2026 03:56
201 lines
9577 bytes
On Tue, Nov 24, 2026 at 06:45:53PM -0800, Mark Millard wrote:
> On 11/24/26 09:08, bob prohaska wrote:
> > For context,
> > This host's setup sequence was:
> > install a snapshot
> > download src and ports using tarballs
> > copy pkg from another armv7 (Pi2) host
> > use make in /usr/ports to install poudriere
> > set up a local pkg repository
> > use poudriere to make git
> > replace /usr/src and /usr/ports using git clone
Forgot to mention, next step was buildworld, which is failing.
More discoveries below...

> > This sequence has never been tried before by me.
> > 
> > On Mon, Nov 23, 2026 at 05:58:58PM -0800, Mark Millard wrote:
> >> On 11/23/26 14:34, bob prohaska wrote:
> >>> On Mon, Nov 23, 2026 at 10:52:22AM -0800, Mark Millard wrote:
> >>>> On 11/23/26 07:51, bob prohaska wrote:
> >>>>>
> >>>>> A new armv7 host is trying to build -current but stops with:
> >>>>>
> >>>>> ......
> >>>>> In file included from /usr/src/contrib/sendmail/libmilter/libmilter.h:33:
> >>>>> /usr/src/contrib/sendmail/src/sendmail.h:281:12: fatal error: 'sasl.h' file not found
> >>>>>   281 | #  include <sasl.h>
> >>>>>       |            ^~~~~~~~
> >>>>> 1 error generated.
> >>>>> *** [main.o] Error code 1
> >>
> >> Do  you use sendmail in a way that involves SMTP AUTH? 
> > 
> > Not intentionally. I do have in /etc/rc.conf the lines:
> > sendmail_enable="YES"
> > sendmail_submit_enable="YES"
> > sendmail_outbound_enable="YES"
> 
> As I understand, SASL is involved for forwarding email without using
> port 25 (tends to be blocked in various types of contexts) and need to
> authenticate with a relay host. (Forwarding is a form of outbound.)
>
> If that is part of your context but incoming is not part of the context,
> then you need to use sendmail.mc and /etc/maik/authinfo --and
> installation of, say, security/cyrus-sasl2 before buildworld.
> 
> You would need the likes of security/cyrus-sasl2 installed as already
> present in order to have the sendmail part of buildworld build with SASL
> support. Your lines in /etc/make.conf then change how buidlworld works,
> putting such to use.
> 
> > sendmail_msp_queue_enable="YES"
> > 
> > 
> > 
> >> Do you have
> >> security/cyrus-sasl or the like installed? 
> 
> These days, likely: security/cyrus-sasl2 ?
No, never attempted it.

> 
> > 
> > Nothing named cyrus-sasl, according to 
> > pkg info -a
> > 
> >> Do you have related
> >> /etc/make.conf file lines like:
> >>
> >> SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL
> >> SENDMAIL_LDFLAGS=-L/usr/local/lib
> > 
> > Only the two lines above, the first looks suspicious.
> 
> So far as I know the 2 SENDMAIL_* lines above are not default
> /etc/make.conf content. Looks like you explicitly enabled SASL building
> via the "SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL" line.
> 
> Looks like you nearly copied part of:
> 
> <https://man.freebsd.org/cgi/man.cgi?make.conf(5)>
> 
> QUOTE
>      SENDMAIL_CFLAGS
> 		   (str)  Flags  to  pass  to  the compile command when building
> 		   sendmail(8).  The SENDMAIL_* flags can  be  used  to  provide
> 		   SASL support with setting such as:
> 
> 			 SENDMAIL_CFLAGS=-I/usr/local/include -DSASL
> 			 SENDMAIL_LDFLAGS=-L/usr/local/lib
> 			 SENDMAIL_LDADD=-lsasl
> END QUOTE
> 
> (In modern times -lsasl2 may be more likely when SASL is to be in use?)
> 
> > I'm tempted to comment it out.
> > I didn't put it there intentionally.
> > 
> >> SENDMAIL_LDADD=-lsasl2
> > is absent.
> 
> If you build such that  /usr/local/lib/libsasl2.so would be put to use,
> the SENDMAIL_LDADD=-lsasl2 is likely required. If there is a static
> linking build done instead, then not.
> 
> > 
> > 
> >> (including in poudriere *make*.conf equivalent places)?
> >>
> > I think not, grep -ir sasl /usr/local/etc/* produces no output.
> >  
> >>>>>
> >>>>> .....
> >>>>> Sources were reset --hard this morning, so up-to-date, but no change.
> >>>>>
> >>>>> A web search finds reports for similar errors, but none seem recent. 
> >>>>>
> >>>>> Thanks for reading and any suggestions!
> >>>>>
> >>>>> bob prohaska
> >>>>>  
> >>>>>
> >>>>>
> >>>>
> >>>> The code in question has looked like:
> >>>> ( /usr/src/contrib/sendmail/src/sendmail.h )
> >>>>
> >>>> #if SASL
> >>
> >> Note: The above line was added at 2020-07-15 18:28:54 +0000
> >> (
> >> <https://cgit.freebsd.org/src/commit/contrib/sendmail?id=5b0945b57059d1cde0831d3afea7ec56c7d79508>
> >> )
> >>
> >>>> /* include the sasl include files if we have them */
> >>>> # if SASL == 2 || SASL >= 20000
> >>>> #  include <sasl/sasl.h>
> >>>> #  include <sasl/saslplug.h>
> >>>> #  include <sasl/saslutil.h>
> >>>> #  if SASL_VERSION_FULL < 0x020119
> >>>> typedef int (*sasl_callback_ft)(void);
> >>>> #  endif
> >>>> # else /* SASL == 2 || SASL >= 20000 */
> >>>> #  include <sasl.h>
> >>>> #  include <saslutil.h>
> >>>> typedef int (*sasl_callback_ft)(void);
> >>>> # endif /* SASL == 2 || SASL >= 20000 */
> >>>>
> >>>> The code line :281 is the line after the else.
> >>>>
> >>>> contrib/sendmail/ has not changed after 2025-10-09 .
> >>>>
> >>>> My guess is that previously SASL was 0 or undefined in your context.
> >>>>
> >>>> For reference in the context I looked at:
> >>>>
> >>>> # find -s / -name sasl.h -print
> >>>> #
> >>>>
> >>>> My understanding is that such has always or long been the case.
> >>>>
> >>>> I've no clue how your build ended up with SASL defined, much less with a
> >>>> value for which the else clause was used.
> 
> You answered how SASL has a way to be defined in your context.
> 
> You appear to be set up for having buildworld depend on a FreeBSD port
> in order for outgoing forwarding to authenticate.

The puzzle then is what invoked authentication. I didn't, I simply used 
sendmail because it will honor a .forward file in /root so the mail goes 
to my usual mail-reading host and username. Far as I know, DMA doesn't
use .forward files. 

Here's a clue, maybe....

# pkg info -a finds:

p5-Authen-SASL-2.2100          Perl5 module for SASL authentication

installed. I didn't invoke it intentionally. Could that installation
have made the change to /etc/make.conf? 

For what it's worth, commenting out the
SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL
line seems to be allowing buildworld to continue past its
former stopping point. 

The way dependency trees in ports can grow is quite amazing. 
Has anybody found a way to sanity-test them? It's really a
question for the freebsd-ports mailing list.....

Thanks for writing!

bob prohaska



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID: <awZcV-cR-Y7tKqBp@www.zefox.net>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
References: <> <8499bbb4-c5c6-47f8-a6c7-e95ef84c8108@yahoo.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: bob prohaska <fbsd@www.zefox.net>
Newsgroups: muc.lists.freebsd.current
Subject: Re: fatal error: 'sasl.h' file not found
Date: Tue, 24 Nov 2026 19:56:07 -0800
Organization: Newsgate at muc.de e.V.
Approved: news-admin@muc.de
Distribution: world
Message-ID: <awZcV-cR-Y7tKqBp@www.zefox.net>
References: <> <8499bbb4-c5c6-47f8-a6c7-e95ef84c8108@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="10110"; mail-complaints-to="news-admin@muc.de"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795578807;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
	 in-reply-to:in-reply-to:references:references:list-id:list-help:
	 list-owner:list-unsubscribe:list-subscribe:list-post;
	bh=GTqBS1mxPCbj1+2C5Er5qacwfYzfA+aSDCJf2xDeYwc=;
	b=G3yiu7X/KtN0lZqoKY6DhMgPrxvbX+yMfutyIvFXJvA67LvtL95v3k+zFoywV4KrwHGNjp
	XuglFKoJJUUUWkHOnhTbiv/+gbjM+oCnGhaftO/TcCuKv67c4M4HqQAfFJOEdrInFKQT2v
	qGxZKX/uUMapwBOJn/p5eqX56XGpvQp7Y+K/aRbujTvgzuxc2epg5x+PV7mN72xDB1Zkvf
	2E7zov8QHyvB7VYQb5fRz0wqP0iL6n0LXY+9xnJVBo3r0VHgGGPdXsNu9nRY6qup99MP7c
	geyUMFZcHsjozYotdoyMwD2huwNQivLfVKJ31ElqZODmtLElcPPCajmymLehAg==
X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org
Authentication-Results: mx1.freebsd.org;
	dkim=none;
	dmarc=none;
	spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net
Precedence: list
Content-Disposition: inline
In-Reply-To: <8499bbb4-c5c6-47f8-a6c7-e95ef84c8108@yahoo.com>
X-Rspamd-Queue-Id: 4jZ5P72yPNz4Z2R
X-Spamd-Bar: +
X-Spamd-Result: default: False [1.90 / 15.00];
	AUTH_NA(1.00)[];
	MID_RHS_WWW(0.50)[];
	WWW_DOT_DOMAIN(0.50)[];
	MIME_GOOD(-0.10)[text/plain];
	MID_RHS_MATCH_FROM(0.00)[];
	FREEMAIL_TO(0.00)[yahoo.com];
	RCVD_TLS_LAST(0.00)[];
	ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US];
	ARC_NA(0.00)[];
	MIME_TRACE(0.00)[0:+];
	MISSING_XM_UA(0.00)[];
	R_DKIM_NA(0.00)[];
	RCPT_COUNT_TWO(0.00)[2];
	TO_DN_SOME(0.00)[];
	FROM_EQ_ENVFROM(0.00)[];
	FROM_HAS_DN(0.00)[];
	MLMMJ_DEST(0.00)[freebsd-current@freebsd.org];
	RCVD_COUNT_TWO(0.00)[2];
	DNSWL_BLOCKED(0.00)[50.1.20.27:from];
	TO_MATCH_ENVRCPT_SOME(0.00)[];
	DMARC_NA(0.00)[zefox.net];
	R_SPF_NA(0.00)[no SPF record]
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes