Bug 195206 - security/gnupg: linker error: /usr/local/lib/liblber-2.4.so.2: could not read symbols: Bad value
Summary: security/gnupg: linker error: /usr/local/lib/liblber-2.4.so.2: could not read...
Status: Closed DUPLICATE of bug 196301
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: kuryiama
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-20 07:39 UTC by O. Hartmann
Modified: 2014-12-27 17:05 UTC (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2014-11-20 07:39:05 UTC
On CURRENT (11.0-CURRENT FreeBSD 11.0-CURRENT #0 r274644: Tue Nov 18 07:51:05 CET 2014 ) updating the port fails with this error:

[...]
cc -I/usr/local/include -I/usr/local/include -O2 -pipe -O3 -march=native  -DLIBICONV_PLUG -fstack-protector -DLDAP_DEPRECATED -fno-strict-aliasing -Wall -Wno-pointer-sign -Wpointer-arith  -fstack-protector -o dirmngr_ldap dirmngr_ldap-dirmngr_ldap.o  ../common/libcommon.a no-libgcrypt.o ../gl/libgnu.a -L/usr/local/lib -lgpg-error -L/usr/local/lib -lldap  /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib  
/usr/bin/ld: /usr/local/lib/liblber-2.4.so.2: invalid DSO for symbol `ber_free' definition
/usr/local/lib/liblber-2.4.so.2: could not read symbols: Bad value
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:625: recipe for target 'dirmngr_ldap' failed
gmake[5]: *** [dirmngr_ldap] Error 1
gmake[5]: Leaving directory '/usr/ports/security/gnupg/work/gnupg-2.1.0/dirmngr'
Makefile:503: recipe for target 'all' failed
gmake[4]: *** [all] Error 2
gmake[4]: Leaving directory '/usr/ports/security/gnupg/work/gnupg-2.1.0/dirmngr'
Makefile:546: recipe for target 'all-recursive' failed
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory '/usr/ports/security/gnupg/work/gnupg-2.1.0'
Makefile:465: recipe for target 'all' failed
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory '/usr/ports/security/gnupg/work/gnupg-2.1.0'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

The library /usr/local/lib/liblber-2.4.so.2 in question belongs to port net/openldap24-sasl-client and is up to date and has been recompiled recently to ensure its sync to recent changes, if any and if necessary.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-11-20 07:39:05 UTC
Maintainers CC'd
Comment 2 Matthieu Volat 2014-11-20 09:22:26 UTC
Adding explicit link to liblber seems to solve the building:

Index: Makefile
===================================================================
--- Makefile	(revision 372881)
+++ Makefile	(working copy)
@@ -56,6 +56,7 @@
 .if ${PORT_OPTIONS:MLDAP}
 USE_OPENLDAP=	YES
 CONFIGURE_ARGS+=--with-ldap=${LOCALBASE}
+LDFLAGS+=-L${LOCALBASE}/lib -llber
 .else
 CONFIGURE_ARGS+=--disable-ldap
 .endif

But after that you get a ${LOCALBASE}/bin/dirmngr conflict: 

pkg-static: gnupg-2.1.0 conflicts with dirmngr-1.1.0_12 (installs files into the same place).  Problematic file: /usr/local/bin/dirmngr

On my system, it seems that security/dirmngr was installed by security/gnupg and that it can/must be removed before updating. I guess portmaster should be re-run on security/gnupg reverse-dependencies after that...
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2014-11-23 07:35:01 UTC
Over to maintainer.
Comment 4 Lev A. Serebryakov freebsd_committer freebsd_triage 2014-11-28 20:10:07 UTC
Same problem on 10.1-STABLE with openldap-client-2.4.40_1
Comment 5 timon 2014-12-16 09:51:00 UTC
10.1-RELEASE, Matthieu Volat patch works like a charm for me. Poudriere built all packages fine and didn't find conflicts.
Comment 6 timon 2014-12-16 09:51:30 UTC
10.1-RELEASE, Matthieu Volat's patch works like a charm for me. Poudriere built all packages fine and didn't find conflicts.
Comment 7 Tijl Coosemans freebsd_committer freebsd_triage 2014-12-27 17:05:39 UTC
Fix included in bug 196301

*** This bug has been marked as a duplicate of bug 196301 ***