I wanted to build samba with CUPS and LDAP support, and put it into a location from where it can be automounted by other systems. There were a few gotchas I solved the hard way, to save anyone else's time, this is what I did.

C compiler I used is Sun's Studio.

Solaris sed behaves differently to Sunfreeware sed

tolka source3 $ echo libwbclient.so.0|/usr/local/bin/sed 's/so\(.[0-9]\{1,\}\)\{0,1\}$/syms/'
libwbclient.syms

tolka source3 $ echo libwbclient.so.0|sed 's/so\(.[0-9]\{1,\}\)\{0,1\}$/syms/' libwbclient.so.0
tolka source3 $
So install Sunfreeware sed and dependencies libgcc_s, libiconv, libintl.

Solaris make doesn't like Samba's generated Makefile, so install make from SunFreeware.

who3 source3 $ which make
/usr/ccs/bin/make
who3 source3 $ make
make: Fatal error in reader: Makefile, line 1397: Extra `:', `::', or `:=' on dependency line
who3 source3 $

Set up paths etcetera.

export LDFLAGS="-L/nerc/packages/samba/3.5.9/lib -R/nerc/packages/samba/3.5.9/lib"
export LD_RUN_PATH="/nerc/packages/samba/3.5.9/lib"
export LD_LIBRARY_PATH="/nerc/packages/samba/3.5.9/lib"
export CPPFLAGS="-I/nerc/packages/samba/3.5.9/include -I/nerc/packages/samba/3.5.9/lib/ldb/include -I/usr/include"
export CC=`which cc`
export LIBS=-lintl

build LDAP

./configure --prefix=/nerc/packages/samba/3.5.9 --disable-slapd --disable-slurpd --without-tls
make depend
make
as root, make install

build Samba

No need to autoconf.sh as we already have a configure script.

./configure --prefix=/nerc/packages/samba/3.5.9 --enable-cups
find .. -name Makefile -mtime -1
edit Makefile, change occurrences of sed to /usr/local/bin/sed
/usr/local/bin/make

as root, /usr/local/bin/make install

Check the binaries can see all their libraries, and hadn't picked up any odd ones (they hadn't)

ldd /nerc/packages/samba/3.5.9/sbin/*
ldd /nerc/packages/samba/3.5.9/bin/*

This procedure worked on both sparc and x86 architectures.

cheers, Dick

--
Richard Gillman
IST UNIX Systems Group, Maclean Building, Wallingford OX10 8BB
Tel: 01491 - 692 339 (outside UK: +44 1491 692339)
Fax: 01491 - 692 424

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Reply via email to