Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 670568 - app-emulation/lxd-3.5 should depend on net-libs/libnsl
Summary: app-emulation/lxd-3.5 should depend on net-libs/libnsl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Erik Mackdanz
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-07 07:24 UTC by Terra
Modified: 2018-12-15 22:24 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Terra 2018-11-07 07:24:34 UTC
lxd-3.5 needs both DEPEND and RDEPEND for net-libs/libnsl

I'm finding references to it in both:
1) lxd-3.5/dist/dqlite
2) lxd-3.5/dist/sqlite/autoconf/tea/tclconfig

Why it didn't fail in the configure phase when it wasn't found seems to be an upstream issue.  Nevertheless, the dependency is still needed.

##########
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I./include -Wall -O2 -I/var/tmp/portage/app-emulation/lxd-3.5/work/lxd-3.5/dist/sqlite -c src/vfs.c -o src/vfs.o >/dev/null 2>&1
/bin/sh ./libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -I./include -Wall  -O2     -I/var/tmp/portage/app-emulation/lxd-3.5/work/lxd-3.5/dist/sqlite -L/usr/lib/lxd -lsqlite3 -luv -lrt -lpthread -lnsl -ldl -version-info 0:1:0  -Wl,-O1 -Wl,--as-needed -o libdqlite.la -rpath /usr/lib/lxd src/conn.lo src/db.lo src/error.lo src/file.lo src/format.lo src/fsm.lo src/gateway.lo src/lifecycle.lo src/options.lo src/message.lo src/metrics.lo src/queue.lo src/replication.lo src/request.lo src/response.lo src/server.lo src/stmt.lo src/vfs.lo
libtool: link: x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC  src/.libs/conn.o src/.libs/db.o src/.libs/error.o src/.libs/file.o src/.libs/format.o src/.libs/fsm.o src/.libs/gateway.o src/.libs/lifecycle.o src/.libs/options.o src/.libs/message.o src/.libs/metrics.o src/.libs/queue.o src/.libs/replication.o src/.libs/request.o src/.libs/response.o src/.libs/server.o src/.libs/stmt.o src/.libs/vfs.o   -Wl,-rpath -Wl,/usr/lib/lxd -Wl,-rpath -Wl,/usr/lib/lxd -L/usr/lib/lxd /usr/lib/lxd/libsqlite3.so -lz -luv -lrt -lpthread -lnsl -ldl -Wl,--as-needed  -O2 -Wl,-O1   -Wl,-soname -Wl,libdqlite.so.0 -o .libs/libdqlite.so.0.0.1
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lnsl
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:811: libdqlite.la] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-emulation/lxd-3.5/work/lxd-3.5/dist/dqlite'
make: *** [Makefile:696: all] Error 2
##########
Comment 1 Erik Mackdanz gentoo-dev 2018-11-11 21:06:39 UTC
Is this reproducible in 3.5-r1 or 3.6-r1?  I suspect that the fix for https://bugs.gentoo.org/669008 fixes your linking issue also.
Comment 2 Terra 2018-11-13 10:46:45 UTC
Hello Erik,

Unfortunately, the same problem exists for both:
1) app-emulation/lxd-3.5-r1
2) app-emulation/lxd-3.6-r1

if net-libs/libnsl is not installed at time of compilation.  If I manually install libnsl, lxd compiles and installs fine.

I didn't catch this until now because where I had previously run lxd had libnsl pulled in by net-fs/samba, but installing on a new system where libnsl wasn't a dependency of any installed package caused the problem to surface.

The flags I'm using are: app-emulation/lxd-3.5 daemon dnsmasq ipv6 nls

FWIW, I tried to see if any use flags were the culprit:
$ USE="-daemon -dnsmasq -ipv6 -nls" ebuild lxd-3.6-r1.ebuild compile

Unfortunately, the same linking issue remains:
>> /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lnsl

It would seem that dqlite has a hard dependency for it and libnsl is not checked for existence during its configure phase.

Hope that helps.
Comment 3 Larry the Git Cow gentoo-dev 2018-12-15 22:23:12 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=728da7cdc72a5b7c8b74125fb8e4126587282fb0

commit 728da7cdc72a5b7c8b74125fb8e4126587282fb0
Author:     Erik Mackdanz <stasibear@gentoo.org>
AuthorDate: 2018-12-15 22:22:46 +0000
Commit:     Erik Mackdanz <stasibear@gentoo.org>
CommitDate: 2018-12-15 22:22:46 +0000

    app-emulation/lxd: Bump to 3.8
    
    Closes: https://bugs.gentoo.org/670568
    Closes: https://bugs.gentoo.org/673058
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Erik Mackdanz <stasibear@gentoo.org>

 app-emulation/lxd/Manifest       |   1 +
 app-emulation/lxd/lxd-3.8.ebuild | 241 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 242 insertions(+)
Comment 4 Erik Mackdanz gentoo-dev 2018-12-15 22:24:56 UTC
Fixed in 3.8.  Thanks for flagging this.