Bug 231979 - security/gnutls: broken dependency on libdl.so from libgnutls.so
Summary: security/gnutls: broken dependency on libdl.so from libgnutls.so
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Tijl Coosemans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-05 12:48 UTC by dan-freebsd
Modified: 2018-11-03 22:39 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (tijl)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dan-freebsd 2018-10-05 12:48:26 UTC
My FreeBSD 11 guest gets nightly port updates and the new gnutls update pulled in today appears seriously broken, in that libgnutls.so gained an ELF linker dependency on libdl.so but the later does not exist.

IIUC there is no libdl.so needed for FreeBSD hosts, so the dep looks bogus

Note ld reports "not found" against libdl

$ ldd /usr/local/lib/libgnutls.so          
/usr/local/lib/libgnutls.so:
	libz.so.6 => /lib/libz.so.6 (0x801375000)
	libp11-kit.so.0 => /usr/local/lib/libp11-kit.so.0 (0x80158e000)
	libunistring.so.2 => /usr/local/lib/libunistring.so.2 (0x8018af000)
	libdl.so.1 => not found (0)
	libtasn1.so.6 => /usr/local/lib/libtasn1.so.6 (0x801c60000)
	libnettle.so.6 => /usr/local/lib/libnettle.so.6 (0x801e74000)
	libhogweed.so.4 => /usr/local/lib/libhogweed.so.4 (0x8020ac000)
	libgmp.so.10 => /usr/local/lib/libgmp.so.10 (0x8022e1000)
	libintl.so.8 => /usr/local/lib/libintl.so.8 (0x802561000)
	libidn2.so.0 => /usr/local/lib/libidn2.so.0 (0x80276c000)
	libc.so.7 => /lib/libc.so.7 (0x800824000)
	libffi.so.6 => /usr/local/lib/libffi.so.6 (0x80298a000)
	libthr.so.3 => /lib/libthr.so.3 (0x802b91000)

This breaks ability to build against gnutls

$ cat demo.c
#include <gnutls/gnutls.h>
int main(int argc, char **argv)
{ gnutls_global_init();}

$ clang -I /usr/local/include -o demo -L/usr/local/lib -lgnutls demo.c
/usr/bin/ld: warning: libdl.so.1, needed by /usr/local/lib/libgnutls.so, not found (try using -rpath or -rpath-link)

The breaks apps using gnutls

$ vim
Shared object "libdl.so.1" not found, required by "vim"

$ certtool 
Shared object "libdl.so.1" not found, required by "certtool"


Here is the installed port info:

$ pkg info gnutls
gnutls-3.5.19
Name           : gnutls
Version        : 3.5.19
Installed on   : Fri Oct  5 00:04:41 2018 UTC
Origin         : security/gnutls
Architecture   : FreeBSD:11:amd64
Prefix         : /usr/local
Categories     : security net
Licenses       : GPLv3, LGPL21
Maintainer     : tijl@FreeBSD.org
WWW            : http://www.gnutls.org/
Comment        : GNU Transport Layer Security library
Options        :
	DANE           : off
	DOCS           : on
	EXAMPLES       : on
	IDN            : on
	NLS            : on
	P11KIT         : on
	TPM            : on
	ZLIB           : on
Shared Libs required:
	libunistring.so.2
	libintl.so.8
	libgmp.so.10
	libp11-kit.so.0
	libidn2.so.0
	libhogweed.so.4
	libnettle.so.6
	libtasn1.so.6
Shared Libs provided:
	libgnutlsxx.so.28
	libgnutls.so.30
Annotations    :
	FreeBSD_version: 1102000
	cpe            : cpe:2.3:a:gnu:gnutls:3.5.19:::::freebsd11:x64
	repo_type      : binary
	repository     : FreeBSD
Flat size      : 6.94MiB



As a note, the FreeBSD 10 build of gnutls 3.5.19 is working normally and doesn't have this libdl.so dependancy. Only the FreeBSD 11 build appears affected.
Comment 1 Tijl Coosemans freebsd_committer 2018-10-05 13:11:49 UTC
What version of FreeBSD do you have?  Packages are built for FreeBSD 11.2 now because 11.1 is no longer supported.  FreeBSD 11.2 does have libdl.
Comment 2 dan-freebsd 2018-10-05 13:18:25 UTC
Yeah, my VM is on FreeBSD 11.1 still
Comment 3 Sean Eric Fagan freebsd_committer 2018-10-07 00:20:09 UTC
I am running 11.2-RELEASE-p4, which I got to via freebsd-update, and I do not have libdl.so.1
Comment 4 Tijl Coosemans freebsd_committer 2018-10-07 09:26:38 UTC
(In reply to Sean Eric Fagan from comment #3)
Did you follow all the steps documented here:
https://www.freebsd.org/releases/11.2R/installation.html#upgrade-binary
Comment 5 dan-freebsd 2018-10-09 09:28:38 UTC
Closing this since I've confirmed that after updating to 11.2 things work as expected
Comment 6 cybermerlin 2018-11-03 21:31:17 UTC
if exists any conflict in config or another file, then need manual correct it, but any editer use libdl.so.1 which in 11.2.

And how can I upgrade to 11.2 without this lib?

Guys, help me please to fix this problem.
Comment 7 Sean Eric Fagan freebsd_committer 2018-11-03 21:34:00 UTC
As far as I can tell, at one point I upgraded via buildworld, and because of that, freebsd-update did not work properly afterwards.

So now I must always update via source.
Comment 8 cybermerlin 2018-11-03 21:37:45 UTC
I updating always through the freebsd-update.

Maybe I just download this file from freebsd.org? Give me pls link if it exist.
Comment 9 cybermerlin 2018-11-03 21:48:10 UTC
by the way, I executed 'pkg upgrade -f gnutls', but that not help to me.
Comment 10 cybermerlin 2018-11-03 21:51:54 UTC
n I executed 'ln -s /usr/lib/libdl.so.2 /usr/lib/libdl.so.1' n still have problem.
Comment 11 Tijl Coosemans freebsd_committer 2018-11-03 22:29:05 UTC
(In reply to cybermerlin from comment #10)
Try "ln -sf /lib/libc.so.7 /usr/lib/libdl.so.1"
Comment 12 cybermerlin 2018-11-03 22:39:50 UTC
(In reply to Tijl Coosemans from comment #11)
I just downloaded base.tgz, unpacked, copied  "url/lib/libdl.so" to '/usr/lib/libdl.so.1' and done.
thx.
BTW, guys, I mean developers|maintainers, this is very bad style, always have same troubles.