OS: Gentoo slibtool: 5cfb110 libnbd: 1.18.1
Gentoo
1.18.1
When building libnbd with --enable-python it will fail with slibtool.
--enable-python
rdlibtool --tag=CC --mode=link x86_64-gentoo-linux-musl-gcc -O2 -pipe -Werror=implicit-function-declaration -Werror=implicit-int -avoid-version -shared -module -shrext .cpython-311-x86_64-linux-musl.so -Wl,-O1 -Wl,--as-needed -o libnbdmod.la -rpath /usr/lib/python3.11/site-packages libnbdmod_la-handle.lo libnbdmod_la-libnbdmod.lo libnbdmod_la-methods.lo libnbdmod_la-utils.lo ../common/utils/libutils .la ../lib/libnbd.la rdlibtool: lconf: {.name="libtool"}. rdlibtool: fdcwd: {.fdcwd=AT_FDCWD, .realpath="/var/tmp/portage/sys-libs/libnbd-1.18.1/work/libnbd-1.18.1/python"}. rdlibtool: lconf: fstatat(AT_FDCWD,".",...) = 0 {.st_dev = 65026, .st_ino = 136069907}. rdlibtool: lconf: openat(AT_FDCWD,"libtool",O_RDONLY,0) = -1 [ENOENT]. rdlibtool: lconf: openat(AT_FDCWD,"../",O_DIRECTORY,0) = 3. rdlibtool: lconf: fstat(3,...) = 0 {.st_dev = 65026, .st_ino = 204713253}. rdlibtool: lconf: openat(3,"libtool",O_RDONLY,0) = 4. rdlibtool: lconf: found "/var/tmp/portage/sys-libs/libnbd-1.18.1/work/libnbd-1.18.1/libtool". rdlibtool: link: ln -s libnbdmod.cpython-311-x86_64-linux-musl.so.def .libs/libnbdmod.cpython-311-x86_64-linux-musl.so.def.linux rdlibtool: link: ln -s libnbdmod.cpython-311-x86_64-linux-musl.so.def.linux .libs/libnbdmod.cpython-311-x86_64-linux-musl.so.def.host rdlibtool: link: ln -s /dev/null .libs/libnbdmod.a.disabled rdlibtool: link: ln -s libnbdmod.la .libs/libnbdmod.la.shrext.cpython-311-x86_64-linux-musl.so rdlibtool: link: ln -s libnbdmod.la.shrext.cpython-311-x86_64-linux-musl.so .libs/libnbdmod.la.shrext rdlibtool: link: ln -s /usr/lib/python3.11/site-packages .libs/libnbdmod.cpython-311-x86_64-linux-musl.so.slibtool.rpath rdlibtool: link: x86_64-gentoo-linux-musl-ar -crs .libs/libnbdmod.expsyms.a .libs/libnbdmod_la-handle.o .libs/libnbdmod_la-libnbdmod.o .libs/libnbdmod_la-methods.o .libs/libnbdmod_la-utils.o rdlibtool: link: x86_64-gentoo-linux-musl-gcc .libs/libnbdmod_la-handle.o .libs/libnbdmod_la-libnbdmod.o .libs/libnbdmod_la-methods.o .libs/libnbdmod_la-utils.o -Wl,--whole-archive ../common/utils/.libs/libutils.a -Wl,--no-whole-archive -O2 -pipe -Werror=implicit-function-declaration -Werror=implicit-int -Wl,-O1 -Wl,--as-needed -311-x86_64-linux-musl.so -shared -fPIC -Wl,-soname -Wl,libnbdmod.cpytho n-311-x86_64-linux-musl.so -o .libs/libnbdmod.cpython-311-x86_64-linux-musl.so x86_64-gentoo-linux-musl-gcc: error: unrecognized command-line option '-311-x86_64-linux-musl.so' rdlibtool: error logged in slbt_exec_link_create_library(), line 364: flow error: unexpected condition or other. rdlibtool: < returned to > slbt_exec_link(), line 400. make[3]: *** [Makefile:806: libnbdmod.la] Error 2 make[3]: Leaving directory '/var/tmp/portage/sys-libs/libnbd-1.18.1/work/libnbd-1.18.1/python' make[2]: *** [Makefile:733: all] Error 2 make[2]: Leaving directory '/var/tmp/portage/sys-libs/libnbd-1.18.1/work/libnbd-1.18.1/python' make[1]: *** [Makefile:563: all-recursive] Error 1 make[1]: Leaving directory '/var/tmp/portage/sys-libs/libnbd-1.18.1/work/libnbd-1.18.1' make: *** [Makefile:488: all] Error 2
The build system is using -shrext .cpython-311-x86_64-linux-musl.so which slibtool turns into:
-shrext .cpython-311-x86_64-linux-musl.so
-311-x86_64-linux-musl.so -shared -fPIC -Wl,-soname -Wl,libnbdmod.cpytho n-311-x86_64-linux-musl.so -o .libs/libnbdmod.cpython-311-x86_64-linux-musl.so
And the compiler errors.
x86_64-gentoo-linux-musl-gcc: error: unrecognized command-line option '-311-x86_64-linux-musl.so'
With GNU libtool it instead does.
-Wl,-soname -Wl,libnbdmod.cpython-311-x86_64-linux-musl.so -o .libs/libnbdmod.cpython-311-x86_64-linux-musl.so
Gentoo issue: https://bugs.gentoo.org/916128 Upstream source: https://gitlab.com/nbdkit/libnbd
Thanks for catching this! Fixed in commit e9a1d64.
Metadata Update from @midipix: - Issue status updated to: Closed (was: Open)
Still broken, Gentoo builds with --disable-static.
--disable-static
rdlibtool --tag=CC --mode=link x86_64-gentoo-linux-musl-gcc -O2 -pipe -Werror=implicit-function-declaration -Werror=implicit-int -avoid-version -shared -module -shrext .cpython-311-x86_64-linux-musl.so -Wl,-O1 -Wl,--as-needed -o libnbdmod.la -rpath /usr/lib/python3.11/site-packages libnbdmod_la-handle.lo libnbdmod_la-libnbdmod.lo libnbdmod_la-methods.lo libnbdmod_la-utils.lo ../common/utils/libutils.la ../lib/libnbd.la rdlibtool: lconf: {.name="libtool"}. rdlibtool: fdcwd: {.fdcwd=AT_FDCWD, .realpath="/var/tmp/portage/sys-libs/libnbd-1.18.1/work/libnbd-1.18.1/python"}. rdlibtool: lconf: fstatat(AT_FDCWD,".",...) = 0 {.st_dev = 65026, .st_ino = 2259412}. rdlibtool: lconf: openat(AT_FDCWD,"libtool",O_RDONLY,0) = -1 [ENOENT]. rdlibtool: lconf: openat(AT_FDCWD,"../",O_DIRECTORY,0) = 3. rdlibtool: lconf: fstat(3,...) = 0 {.st_dev = 65026, .st_ino = 72501444}. rdlibtool: lconf: openat(3,"libtool",O_RDONLY,0) = 4. rdlibtool: lconf: found "/var/tmp/portage/sys-libs/libnbd-1.18.1/work/libnbd-1.18.1/libtool". rdlibtool: link: ln -s libnbdmod.cpython-311-x86_64-linux-musl.so.def .libs/libnbdmod.cpython-311-x86_64-linux-musl.so.def.linux rdlibtool: link: ln -s libnbdmod.cpython-311-x86_64-linux-musl.so.def.linux .libs/libnbdmod.cpython-311-x86_64-linux-musl.so.def.host rdlibtool: link: ln -s /dev/null .libs/libnbdmod.a.disabled rdlibtool: link: ln -s libnbdmod.la .libs/libnbdmod.la.shrext.cpython-311-x86_64-linux-musl.so rdlibtool: link: ln -s libnbdmod.la.shrext.cpython-311-x86_64-linux-musl.so .libs/libnbdmod.la.shrext rdlibtool: error logged in slbt_get_deps_meta(), line 63: path not found: ../lib/.libs/libnbd.a.slibtool.deps. rdlibtool: < returned to > slbt_exec_link_create_library(), line 140. rdlibtool: < returned to > slbt_exec_link(), line 400.
lib/.libs/ ├── libnbd.a.disabled -> /dev/null ├── libnbd.exp ├── libnbd.expsyms.a ├── libnbd.la -> ../libnbd.la ├── libnbd.lai -> ../libnbd.la ├── libnbd.so -> libnbd.so.0.0.0 ├── libnbd.so.0 -> libnbd.so.0.0.0 ├── libnbd.so.0.0.0 ├── libnbd.so.def -> /dev/null ├── libnbd.so.def.host -> libnbd.so.def.linux ├── libnbd.so.def.linux -> libnbd.so.def ├── libnbd.so.slibtool.deps ├── libnbd.so.slibtool.deps.tmp1 ├── libnbd.so.slibtool.deps.tmp2 ├── libnbd_la-aio.o ├── libnbd_la-api.o ├── libnbd_la-connect.o ├── libnbd_la-crypto.o ├── libnbd_la-debug.o ├── libnbd_la-disconnect.o ├── libnbd_la-errors.o ├── libnbd_la-flags.o ├── libnbd_la-handle.o ├── libnbd_la-is-state.o ├── libnbd_la-opt.o ├── libnbd_la-poll.o ├── libnbd_la-protocol.o ├── libnbd_la-rw.o ├── libnbd_la-socket.o ├── libnbd_la-states-run.o ├── libnbd_la-states.o ├── libnbd_la-uri.o └── libnbd_la-utils.o
Metadata Update from @orbea: - Issue status updated to: Open (was: Closed)
Both issues fixed now.
6b2fa6f
Metadata Update from @orbea: - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.