Created attachment 144045 [details] Full build log I've been getting build failures in my poudriere with the following config settings: lucid-nonsense:...ports/mail/sendmail:% make showconfig ===> The following configuration options are available for sendmail+tls+sasl2-8.14.9: SHMEM=on: System V shared memory support SEM=on: POSIX semaphores support LA=on: load averages support NIS=off: Network Information Services/YP support IPV6=on: IPv6 protocol support TLS=on: SMTP-TLS and SMTPS support SASL=on: SASL authentication support SASLAUTHD=off: SASLAUTHD support LDAP=off: LDAP protocol support BDB=off: Berkeley DB version 4 support SOCKETMAP=off: Enable socketmap feature CYRUSLOOKUP=off: Enable cyruslookup feature PICKY_HELO_CHECK=on: Enable picky HELO check MILTER=on: Build libmilter MILTER_SHARED=on: Build shared libmilter MILTER_POOL=on: Enable milter thread pools ===> Use 'make config' to modify these settings The error is: cc -o sendmail -L/usr/local/lib -L/usr/local/lib -rpath=/usr/local/lib main.o alias.o arpadate.o bf.o collect.o conf.o control.o convtime.o daemon.o deliver.o domain.o envelope.o err.o headers.o macro.o map.o mci.o milter.o mime.o parseaddr.o queue.o ratectrl.o readcf.o recipient.o sasl.o savemail.o sfsasl.o shmticklib.o sm_resolve.o srvrsmtp.o stab.o stats.o sysexits.o timers.o tls.o trace.o udb.o usersmtp.o util.o version.o -lwrap -lsasl2 -lssl -lcrypto /wrkdirs/usr/ports/mail/sendmail/work/sendmail-8.14.9/obj.FreeBSD.10.0-STABLE.amd64/libsmutil/libsmutil.a /wrkdirs/usr/ports/mail/sendmail/work/sendmail-8.14.9/obj.FreeBSD.10.0-STABLE.amd64/libsm/libsm.a -lutil cc: error: unknown argument: '-rpath=/usr/local/lib' *** Error code 1 Full log attached. Switching that command line to use -Wl,-rpath=/usr/local/lib fixes the problem.
Created attachment 144046 [details] Patch
Over to maintainer
Problem is nor reproducible on FreeBSD 10.0 RELEASE.
*** Bug 191074 has been marked as a duplicate of this bug. ***
proposed patch rejected. A cleaner fix has been committed.
sendmail+tls+sasl2+db49-8.4.19_2 is still broken with regard to "-Wl,-rpath" option for me on FreeBSD 9.1 using gcc49 and either m4 or gm4. gm4 is more helpful about the problem: ===> Building for sendmail+tls+sasl2+db42-8.14.9_2 Making all in: /usr/ports/mail/sendmail/work/sendmail-8.14.9/libsm Configuration: pfx=, os=FreeBSD, rel=9.1-RELEASE-p6, rbase=9, rroot=9.1-RELEASE-p6, arch=amd64, sfx=, variant=optimized Using M4=/usr/local/bin/gm4 Creating /usr/ports/mail/sendmail/work/sendmail-8.14.9/obj.FreeBSD.9.1-RELEASE-p6.amd64/libsm using /usr/ports/mail/sendmail/work/sendmail-8.14.9/devtools/OS/FreeBSD Including /usr/ports/mail/sendmail/work/sendmail-8.14.9/devtools/Site/site.config.m4 /usr/local/bin/gm4:stdin:109: Warning: excess arguments to builtin `define' ignored /usr/local/bin/gm4:stdin:109: Warning: excess arguments to builtin `define' ignored /usr/local/bin/gm4:stdin:109: Warning: excess arguments to builtin `define' ignored /usr/local/bin/gm4:stdin:109: Warning: excess arguments to builtin `define' ignored /usr/local/bin/gm4:stdin:109: Warning: excess arguments to builtin `define' ignored Which leads to this error: gcc49 -o sendmail -Wl -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib main.o alias.o arpadate.o bf.o collect.o conf.o control.o convtime.o daemon.o deliver.o domain.o envelope.o err.o headers.o macro.o map.o mci.o milter.o mime.o parseaddr.o queue.o ratectrl.o readcf.o recipient.o sasl.o savemail.o sfsasl.o shmticklib.o sm_resolve.o srvrsmtp.o stab.o stats.o sysexits.o timers.o tls.o trace.o udb.o usersmtp.o util.o version.o -lwrap -lsasl2 -lssl -lcrypto -ldb-4.2 /usr/ports/mail/sendmail/work/sendmail-8.14.9/obj.FreeBSD.9.1-RELEASE-p6.amd64/libsmutil/libsmutil.a /usr/ports/mail/sendmail/work/sendmail-8.14.9/obj.FreeBSD.9.1-RELEASE-p6.amd64/libsm/libsm.a -lutil gcc49: error: unrecognized command line option '-Wl' As you can see, the arg to APPENDDEF in .../devtools/Site/site.config.m4 is incorrectly converted from: APPENDDEF(`confLDOPTS', `-Wl,-rpath=/usr/local/lib') ending up in the work/sendmail.../obj.../*/Makefiles as: LDOPTS= -Wl As a work-around, I did the "make configure" stage first then edited work/sendmail.../devtools/Site/site.config.m4 and changed that line to: APPENDDEF(`confLDOPTS', ``-Wl,-rpath=/usr/local/lib'') (i.e. double-quoting) Following the edit with the usual "make build", etc. seems to then work.
I can not reproduce your problem even with 9.1, gcc49 and gm4 installed the ports builds fine. Please check your enviroment, /etc/make.conf.