control: reassign -1 collectd 5.7.1-1
control: retitle -1 Uses "-lssl -lcrypto" but does not depend on libssl

On 2017-01-28 12:13:57 [+0100], Marc Fournier wrote:
> On Sat, Jan 28, 2017 at 09:30:20AM +0100, Lucas Nussbaum wrote:
> > During a rebuild of all packages in sid, your package failed to build on
> > amd64.
> > 
> > Relevant part (hopefully):
> > > /bin/bash ../libtool  --tag=CC   --mode=link x86_64-linux-gnu-gcc -Wall 
> > > -Werror -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. 
> > > -fstack-protector-strong -Wformat -Werror=format-security -Wall 
> > > -Wno-error=deprecated-declarations -module -avoid-version 
> > > -export-symbols-regex '\<module_register\>' -Wl,-z,relro -o 
> > > notify_email.la -rpath /usr/lib/collectd notify_email.lo -lesmtp -lssl 
> > > -lcrypto 
> > > libtool: link: /usr/bin/x86_64-linux-gnu-nm -B  .libs/notify_email.o   | 
> > > sed -n -e 's/^.*[         ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[         ][      
> > > ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' | 
> > > /bin/sed 's/.* //' | sort | uniq > .libs/notify_email.exp
> > > libtool: link: /bin/grep -E -e "\<module_register\>" 
> > > ".libs/notify_email.exp" > ".libs/notify_email.expT"
> > > libtool: link: mv -f ".libs/notify_email.expT" ".libs/notify_email.exp"
> > > libtool: link: echo "{ global:" > .libs/notify_email.ver
> > > libtool: link:  cat .libs/notify_email.exp | sed -e "s/\(.*\)/\1;/" >> 
> > > .libs/notify_email.ver
> > > libtool: link:  echo "local: *; };" >> .libs/notify_email.ver
> > > libtool: link:  x86_64-linux-gnu-gcc -shared  -fPIC -DPIC  
> > > .libs/notify_email.o   -lesmtp -lssl -lcrypto  -g -O2 
> > > -fstack-protector-strong -Wl,-z -Wl,relro   -Wl,-soname 
> > > -Wl,notify_email.so -Wl,-version-script -Wl,.libs/notify_email.ver -o 
> > > .libs/notify_email.so
> > > /usr/bin/ld: cannot find -lssl
> > > /usr/bin/ld: cannot find -lcrypto
> > > collect2: error: ld returned 1 exit status
> > 
> > The full build log is available from:
> >    http://aws-logs.debian.net/2017/01/28/collectd_5.7.1-1_unstable.log
> 
> Nice catch, thanks !
> 
> One thing that puzzles me, is why didn't this pop up earlier. collectd does
> *not* build-depend on libssl-dev. But according to the latest build log[1]
> libssl1.0-dev gets installed nevertheless (making this mistake in
> collectd's Makefile work by accident). This is not the case on the
> AWS-based builder.

Okay. Unmerged, back. Earlier net-snmp's -dev package pulled in
libssl-dev. This packages explicitly adds "-lssl -lcrypto" but does not
need to link against any of those libs, it simply needs to link against
-lesmtp for the email plugin. Therefore I unmerged the two bugs and am
attaching the patch which strips the hardcoded libs. The result builds.
Any testing and feedback is appreciated.

> Cheers,
> Marc

Sebastian
Author: Sebastian Andrzej Siewior <sebast...@breakpoint.cc>
Subject: Remove SSL libs from libs

The Makefile/Configure adds "-lssl -lcrypto" but does not depend libssl-dev
nor does it use any of its functions diretly.
Depending on those should not be needed unless for static compilation thus
removing them.

---
 configure.ac    |    2 +-
 src/Makefile.am |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/configure.ac
+++ b/configure.ac
@@ -3574,7 +3574,7 @@ then
 
 	if test "x$LIBNETAPP_LIBS" = "x"
 	then
-		LIBNETAPP_LIBS="$PTHREAD_LIBS -lxml -ladt -lssl -lm -lcrypto -lz"
+		LIBNETAPP_LIBS="$PTHREAD_LIBS -lxml -ladt -lm -lz"
 	fi
 	AC_MSG_NOTICE([netapp LIBS: $LIBNETAPP_LIBS])
 
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -825,7 +825,7 @@ if BUILD_PLUGIN_NOTIFY_EMAIL
 pkglib_LTLIBRARIES += notify_email.la
 notify_email_la_SOURCES = notify_email.c
 notify_email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
-notify_email_la_LIBADD = -lesmtp -lssl -lcrypto
+notify_email_la_LIBADD = -lesmtp
 endif
 
 if BUILD_PLUGIN_NOTIFY_NAGIOS

Reply via email to