[Samba] Still stuck with Samba on Solaris 10

Gaiseric Vandal gaiseric.vandal at gmail.com
Sun May 23 20:08:51 MDT 2010

I was hoping someone could post, or point me to, a clear set of instructions
for compiling Samba 3.5.3 (or even 3.4.8) on Solaris 10.  Or even just
confirmation that Solaris 3.5.3 really can compile on Solaris 10 with active
directory, nsswitch and zfs support.  (I notice that Samba and Blastwave
versions of Samba 3.4.x do not include zfs and nsswitch support.) 

I have a consistent issue that I cannot seem to compile with shared library
support enabled.  My production system is Solaris 10 Update 7 on x86
(Solaris 10 5/09 s10x_u7wos_08 X86)  It is currently running Samba 3.4.5
which I compiled for source code.  This machine is a PDC.  This machine has
versions of GCC 3.x from Sun, Sunfreeware, and Blastwave.  Also have
Blastwave GCC 4.    All these versions of GCC were compiled with Sun's ld
(/usr/ccs/bin/ld.)     And typically to compile samba I have to symlink so
that /usr/ccs/bin/ld is actually a symlink to gnu ld.  I also compiled GCC
3.4  from scratch so that a I could a "gnu ld" version of GCC.  But still no

I don't currently need active directory support but I am trying to configure
trusts with Windows 2003-mode active directory domains.   Trusts with a
Win2003 AD domain in "mix mode" works, but not with Win 2008 domain in 2003

I also have a "test" system running OpenSolaris development release 134.
(This has GCC4 included plus newer version of /usr/ccs/bin/ld, gnu ld and

In general, I can get Samba 3.4.8 to compile, with "--enable-shared=no",
with the result that I can't seem to get Active Directory support enabled.
I can get Samba 3.5.3 compiled  with "--enable-shared=no" with the result
that active directory support is enabled but zfs support is skipped, and
that "make nsswitch" fails.    (Active Directoru support assumes that
openldap is installed.)   I don't actually need active directory support at
the moment but it seems to be a symptom of the bigger compile issue.  And I
would like to be able to compile with AD support just to make sure
everything is working properly.

The following configure command typically allows me to compile code.  

CPPFLAGS="-I /usr/gnu/include -I/usr/include"
CPPFLAGS="-I /usr/gcc/4.3/include $CPPFLAGS"
CPPFLAGS="-I /usr/local/samba-3.5.3/include $CPPFLAGS"
LDFLAGS="-L/usr/lib -R/usr/lib"
LDFLAGS="-L/usr/gnu/lib -R/usr/gnu/lib $LDFLAGS"
LDFLAGS="-L/usr/gcc/4.3/lib -R/usr/gcc/4.3/lib $LDFLAGS"
LDFLAGS="-L/usr/local/samba-3.5.3/lib -R/usr/local/samba-3.5.3/lib $LDFLAGS"
export LDFLAGS
export PATH
export LDFLAGS

./configure --prefix=/usr/local/samba-3.5.3 \
--with-privatedir=/etc/samba/private  \
--with-lockdir=/var/samba/locks  \
--with-configdir=/etc/samba \
--with-ldap=yes  \
--with-krb5=/usr \
--enable-nss-wrapper   \
--with-winbind=yes \
--with-wbclient=yes \

But with "--enable-shared" removed I get the following on make

ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
make: *** [bin/libtalloc.so.2] Error 1

This is with either with sun ld or gnu ld. 

The production server is actually an Intel server running VMware ESXi, with
a Solaris 10 virtual machine guest.   So I can add a new, separate virtual
machine guest with OpenSolaris.  


More information about the samba mailing list