On Wed, 6 Mar 2024, Omar Polo wrote:

So the issue is that at runtime ld.so fails to load libevent2 somehow...

I took a closer look at config.log files produced opensmtpd-7.3.0p2 and opensmtpd-7.4.0p1. The difference is that 7.3.0p2 uses -R flags, 7.4.0p1 does not.

The configure command below, with extra -R flags, works fine and I can build opensmtpd-7.4.0p1 from it:

./configure \
LDFLAGS='-R/home/vajda/libressl-3.8.2/local/lib -R/usr/pkg/lib' \
--prefix=`pwd`/local --with-libssl=/home/vajda/libressl-3.8.2/local \
--with-libevent=/usr/pkg \
--with-path-CAfile=/usr/pkg/share/mozilla-rootcerts/cacert.pem \
--with-path-queue=/var/spool/smtpd --with-path-empty=/var/empty \
--with-path-mbox=`pwd`/local/var/mbox --with-path-socket=/var/run \ --with-path-pidfile=/var/run

Next problem: starting opensmtpd-7.4.0p1 fails with the setuid error seen earlier when building from pkgsrc :-( (ie, pkgsrc is not the problem):

$ sudo ./local/sbin/smtpd -d -f /usr/pkg/etc/smtpd/smtpd.conf
info: OpenSMTPD 7.4.0-portable starting
crypto: setuid 1012: Operation not permitted: Operation not permitted
lookup: setuid 1012: Operation not permitted: Operation not permitted
scheduler: setuid 1012: Operation not permitted: Operation not permitted
dispatcher: setuid 1012: Operation not permitted: Operation not permitted
warn: lost processor: dnsbl exited abnormally
smtpd: setuid 1013: Operation not permitted: Operation not permitted
control: setuid 1012: Operation not permitted: Operation not permitted
queue: setuid 1013: Operation not permitted: Operation not permitted
Exiting

Andi..

Reply via email to