Solved fatal error: 'sasl/sasl.h' file not found

Hi, everyone,

Trying to get SMTP Authentication working. Following the steps in the Handbook. Got to #5 and ran into:

Code:
#   ls -l /usr/src
total 0

Was directed to How do you install the FreeBSD10 kernel sources? Ugh, but installed devel/subversion and then:

Code:
# svn checkout https://svn.FreeBSD.org/base/head /usr/src
[...]
Checked out revision 313568.
# svn up /usr/src
Updating '/usr/src':
At revision 313569.
# cd /usr/src; make clean

Seemed to me to go OK. Tried step #5 again:

Code:
#   cd /usr/src/lib/libsmutil
# make cleandir && make obj && make
rm -f sm_os.h debug.o err.o lockfile.o safefile.o snprintf.o cf.o  libsmutil.a
rm -f .depend .depend.* GPATH GRTAGS GSYMS GTAGS
/usr/obj/usr/src/lib/libsmutil created for /usr/src/lib/libsmutil
ln -sf /usr/src/contrib/sendmail/include/sm/os/sm_os_freebsd.h sm_os.h
cc  -O2 -pipe -I/usr/src/contrib/sendmail/src -I/usr/src/contrib/sendmail/include -I. -DNEWDB -DNIS -DMAP_REGEX -DNOT_SENDMAIL -I/usr/local/include/sasl -DSASL=2   -MD -MP -MF.depend.debug.o -MTdebug.o -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments  -c /usr/src/contrib/sendmail/libsmutil/debug.c -o debug.o
In file included from /usr/src/contrib/sendmail/libsmutil/debug.c:11:
/usr/src/contrib/sendmail/src/sendmail.h:139:12: fatal error: 'sasl/sasl.h' file
      not found
#  include <sasl/sasl.h>
           ^
1 error generated.
*** Error code 1

Stop.
make: stopped in /usr/src/lib/libsmutil

In fact there is no /usr/src/contrib/sendmail/src/sasl/sasl.h. But there is a
/usr/local/include/sasl/sasl.h.

I'm a newbie and in over my head. I guess my questions are:

1. Would it work just to copy /usr/local/include/sasl/ to /usr/src/contrib/sendmail/src/sasl/?

2. Or should I try the alternative instructions at FreeBSD - How to setup Mail Server:

Code:
# cd /usr/src/
# make buildworld                     # this may take about an hour to compile
# cd /usr/src/usr.sbin/sendmail/
# make clean
# make depend
# make
# make install

Thanks for any help you can provide!

Bob
 
FYI, found my answer here:

Code:
> What should I do next? Shold I just copy the sasl.h to
> /usr/src/contrib/sendmail/src/sendmail   ?

No.  Don't do that.  It won't help anything.

You need to follow my instructions correctly.  Specifically this line
needs to be in /etc/make.conf in order to pick up the SASL header files:

SENDMAIL_CFLAGS=-I/usr/local/include -DSASL=2

Where, you will note, this does *not* say /usr/local/include/sasl, which
is what appears in your compiler output.

which I think means the 1st line of step 4 of 27.9. SMTP Authentication in the Handbook should be corrected.
 
Just a warning, using base/head will get you a CURRENT release, in other words: the development branch of FreeBSD. And that could clash with your system if you're using a regular one (like the common RELENG). Problem is that CURRENT is basically a beta, and considered to be unstable, because it's a development snapshot.

If I recall correctly you ran FreeBSD 11? In that case this URL is a better one: svn://svn.freebsd.org/base/releng/11.0 (or https:// of course). That will get you the current (stable) release of FreeBSD. And just to avoid confusion: with stable I'm referring to the state of the source tree, not STABLE which is another development snapshot.

I think this also answers your question.
 
Thanks. Actually freebsd-version tells me I have 10.3-RELEASE-p16. So should I go back and:

Code:
# svn checkout https://svn.FreeBSD.org/base/releng/10.3 /usr/src
# svn up /usr/src
# cd /usr/src; make clean

And then again either:

Code:
# cd /usr/src/lib/libsmutil
# make cleandir && make obj && make
# cd /usr/src/lib/libsm
# make cleandir && make obj && make
# cd /usr/src/usr.sbin/sendmail
# make cleandir && make obj && make && make install

or:

Code:
# cd /usr/src/
# make buildworld                     # this may take about an hour to compile
# cd /usr/src/usr.sbin/sendmail/
# make clean
# make depend
# make
# make install

Is one of those preferable to the other?
 
Hey, I think it's working! Did svn again. And went with option 1 above, which was from the Handbook. Thanks again for your help.
 
Back
Top