?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
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 cryptolibraries 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
From: Howard Leadmon <howard at leadmon.net> Subject: Freebsd 10 to 11 sendmail compile issues.. Date: Sat, 21 Oct 2017 19:22:40 -0400> 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 cryptoIt seems you intend to link base sendmail binary with library that is installed by security/cyrus-sasl2 port. If so I think following steps are required. 1. Temporarily comment out all sendmail related settings in /etc/make.conf 2. Rebuild operating system and upgrade from 10.3 to 11.1. 3. Rebuild all installed ports on 11.1. 4. Enable settings again that is disabled at step 1 and rebuild base sendmail. To be honest I'm not sure if step 4 succeed. But it is quite possible that linking binary for 11.1 with library built on 10.3 causes unpredictable trouble. So you should keep above steps anyway. --- Yasuhiro KIMURA