On 2024/03/06 10:15:26 -0800, Andi Vajda <o...@ovaltofu.org> wrote: > > 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.
Good catch! With the 7.4 I reworked much of the configure script, this is an un-indented fallout from it. In particular, we explicitly enable -R for NetBSD. Can you please test the attached diff? Should make your original ./configure invocation (i.e. without the -R flag in LDFLAGS and with --with-libssl) to work out-of-the-box again, hopefully! (I don't have a NetBSD machine available, it doesn't boot on OpenBSD vmd yet, and don't generally have non-virtualized linux at hand to try with qemu ^^") also, remember to run ./bootstrap after applying the patch to re-generate the configure script. > [...] > 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 This is really puzzling. Maybe there are duplicate lines in /etc/passwd? I'm failing to see how this may happen! :( Thanks, Omar Polo diff /home/op/w/opensmtpd commit - d5cc081b5b4591c49b9b0ebb6c3cb0ba37cbfa30 path + /home/op/w/opensmtpd blob - e0cc6d8fb1d54728c91296dbd76a20249645834e file + configure.ac --- configure.ac +++ configure.ac @@ -60,6 +60,7 @@ AS_IF([test "x$with_libbsd" != xno], [ ])]) ]) +need_dash_r= need_libasr=yes pkglibexecdir="$libexecdir/opensmtpd" AS_CASE(["$host"], @@ -80,6 +81,7 @@ AS_CASE(["$host"], AC_DEFINE([SPT_TYPE], [SPT_REUSEARGV]) ], [*-*-netbsd*], [ + need_dash_r=yes AM_CFLAGS="$AM_CFLAGS -D_OPENBSD_SOURCE" ], [*-*-openbsd*], [ @@ -635,15 +637,12 @@ if test "x$no_attrib_nonnull" != "x1"; then AC_DEFINE([HAVE_ATTRIBUTE__NONNULL__], [1], [Have attribute nonnull]) fi -need_dash_r= AC_ARG_WITH([rpath], [ --without-rpath Disable auto-added -R linker paths], - [ - if test "x$withval" = "xyes"; then - need_dash_r=1 - fi - ] -) + AS_CASE(["$withval"], + [yes], [need_dash_r=yes], + [no], [need_dash_r=''] +)) AC_ARG_WITH([cflags], [ --with-cflags Specify additional flags to pass to compiler],