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
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
I will give that I try.
After looking at your configure command, I had another try at compiling
Samba 3.4.8 with GCC (Sunfreeware GCC3 or Blastwave GCC4.)
Setting "--enable-shared" or "--enable-shared=yes" had caused
problems. I think in this case I had not specified
"--with-shared-modules=...." Setting "--enable-shared=no" would then
cause "--with-shared-modules" statement to be ignored.
Setting "--enable-shared=yes --with-shared-modules=....." was OK. I
try to add one option at a time to configure to try to isolate which was
the problem, but in this case it looked like it was a matter of the
appropriate combination. Adding "--with-pam=yes" fixes the "make
nsswitch" problem.
I am using sunfreeware open ldap and Solaris kerberos. The solaris ldap
client lacks the functionality required for Active Directory support
(not that I need it at the moment.)
I have the sunfreeware versions of swing, binutils, libiconv, libintl,
libtool gcc, openldap, swig etc installed. I symlinked bash rather
than installing the sunfreeware version. Sunfreware libtool has the
bash path hard coded. I was using the sun version of python (2.4.)
--with-acl support is enabled by default.
I notice that I had a typo in the "--with-shared-modules" ("modules="
which seems to have been ignored by configure.
If I added "--enable-shared=vfs_zfsacl" that was also ignored. But I
had added that by mistake in the past to try to get zfsacl to build and
hadn't realized the syntax was wrong.
The following is the working configuration (including a typo that was
ignored):
# ls -l /usr/ccs/bin/ld
lrwxrwxrwx 1 root root 17 May 24 22:22 /usr/ccs/bin/ld ->
/usr/local/bin/ld
# ls -l /usr/local/bin/bash
lrwxrwxrwx 1 root root 13 May 13 16:42
/usr/local/bin/bash -> /usr/bin/bash
PATH=/usr/bin:/usr/sbin
PATH=/usr/local/bin:$PATH
PATH=/usr/local/samba-3.4.8-x32/bin:/usr/local/samba-3.4.8-x32/sbin:$PATH
LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
LD_LIBRARY_PATH=/usr/local/samba-3.4.8-x32/lib:$LD_LIBRARY_PATH
CPPFLAGS="-I /usr/local/include -I/usr/local/ssl/include -I/usr/include"
CPPFLAGS="-I /usr/local/samba-3.4.8-x32/include $CPPFLAGS"
LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib \
-L/usr/local/lib -R/usr/local/lib -L/usr/lib -R/usr/lib"
LDFLAGS="-L/usr/local/samba-3.4.8-x32/lib
-R/usr/local/samba-3.4.8-x32/lib $LDFLAGS"
export CPPFLAGS
export LDFLAGS
#PKG_CONFIG_PATH=/usr/local/samba-3.4.8-x32/lib/pkgconfig
export LD_LIBRARY_PATH
export PATH
export PKG_CONFIG_PATH
./configure --prefix=/usr/local/samba-3.4.8-x32 \
--with-privatedir=/etc/samba/private \
--with-lockdir=/var/samba/locks \
--with-configdir=/etc/samba \
--with-wbclient=yes \
--with-winbind=yes \
--with-libtalloc=yes \
--with-libtdb=yes \
--with-ads=yes \
--with-ldap=yes \
--with-krb5=/usr \
--with-pam=yes \
--enable-nss-wrapper=yes \
--enable-shared-libs=yes \
--with-shared-modules=vfs_zfsacl,modules=idmap_ldap,idmap_rid,idmap_ad,idmap_adex,idmap_hash,idmap_tdb2
\
--enable-shared=yes \
Thanks again for your help.
On 05/24/2010 03:52 AM, Jean-Jacques Moulis wrote:
> On Sun, 23 May 2010 22:08:51 -0400 Gaiseric Vandal<gaiseri...@gmail.com> wrote:
>
> GV> I was hoping someone could post, or point me to, a clear set of instructions
> GV> for compiling Samba 3.5.3 (or even 3.4.8) on Solaris 10. Or even just
> GV> confirmation that Solaris 3.5.3 really can compile on Solaris 10 with active
> GV> directory, nsswitch and zfs support. (I notice that Samba and Blastwave
> GV> versions of Samba 3.4.x do not include zfs and nsswitch support.)
>
> I compiled and use 3.5.2 on solaris10 5.10 Generic_142901-08 i86pc
> with the following configuration
> (compiler sun studio 12)
> the machine run as PDC
>
> # libiconv is installed in /export/samba
> CC='cc -m64 -fast' \
> CXX='CC -m64 -fast' \
> env LDFLAGS="-R/export/samba/lib -R/usr/sfw/lib/64 -R/usr/sfw/64 \
> -L/export/samba/lib -L/usr/sfw/lib/64 -L/usr/sfw/64" \
> ./configure \
> --prefix=/export/samba \
> --with-configdir=/export/samba/etc \
> --with-privatedir=/export/samba/etc/private \
> --with-lockdir=/export/samba/etc/tdb \
> --with-piddir=/var/run \
> --with-logfilebase=/var/log \
> --disable-cups \
> --without-ads \
> --without-ldap \
> --with-libiconv=/export/samba \
> --with-acl-support \
> --with-shared-modules=vfs_zfsacl,vfs_shadow_copy2 \
> --with-included-popt
>
> make -f Makefile-noincludes
> I will try 3.5.3 in a near future an let you know