Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 275573 - dev-libs/libaio not in samba-3.0.x dependency tree
Summary: dev-libs/libaio not in samba-3.0.x dependency tree
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-27 09:00 UTC by Richard Foltyn
Modified: 2009-07-01 11:02 UTC (History)
1 user (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 Richard Foltyn 2009-06-27 09:00:56 UTC
Today I ran emerge --depclean which removed dev-libs/libaio, which obviously was not in my world set. After doing that, samba-3.0.35 failed to start as it is linked against libaio.so.1:

2032 # ldd ` which smbd` | grep libaio
        libaio.so.1 => /usr/lib/libaio.so.1 (0x00007f2733c0c000)

IMO dev-libs/libaio should not be something the user has to have in his/her world set. If samba depends on it, it should show up as a dependency (conditional on the async USE flag?).

BTW, this seems to be an issue with samba-3.0.x only, as samba-3.2.x (with the async USE flag) does work w/o libaio being installed.

I've emerged samba with
# emerge -pv samba

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] net-fs/samba-3.0.35  USE="acl async caps doc fam ldap pam python quotas readline syslog -ads -automount -cups -debug -examples -ipv6 -oav (-selinux) -swat -winbind"

This is on amd64 stable (except for samba-3.0.x ;)).

# emerge --info
Portage 2.1.6.13 (default/linux/amd64/2008.0/server, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.29-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.29-gentoo-r5-x86_64-AMD_Athlon-tm-_64_Processor_3000+-with-glibc2.2.5
Timestamp of tree: Sat, 27 Jun 2009 01:00:17 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.4-r2
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -msse3 -mfpmath=sse -pipe"
CHOST="x86_64-pc-linux-gnu"

Reproducible: Always

Steps to Reproduce:
1. Start samba-3.0.x w/o libaio being installed.

# /etc/init.d/samba restart
 * samba -> start: smbd ...
/usr/sbin/smbd: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory                                                                                                          [ !! ]
 * samba -> start: nmbd ...
/usr/sbin/nmbd: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory                                                                                                          [ !! ]
 * Error: starting services (see system logs)



Expected Results:  
Samba should explicitly depend on dev-libs/libaio if the async USE flag is requested.
Comment 1 Víctor Ostorga (RETIRED) gentoo-dev 2009-06-30 22:02:45 UTC
Can't reproduce this issue using amd64, can you provide full ldd output and build logs?
Comment 2 Richard Foltyn 2009-07-01 11:02:34 UTC
(In reply to comment #1)
> Can't reproduce this issue using amd64, can you provide full ldd output and
> build logs?
> 

I've done some further research. From my rudimentary understanding of the matter, there are two aio libraries on linux: libaio with is specific to the Linux kernel, and librt which is a POSIX-compliant implementation provided by glibc.

Now the problem arises because the samba configure script is not very transparent to the user. When --with-aio-support is requested, then

1. if configure finds libaio, it uses that one and links smbd against it;
2. if configure does not find libaio, it falls back to librt;

So you can readily compile samba with USE=async without libaio. However, if you happen to have it installed and compile time, smbd is linked against it. Unfortunately, since libaio does not show up as a dependency in the ebuild, nothing prevents libaio from being unmerged by emerge --depclean, and then smbd won't start anymore (as in my case).

I guess there is nothing to be done here, since the real "problem" lies in samba's configure script, which ideally would let the user decide which library to use (then this could be reflected by two distinct USE flags, e.g. async-libaio and async-librt, and the appropriate dependency).