From owner-freebsd-stable@freebsd.org Sat Oct 21 23:40:28 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1482EE3D1E6 for ; Sat, 21 Oct 2017 23:40:28 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECEDB6F871 for ; Sat, 21 Oct 2017 23:40:27 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 3d523b24-b6b9-11e7-a938-4f970e858fdb X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 3d523b24-b6b9-11e7-a938-4f970e858fdb; Sat, 21 Oct 2017 23:40:37 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v9LNeJek014381; Sat, 21 Oct 2017 17:40:19 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1508629219.1383.113.camel@freebsd.org> Subject: Re: Freebsd 10 to 11 sendmail compile issues.. From: Ian Lepore To: Howard Leadmon , freebsd-stable@freebsd.org Date: Sat, 21 Oct 2017 17:40:19 -0600 In-Reply-To: <7a4b5f15-1bab-9ab4-1ecf-8ffbf8546758@leadmon.net> References: <7a4b5f15-1bab-9ab4-1ecf-8ffbf8546758@leadmon.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Oct 2017 23:40:28 -0000 On Sat, 2017-10-21 at 19:22 -0400, Howard Leadmon wrote: >   Hopefully someone can help or give me a pointer to a solution to this  > one.   Running FreeBSD 10.3 and figured I would do a source build and  > jump to FreeBSD 11.1.  For the most part this seemed to be going well,  > but when it goes to compile sendmail, it spits out the following error: > > bmake[4]: "/usr/src/share/mk/src.libnames.mk" line 391:  > /usr/src/libexec/mail.local: These libraries should be LIBADD+=foo  > rather than DPADD/LDADD+=-lfoo:  ssl crypto > > > I have the following flags in /etc/make.conf: > > SENDMAIL_CFLAGS= -I/usr/local/include -DSASL=2 -DDNSMAP -DSTARTTLS > SENDMAIL_LDFLAGS= -L/usr/local/lib > SENDMAIL_LDADD= -lsasl2 -lssl -lcrypto > > >   So I trhought OK, simple enough looking at the error and changed this  > over to the following: > > SENDMAIL_CFLAGS= -I/usr/local/include -DSASL=2 -DDNSMAP -DSTARTTLS > SENDMAIL_LDFLAGS= -L/usr/local/lib > SENDMAIL_LIBADD+= sasl2 ssl crypto > >   After that the error received was that I didn't has sasl2: > > --- ELF/Arch/AMDGPU.o --- > c++   -O2 -pipe -march=nocona -I/usr/src/contrib/llvm/tools/lld/ELF  > -I/usr/src/contrib/llvm/tools/lld/include  > -I/usr/obj/usr/src/usr.bin/clang/lld  > -I/usr/obj/usr/src/lib/clang/libllvm -I/usr/src/lib/clang/include  > -I/usr/src/contrib/llvm/include -DLLVM_BUILD_GLOBAL_ISEL  > -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG  > -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd11.1\"  > -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd11.1\" -DDEFAULT_SYSROOT=\"\"  > -ffunction-sections -fdata-sections -g -MD -MF.depend.ELF_Arch_AMDGPU.o  > -MTELF/Arch/AMDGPU.o -fstack-protector-strong -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-unused-local-typedef  > -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum  > -Wno-knr-promoted-parameter -Wno-parentheses -Qunused-arguments  > -std=c++11 -fno-exceptions -fno-rtti -stdlib=libc++  > -Wno-c++11-extensions  -c  > /usr/src/contrib/llvm/tools/lld/ELF/Arch/AMDGPU.cpp -o ELF/Arch/AMDGPU.o > --- all_subdir_usr.sbin --- > deliver.o: In function `endmailer': > /usr/src/contrib/sendmail/src/deliver.c:3874: undefined reference to  > `sasl_dispose' > deliver.o: In function `deliver': > /usr/src/contrib/sendmail/src/deliver.c:3137: undefined reference to  > `sasl_getprop' > main.o: In function `main': > /usr/src/contrib/sendmail/src/main.c:2303: undefined reference to  > `sasl_server_init' > /usr/src/contrib/sendmail/src/main.c:2305: undefined reference to  > `sasl_errstring' > sasl.o: In function `sm_sasl_init': > /usr/src/contrib/sendmail/src/sasl.c:146: undefined reference to  > `sasl_set_alloc' > sfsasl.o: In function `sasl_read': > /usr/src/contrib/sendmail/src/sfsasl.c:224: undefined reference to  > `sasl_decode' > sfsasl.o: In function `sasl_write': > /usr/src/contrib/sendmail/src/sfsasl.c:311: undefined reference to  > `sasl_getprop' > /usr/src/contrib/sendmail/src/sfsasl.c:316: undefined reference to  > `sasl_encode' > srvrsmtp.o: In function `smtp': > /usr/src/contrib/sendmail/src/srvrsmtp.c:951: undefined reference to  > `sasl_server_new' > /usr/src/contrib/sendmail/src/srvrsmtp.c:1004: undefined reference to  > `sasl_setprop' > /usr/src/contrib/sendmail/src/srvrsmtp.c:1018: undefined reference to  > `sasl_setprop' > /usr/src/contrib/sendmail/src/srvrsmtp.c:1069: undefined reference to  > `sasl_setprop' > /usr/src/contrib/sendmail/src/srvrsmtp.c:1081: undefined reference to  > `sasl_setprop' > /usr/src/contrib/sendmail/src/srvrsmtp.c:1083: undefined reference to  > `sasl_setprop' > srvrsmtp.o:/usr/src/contrib/sendmail/src/srvrsmtp.c:2254: more undefined  > references to `sasl_setprop' follow > > > >   So apparently that change seems to be including ssl and crypto but not  > sasl2 for some reason.    I have googled looking for examples of how to  > correct it, but everything I find shows the original way I had it to  > start with, and clearly that is no longer working.  Any ideas on how I  > need to define this would be most appreciated.. > > --- > Howard Leadmon > PBW Communications, LLC > http://www.pbwcomm.com > >From looking at the sendmail makefile, it looks like the ssl and crypto libraries are now added automatically unless you use the WITHOUT_OPENSSL build option, it contains this: .if ${MK_OPENSSL} != "no" # STARTTLS support CFLAGS+= -DSTARTTLS -D_FFR_TLS_1 LIBADD+= ssl crypto .endif I think that means you can now reduce the settings in your make.conf to SENDMAIL_CFLAGS= -I/usr/local/include -DSASL=2 -DDNSMAP SENDMAIL_LDFLAGS= -L/usr/local/lib SENDMAIL_LDADD= -lsasl2 and I think you won't get the LIBADD warning for -lsasl2 because it's not a standard base library (but I'm not sure of that). -- Ian