Summary: | sys-libs/ldb-1.1.27 : ERROR: System library tevent of version 0.9.29 not found, and bundling disabled | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Gentoo's SAMBA Team <samba> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bruce, even.more.spam.for.me, frp.bissey, paul, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge-history.txt
environment sys-libs:ldb-1.1.27:20160729-164114.log ldb-1.3.6-tevent.patch |
Description
Toralf Förster
![]() Created attachment 441944 [details]
emerge-history.txt
Created attachment 441946 [details]
environment
Created attachment 441948 [details]
sys-libs:ldb-1.1.27:20160729-164114.log
the build dir should have a config.log file. can you attach it ? (In reply to SpanKY from comment #4) which is made automatically if the config.log follows the nameing rule: /var/tmp/portage/$failed/work/*/config.log so I do assume there was no such file -or- the routine to fill $failed fails. The problem is with the tevent library itself. python2 -c 'import _tevent' fails with ImportError: libreplace-tevent.so: cannot open shared object file: No such file or directory stracing python2 throws mmap(0x7f6e5b8e4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xe000) = 0x7f6e5b8e4000 close(4) = 0 openat(AT_FDCWD, "/lib64/tls/haswell/x86_64/libreplace-tevent.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib64/tls/haswell/x86_64", 0x7ffda87059a0) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib64/tls/haswell/libreplace-tevent.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib64/tls/haswell", 0x7ffda87059a0) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib64/tls/x86_64/libreplace-tevent.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib64/tls/x86_64", 0x7ffda87059a0) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib64/tls/libreplace-tevent.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib64/tls", 0x7ffda87059a0) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib64/haswell/x86_64/libreplace-tevent.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib64/haswell/x86_64", 0x7ffda87059a0) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib64/haswell/libreplace-tevent.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib64/haswell", 0x7ffda87059a0) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib64/x86_64/libreplace-tevent.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib64/x86_64", 0x7ffda87059a0) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib64/libreplace-tevent.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib64", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0 openat(AT_FDCWD, "/usr/lib64/tls/haswell/x86_64/libreplace-tevent.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib64/tls/haswell/x86_64", 0x7ffda87059a0) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib64/tls/haswell/libreplace-tevent.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib64/tls/haswell", 0x7ffda87059a0) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib64/tls/x86_64/libreplace-tevent.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib64/tls/x86_64", 0x7ffda87059a0) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib64/tls/libreplace-tevent.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib64/tls", 0x7ffda87059a0) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib64/haswell/x86_64/libreplace-tevent.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib64/haswell/x86_64", 0x7ffda87059a0) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib64/haswell/libreplace-tevent.so", O_RDONLY|O_CLO Notice that its looking for tevent except for where it is i.e. /usr/lib64/tevent/ *** Bug 634090 has been marked as a duplicate of this bug. *** So I have been bitten bu this too and I have two machines one with this issue and one without. Interesting bit from `readelf -d /usr/lib64/python2.7/site-packages/_tevent.so` Machine with problem: Dynamic section at offset 0x3d50 contains 35 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libtevent.so.0] 0x0000000000000001 (NEEDED) Shared library: [libreplace-tevent.so] 0x0000000000000001 (NEEDED) Shared library: [libdl.so.2] 0x0000000000000001 (NEEDED) Shared library: [libcrypt.so.1] 0x0000000000000001 (NEEDED) Shared library: [libbsd.so.0] 0x0000000000000001 (NEEDED) Shared library: [libtalloc.so.2] 0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0] 0x0000000000000001 (NEEDED) Shared library: [libm.so.6] 0x0000000000000001 (NEEDED) Shared library: [libutil.so.1] 0x0000000000000001 (NEEDED) Shared library: [libpython2.7.so.1.0] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000e (SONAME) Library soname: [_tevent.so] Machine without the problem Dynamic section at offset 0x3db0 contains 28 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libtevent.so.0] 0x0000000000000001 (NEEDED) Shared library: [libtalloc.so.2] 0x0000000000000001 (NEEDED) Shared library: [libpython2.7.so.1.0] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000e (SONAME) Library soname: [_tevent.so] That suggest that on the problematic machine `--as-needed` did not do its job for some reason. Build logs are very useful because the linking happen in src_install and the waf-utils eclass doesn't pass `--verbose` in that phase. Yes adding `--verbose` in the right place in waf-utils.eclass we can see what's happening: Failing machine [32/32] Linking default/-tevent.inst.so 14:44:47 runner x86_64-pc-linux-gnu-gcc default/pytevent_5.o -o /dev/shm/portage/sys-libs/tevent-0.9.37/work/tevent-0.9.37-abi_x86_64.amd64/bin/default/-tevent.inst.so -O1 -march=native -pipe -ggdb -O1 -march=native -pipe -ggdb -O1 -march=native -pipe -ggdb -fstack-protector -Wl,-h,_tevent.so -shared -Ldefault/lib/replace -Ldefault -L/usr/local/lib -Wl,-Bdynamic -ltevent -lreplace-tevent -ldl -lcrypt -lbsd -ltalloc -lpthread -lm -lutil -lpython2.7 Working machine [32/32] Linking default/-tevent.inst.so 14:57:42 runner x86_64-pc-linux-gnu-gcc default/tevent_1.o default/tevent_debug_1.o default/tevent_fd_1.o default/tevent_immediate_1.o default/tevent_queue_1.o default/tevent_req_1.o default/tevent_wrapper_1.o default/tevent_poll_1.o default/tevent_threads_1.o default/tevent_signal_1.o default/tevent_standard_1.o default/tevent_timed_1.o default/tevent_util_1.o default/tevent_wakeup_1.o default/tevent_epoll_1.o -o /dev/shm/portage/sys-libs/tevent-0.9.37/work/tevent-0.9.37-abi_x86_64.amd64/bin/default/libtevent.inst.so -march=native -O2 -pipe -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-no-undefined -fstack-protector -Wl,-h,libtevent.so.0 -shared -Wl,--version-script=/dev/shm/portage/sys-libs/tevent-0.9.37/work/tevent-0.9.37-abi_x86_64.amd64/bin/default/tevent.vscript -Wl,-rpath,/usr/lib64/tevent -Ldefault/lib/replace -L/usr/local/lib -Wl,-Bdynamic -lreplace-tevent -lbsd -lcrypt -ldl -ltalloc -lpthread `-tevent.inst.so` is latter installed under the name `_tevent.so`: * installing bin/default/-tevent.inst.so as /dev/shm/portage/sys-libs/tevent-0.9.37/image/usr/lib64/python2.7/site-packages/_tevent.so One clearly see that, on the failing machine, default LDFLAGS are not passed to the linker. And on the failing machine `-Wl,--as-needed` has not even been passed at configuration time CCFLAGS="-O1 -march=native -pipe -ggdb" LINKFLAGS="-O1 -march=native -pipe -ggdb -O1 -march=native -pipe -ggdb" "/dev/shm/portage/sys-libs/tevent-0.9.37/work/tevent-0.9.37/buildtools/bin/waf" --prefix=/usr --libdir=/usr/lib64 --bundled-libraries=NONE --builtin-libraries=NONE configure This should be controlled by the eclass, but instead of having LINKFLAGS="${CFLAGS} ${LDFLAGS}" it looks like LINKFLAGS="${CFLAGS} ${CFLAGS}". Self inflicted by a line LDFLAGS=${CFLAGS} in make.conf. I don't know about other people. Still someone makes waf-utils.eclass verbose in src_install please. There is no reason for it not to be. (In reply to François Bissey from comment #11) > Self inflicted by a line > LDFLAGS=${CFLAGS} > in make.conf. > > I don't know about other people. Still someone makes waf-utils.eclass > verbose in src_install please. There is no reason for it not to be. Yes, removing ${CFLAGS} from LDFLAGS in make.conf fixed it for me too. Strange how this has never caused a problem in all the years it's been there. Created attachment 555710 [details, diff]
ldb-1.3.6-tevent.patch
This issue happened with 1.3.6
As dependencies checking is done by portage, this patch skips waf tevent checking. Then the ebuild just compiles fine.
The build system pushes CFLAGS to LINKFLAGS, even they were not appended to LDFLAGS in make.conf
The same eror with: sys-libs/ldb-1.4.3 Checking for system tevent (>=0.9.37) : yes ERROR: Python module pytevent of version 0.9.37 not found, and bundling disabled * ERROR: sys-libs/ldb-1.4.3::gentoo failed (configure phase): * configure failed * * Call stack: * ebuild.sh, line 124: Called src_configure * environment, line 3509: Called multilib-minimal_src_configure * environment, line 1957: Called multilib_foreach_abi 'multilib-minimal_abi_src_configure' * environment, line 2172: Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure' * environment, line 1887: Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure' * environment, line 1885: Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_configure' * environment, line 387: Called multilib-minimal_abi_src_configure * environment, line 1951: Called multilib_src_configure * environment, line 2395: Called waf-utils_src_configure '--disable-rpath' '--disable-rpath-install' '--bundled-libraries=NONE' '--with-modulesdir=/usr/lib64/samba' '--builtin-libraries=NONE' * environment, line 4258: Called die * The specific snippet of code: * CCFLAGS="${CFLAGS}" LINKFLAGS="${CFLAGS} ${LDFLAGS}" "${WAF_BINARY}" "--prefix=${EPREFIX}/usr" "${libdir[@]}" "${@}" configure || die "configure failed" * This is still a valid bug for both ldb and samba; at least for the latter, removing CFLAGS from LDFLAGS does not help. The ldb workaround patch *does* work for both packages. (In reply to Steve Arnold from comment #15) > This is still a valid bug for both ldb and samba; at least for the latter, > removing CFLAGS from LDFLAGS does not help. The ldb workaround patch *does* > work for both packages. I'm still hitting this with ldb 2.1.4 and tevent 0.10.2 but workaround patch indeed helps. Same here. It would be nice, if the patch could be included in the official ebuild. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ffa408b3d9e5462d6b8233309eedbd1e6781b236 commit ffa408b3d9e5462d6b8233309eedbd1e6781b236 Author: Ben Kohler <bkohler@gentoo.org> AuthorDate: 2022-07-29 18:10:58 +0000 Commit: Ben Kohler <bkohler@gentoo.org> CommitDate: 2022-07-29 18:12:51 +0000 net-fs/samba: add tevent detection patch Closes: https://bugs.gentoo.org/590026 Signed-off-by: Ben Kohler <bkohler@gentoo.org> net-fs/samba/files/ldb-2.5.2-skip-wav-tevent-check.patch | 12 ++++++++++++ net-fs/samba/samba-4.14.14.ebuild | 1 + net-fs/samba/samba-4.15.9.ebuild | 1 + net-fs/samba/samba-4.16.4.ebuild | 1 + 4 files changed, 15 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af6790d9b83c1bf18bd6adaa32b6a2b68b1a524f commit af6790d9b83c1bf18bd6adaa32b6a2b68b1a524f Author: Ben Kohler <bkohler@gentoo.org> AuthorDate: 2022-07-28 19:35:06 +0000 Commit: Ben Kohler <bkohler@gentoo.org> CommitDate: 2022-07-29 18:12:51 +0000 sys-libs/ldb: fix tevent detection Closes: https://bugs.gentoo.org/590026 Signed-off-by: Ben Kohler <bkohler@gentoo.org> sys-libs/ldb/files/ldb-2.5.2-skip-wav-tevent-check.patch | 12 ++++++++++++ sys-libs/ldb/ldb-2.3.4.ebuild | 1 + sys-libs/ldb/ldb-2.4.4.ebuild | 1 + sys-libs/ldb/ldb-2.5.2.ebuild | 1 + 4 files changed, 15 insertions(+) |