🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#236
From: Mark Millard
Date: Wed, 25 Nov 2026 02:45
227 lines
14000 bytes
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
> 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 ?

> 
> 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 image used to set the system up was 
>>> FreeBSD-16.0-CURRENT-arm-armv7-GENERICSD-20261102-cfbf11308b58-290542.img
>>>
>>> Might this be a preliminary step toward configuring sendmail to operate
>>> in a secure mode? There's a section in the sendmail README directory
>>> headed
>>> +------------------------------------+
>>> | SASL COMPILATION AND CONFIGURATION |
>>> +------------------------------------+
>>> but no guidance on how to turn the feature off.
>>
>> As far as I can tell, FreeBSD never turned the feature on by default
>> when that "#if SASL" line existed and did not have all the files
>> required for being enabled to actually build.
>>
>>>
>>> Might something along the lines of -DSASL=0 on the buildworld
>>> line be a workaround?
>>
>> FreeBSD OS never had a sasl.h as far as I can tell and so never could
>> build with SASL enabled as long as the text that I quoted was in place
>> --unless some other context was provided and made accessible that did
>> provide such a file.
>>
>> -DSASL=0 correctly propagated to the C/C++ commands may be a workaround
>> but it appears to me that ending up with SASL defined (and non-zero)
>> needs an explanation --or whatever is going on.
>>
>> Do you have any lines with -DSASL in /etc/make.conf or /etc/src.conf or
>> the like? (poudriere has its own places for *make*.conf types of files.)
> Only the example in /etc/make.conf found above..
> 
>>
>> Have you checked if the involved:
>>
>> /usr/src/contrib/sendmail/src/sendmail.h
>>
>> is as I described? Might the file be corrupt (given recent file
>> corruption history you have had)? (So, may be the logic ended up
>> different than what I copied.)
>>
> This is a fresh install on a different disk, so hopefully not! 
> 
> It's also the first from-scratch setup of a Pi2 since armv7 was
> demoted to tier-2 status, which changed the setup sequence for
> self-hosting. 
> 
> Thanks for writing!
> 
> bob prohaska
> 
> 


-- 
===
Mark Millard
marklmi at yahoo.com


--
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: <8499bbb4-c5c6-47f8-a6c7-e95ef84c8108@yahoo.com>
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.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: <> <awXEfCYhcfwHZR8q@www.zefox.net>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.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: Mark Millard <marklmi@yahoo.com>
Newsgroups: muc.lists.freebsd.current
Subject: Re: fatal error: 'sasl.h' file not found
Date: Tue, 24 Nov 2026 18:45:53 -0800
Organization: Newsgate at muc.de e.V.
Approved: news-admin@muc.de
Distribution: world
Message-ID: <8499bbb4-c5c6-47f8-a6c7-e95ef84c8108@yahoo.com>
References: <> <awXEfCYhcfwHZR8q@www.zefox.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="62356"; mail-complaints-to="news-admin@muc.de"
User-Agent: Mozilla Thunderbird
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795574785;
	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:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references:list-id:list-help:
	 list-owner:list-unsubscribe:list-subscribe:list-post;
	bh=qAAb5rWAuWdiJgE4YFDlhuLsP7NZhOSKvqY0vglrBK0=;
	b=b3wuL5FpBKuo88X+nG+mPhnwmgAzx9ysKXX5QpLJv6Ghdr9B1hTwXoE7spWc7eioRbhBDr
	YjndyrB6QrWhbiOjdWa9WtuPel2mYDGIG3VLk9wgAbAAx3mCM8PptWdtq9LUgJvTyO1VjQ
	qcik/OuDxzPd5VOl0ZBwJuoOEeGza/L8mbFoXi2ONiUFPAE6QX/yEaXlUwwZanvXY637F/
	jZpkJLn3uIR/D2z8p0EAq++bRKog7NgwdegenP3R6GCfeux6YViHwILqoSfDpYpp5WmjDR
	AnGUTjVdwwCz2e2WEsOiT/Vw/HjfNrNIqKosErqrfyQcN2587sAVvAWec/Wb/w==
X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org
Authentication-Results: mx1.freebsd.org;
	dkim=pass header.d=yahoo.com header.s=s2048 header.b=nXeEOS6J;
	spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 34.2.70.26 as permitted sender) smtp.mailfrom=marklmi@yahoo.com;
	dmarc=pass (policy=reject) header.from=yahoo.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1795574756; bh=qAAb5rWAuWdiJgE4YFDlhuLsP7NZhOSKvqY0vglrBK0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:Content-Type:From:Subject:Reply-To:Content-Type; b=nXeEOS6J9o8+BMQvEmL0nqljhWsG/ogB/EHYwQ58q5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uYRq.3lIGhor1zFxxCjw4bXCcxmd5TUNWrYMZvF8YTOseUZqRJMj7vG0xKyK.lEC2qHz8
 qG.WKjuShXxkRqhYYxkxYyUD0wkSAiaCOYEVZME.bwdOUawgtyYnKvx4aLDG8NRUb3h0fD5UjUHY
 91suYiBLrlQOxGVqkTq3qJf208aUz28ymANon78KyJp9XHQOfAsOd3ruFjy2JxrJQIqEeITkK1P1
 GIOOPUctMFLSG8o2iqVM82zLQaL.tafMxx.Z5AgKX6mHgpcpB4bTtWxRxoYaKbiF.aiyeMnZCOzv
 0tzlaUhTS75GBMsjR1z42KtNoC69Uu4kOWIrDxrLwNsTAQrmNBF4wde631S4X.KdDM7NahwBN3aj
 y14CrnKW5jdREKKVGI5rVMPQpCmmRj7PUhmsg4uakJzC65blqfizyiLb_hbNm_1YLmkPR7aFPa_j
 oBtbX1HN0rYr4XYl4Micn3v5PS8yZL5YtHdOF0XHFW2.v2WmsE8uShexI9s1s5vjqsrchb.9eKUk
 miqLv9QQqv7ftEY1rdIL22npb_8TxHYhCy1sapwyNLMcAXB1BLwpnlPsQ4VgB5fBMr_updEMuJ82
 fhkoRffx3p1v4385eX.mT86T.PU3UUxZjiRnwoS8IW5MRrdZJYJyvSZlWSiH7RMKKMdgEM9_AH6c
 XHM.ab7CYSrOIVH5lpWE2gXxajMrsRvzKq143PhygzJ0pRj8t.bGMBVHXJ2fEo.izqYLtNOFRNRv
 .0_.picXbvVL4uEbK5JSHi0lAa81NekjYSe4CC0pXxrkXdBOM8TWbklSikEfkqkXwdLfViMk-
X-Sonic-MF: <marklmi@yahoo.com>
X-Sonic-ID: 1ae56068-2c85-4ebf-bc98-15a0d38eab27
Precedence: list
Content-Language: en-US
In-Reply-To: <awXEfCYhcfwHZR8q@www.zefox.net>
X-Rspamd-Queue-Id: 4jZ3vp0FQGz4RjS
X-Spamd-Bar: -
X-Spamd-Result: default: False [-1.20 / 15.00];
	DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject];
	R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048];
	RWL_MAILSPIKE_VERYGOOD(-0.20)[34.2.70.26:from];
	R_SPF_ALLOW(-0.20)[+ip4:34.2.64.0/19];
	MIME_GOOD(-0.10)[text/plain];
	ARC_NA(0.00)[];
	ASN(0.00)[asn:15169, ipnet:34.2.70.0/23, country:US];
	TO_DN_SOME(0.00)[];
	MIME_TRACE(0.00)[0:+];
	FREEMAIL_ENVFROM(0.00)[yahoo.com];
	FREEMAIL_FROM(0.00)[yahoo.com];
	MID_RHS_MATCH_FROM(0.00)[];
	RCPT_COUNT_TWO(0.00)[2];
	MLMMJ_DEST(0.00)[freebsd-current@freebsd.org];
	FROM_EQ_ENVFROM(0.00)[];
	FROM_HAS_DN(0.00)[];
	RCVD_IN_DNSWL_NONE(0.00)[34.2.70.26:from];
	RCVD_COUNT_TWO(0.00)[2];
	DWL_DNSWL_NONE(0.00)[yahoo.com:dkim];
	TO_MATCH_ENVRCPT_SOME(0.00)[];
	RCVD_TLS_LAST(0.00)[];
	DKIM_TRACE(0.00)[yahoo.com:+]
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes