Re: OpenDKIM 2.8.0 Beta5 available

From: Scott Kitterman <ietf-dkim_at_kitterman.com>
Date: Sat, 16 Feb 2013 02:56:21 -0500

On Saturday, February 16, 2013 01:05:22 AM Scott Kitterman wrote:
> On Friday, February 15, 2013 09:36:08 PM Murray S. Kucherawy wrote:
> > On Sat, 16 Feb 2013, Scott Kitterman wrote:
> > > dkim-cache.c: In function 'dkim_cache_stats':
> > > dkim-cache.c:521:4: warning: implicit declaration of function 'free' [-
> > > Wimplicit-function-declaration]
> > > dkim-cache.c:521:4: warning: incompatible implicit declaration of
> > > built-in
> > > function 'free' [enabled by default]
> >
> > Patch attached.
> >
> > > util.c: In function 'dkimf_mkpath':
> > > util.c:1016:3: warning: ignoring return value of 'getcwd', declared with
> > > attribute warn_unused_result [-Wunused-result]
> >
> > Ditto.
> >
> > > And a linking error on Ubuntu (not on Debian). This is apparently
> > > related to recent changes in binutils, but I'm still investigating. If
> > > it turns out to be something that needs fixing in opendkim (I don't know
> > > if it does for sure yet or not), I can probably produce a configure.ac
> > >
> > > patch to find the lib and add it for linking:
> > >[...]
> > >
> > > /usr/bin/ld: opendkim_genzone-opendkim-db.o: undefined reference to
> > > symbol
> > > 'ber_pvt_opt_on_at__at_OPENLDAP_2.4_2'
> > > /usr/bin/ld: note: 'ber_pvt_opt_on_at__at_OPENLDAP_2.4_2' is defined in DSO
> > > /usr/lib/i386-linux-gnu/liblber-2.4.so.2 so try adding it to the linker
> > > command line
> > > /usr/lib/i386-linux-gnu/liblber-2.4.so.2: could not read symbols:
> > > Invalid
> > > operation
> >
> > Yeah, nothing changed in that code for us recently. I would think liblber
> > would be automatically included by libldap (via libtool) so maybe this was
> > a package change with OpenLDAP or something in the interim?
>
> It wasn't a change in opendkim or openldap (openldap didn't change since the
> last one that worked). libtool didn't change either. There is a recent
> binutils change that I think is relevant, but I don't know yet if it's a
> case of a bad change in binutils or an intentional change that will turn
> out to be upstream claiming we were relying on something that should never
> have worked.
>
> Thanks for the quick turnaround.

My impression is that the missing linking is something opendkim should be
doing and the openldap LIBS in configure.ac are only -lldap. I'm not sure why
it changed, but adding -llber seems to be a reasonable thing to do.

Also, I found a couple of places where you're needing to link to -lresolv and
not including it in LIBS.

Patch attached. This builds in Debian (old binutils) and Ubuntu (new
binutils) so it's portable at least that far.

Also, confirmed that the warnings are gone with the patch you sent before.

Scott K

only in patch2:
unchanged:
--- opendkim-2.8.0~beta5.orig/configure.ac
+++ opendkim-2.8.0~beta5/configure.ac
_at_@ -1713,7 +1713,7 @@
                         AC_MSG_RESULT($ldappath)
                         ldap_found="yes"
                         OPENLDAP_CPPFLAGS="-I$ldappath/include"
- OPENLDAP_LIBS="-L$ldappath/lib -lldap"
+ OPENLDAP_LIBS="-L$ldappath/lib -lldap -llber"
                 else
                         AC_MSG_ERROR(not found at $ldappath)
                 fi
_at_@ -1727,7 +1727,7 @@
                                 AC_MSG_RESULT($d)
                                 ldap_found="yes"
                                 OPENLDAP_CPPFLAGS="-I$ldappath/include"
- OPENLDAP_LIBS="-L$ldappath/lib -lldap"
+ OPENLDAP_LIBS="-L$ldappath/lib -lldap -llber"
                                 break
                         fi
                 done
only in patch2:
unchanged:
--- opendkim-2.8.0~beta5.orig/opendkim/Makefile.am
+++ opendkim-2.8.0~beta5/opendkim/Makefile.am
_at_@ -28,7 +28,7 @@
 opendkim_CFLAGS = $(PTHREAD_CFLAGS) $(LIBCRYPTO_CFLAGS) $(COV_CFLAGS)
 opendkim_CPPFLAGS = -I$(srcdir)/../libopendkim $(LIBCRYPTO_CPPFLAGS)
 opendkim_LDFLAGS = $(LIBCRYPTO_LIBDIRS) $(LIBMILTER_LIBDIRS) $(PTHREAD_CFLAGS) $(COV_LDFLAGS)
-opendkim_LDADD = ../libopendkim/libopendkim.la $(LIBMILTER_LIBS) $(LIBCRYPTO_LIBS) $(PTHREAD_LIBS) $(COV_LIBADD)
+opendkim_LDADD = ../libopendkim/libopendkim.la $(LIBMILTER_LIBS) $(LIBCRYPTO_LIBS) $(PTHREAD_LIBS) $(COV_LIBADD) $(LIBRESOLV)
 if STRL
 opendkim_CFLAGS += -I$(top_srcdir)/libstrl
 opendkim_LDADD += ../libstrl/libstrl.la
only in patch2:
unchanged:
--- opendkim-2.8.0~beta5.orig/libopendkim/tests/Makefile.am
+++ opendkim-2.8.0~beta5/libopendkim/tests/Makefile.am
_at_@ -6,7 +6,7 @@
 AM_CFLAGS += -g
 endif
 
-LDADD = ../libopendkim.la $(COV_LIBADD) $(LIBCRYPTO_LIBS)
+LDADD = ../libopendkim.la $(COV_LIBADD) $(LIBCRYPTO_LIBS) $(LIBRESOLV)
 AM_CPPFLAGS = -I..
 
 if STRL
Received on Sat Feb 16 2013 - 07:56:36 PST

This archive was generated by hypermail 2.3.0 : Sat Feb 16 2013 - 08:00:01 PST