[Samba] samba-3.2-pre2 feedback

Neal A. Lucier nlucier at math.purdue.edu
Wed Mar 5 23:41:03 GMT 2008


Michael Adam wrote:
> Christian McHugh wrote:
> 
>>
>>Also, once compiling and installing, it seems unable to start:
>>ld.so.1: smbd: fatal: libtalloc.so: open failed: No such file or directory
>>Killed
>>ld.so.1: nmbd: fatal: libtalloc.so: open failed: No such file or directory
>>Killed
>>
>>This is fixed by adding /usr/local/samba/lib to my LD_LIBRARY_PATH, but I 
>>don't recall ever having to do that in the past.
> 
> 
> That is right: Starting with 3.2.0pre2, we build and use some
> subsystems internally as shared libs (currently libtalloc, libtdb,
> libwbclient, libnetapi). If you want, you can turn this off by
> specifying "--disable-shared-libs" as a parameter to configure.
> 

First of all, LD_LIBRARY_PATH is evil:

http://xahlee.org/UnixResource_dir/_/ldpath.html
(unfortunately this is a mirror as the original is now dead)

Given that LD_LIBRARY_PATH is evil, the fix would be to set

LDFLAGS="-L/usr/local/samba/lib -R/usr/local/samba/lib"

at configure time (in the appropriate format for you shell, etc.).

Now, you don't actually need the -L because Samba is correctly finding the 
libraries at link time just not at run time.  (I personally build the external 
library dependencies into the Samba $PREFIX, so I do need the -L.)

It seems that with this switch to subsystem shared libs, the makefile should be 
modified to add "-R${PREFIX}/lib" (or its GNU ld equivelant) when building with 
--enable-shared-libs.

Neal


More information about the samba mailing list