Samba 3.2.0 and internal shared libraries

Michael Adam ma at sernet.de
Fri Mar 7 13:44:01 GMT 2008


Hi Folks,

it is great that so many people have already started
testing 3.2.0pre2 and giving feedback! Thanks a lot!

Here is one major pitfall that you have to be aware of:

Samba 3.2.0 uses shared libraries internally by default
(if shared libraries are supported by the system).
This means that certain subsystems are built and linked
in as shared libs, currently libtalloc.so, libtdbs.so,
libnetapi.so and libwbclient.so.

You can disable using shared libs by specifying
"--disable-shared-libs" as a parameter to configure.
But beware that libwbclient will still be linked in
dynamically (unless you configure with --enable-developer).

If you decide to use the shared libs and in (almost) any 
case for libwbclient.so, your dynamic loader must know how
to find these libs.

You can do several things to accomplish this:

 0) install in such a way that the libs get placed in a directory
    that is already searched for libs (e.g. /usr/lib/)

 1) Set the environment variable LD_LIBRARY_PATH to "/your/samba/library/path"
    before starting the samba applications.
    (This is the variable name for linux, solaris, netbsd, irix, ...)
     the variable is called SHLIB_PATH on HP-UX, LIB_PATH on AIX
     and DYLD_LIBRARY_PATH on darwin.)

 2) Add a line with the folder containing your samba libs to /etc/ld.so.conf
    (or a dedicated file /etc/ld.so.conf.d/samba_foo.conf which has to be
     included in /etc/ld.so.conf)

 3) build your binaries with an rpath:
 
    LDFLAGS="-Wl,-R,/your/samba/library/path" ./configure ...

    (This is for Linux, Solaris, AIX and some others.
     You might have to work it out for your platform.)

Hope this helps!

Keep on testing!

Cheers - Michael

-- 
Michael Adam <ma at sernet.de>  <obnox at samba.org>
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.SerNet.DE, mailto: Info @ SerNet.DE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 206 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20080307/9f34773d/attachment.bin


More information about the samba-technical mailing list