[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
luck.

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
mode. 



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
python)  

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.  


unset LDFLAGS
unset CPPFLAGS
PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin
PATH=/usr/gcc/4.3/bin:$PATH
PATH=/usr/local/samba-3.5.3/bin:/usr/local/samba-3.5.3/sbin:$PATH
LD_LIBRARY_PATH=/usr/gnu/lib:/usr/lib
LD_LIBRARY_PATH=/usr/gcc/4.3/lib:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=/usr/local/samba-3.5.3/lib:$LD_LIBRARY_PATH
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 CPPFLAGS
export LDFLAGS
PKG_CONFIG_PATH=/usr/local/samba-3.5.3/lib/pkgconfig
export LD_LIBRARY_PATH
export PATH
export PKG_CONFIG_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 \
--enable-shared=no


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.  


Thanks 








More information about the samba mailing list