[Samba] Problems 'make'ing on Solaris 9.

Gaiseric Vandal gaiseric.vandal at gmail.com
Fri May 7 05:14:47 MDT 2010

Hello Christoph

I guess samba lists will not let you include attachments.  I had problems
compiling samba 3.4.7 on solaris 10-  eventually I got it working.  I was
trying to recompile samba 3.5.2 yesterday but this time was getting stuck
with the /usr/ccs/bin/ld and  libtalloc thing (which seems like everyone on
solaris has this issue.)

I downloaded the "binutils" package (and dependencies) from sunfreeware
which includes the gnu ld.  (Not 100% sure this was necessary.)  I also
already download the sunfreeware packages for gcc, make, openldap and

In hindsight I could probably have used the gcc in /usr/sfw/bin (Sun's
"freeware" CD) since ld seems to be the issue not gcc.  

export PATH

export CPPFLAGS="-I/usr/local/include -I/usr/local/ssl/include
export 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"

./configure --prefix=/usr/local/samba-3.5.2 \
--with-shared-modules=vfs_zfsacl \
--with-privatedir=/etc/samba/private \
--with-lockdir=/var/samba/locks \
--with-configdir=/etc/samba \
--enable-nss-wrapper \
--with-libtalloc \
--with-ads --with-ldap \

The CPPFLAGS and LDFLAGS were to make sure it used the openldap not sun ldap
*h files.

But make still fails with libtalloc

/usr/ccs/bin/ld: illegal option -- version-script

Which I really don't get since /usr/local/bin/ld is the the path.
I think Sunfreeware GCC was compiled to export /usr/ccs/bin/ld

I am not quite sure what I did last time to make this work.  

Maybe I need gcc 4?

-----Original Message-----
From: samba-bounces at lists.samba.org [mailto:samba-bounces at lists.samba.org]
On Behalf Of christoph.beyer at desy.de
Sent: Friday, May 07, 2010 5:35 AM
To: Collin Baillie
Cc: samba at lists.samba.org
Subject: Re: [Samba] Problems 'make'ing on Solaris 9.


I just did built 3.5.2 on solaris 10 sparc and had some similar errors. 
Main thing is probably to make upsolutely sure that none of the
krb/ldap/sasl headers of solaris are used. I attached a built script which
figured out to work for me, it does not look very professional but I did a
lot of testing with it and did not touch it again since it was working. 
Maybe it gives you some hints for compiling on solaris 9 as well..

good luck

On Fri, 7 May 2010, Collin Baillie wrote:

>  Hi list! I'm trying to build Samba 3.4.7 with ADS support on Solaris 
> 9 and experiencing a heap of problems (which seem to be common). First 
> of my
> system: Solaris 9 SPARC > uname -a
> SunOS sunfire2 5.9 Generic_122300-08
> sun4u sparc SUNW,Sun-Fire-V240 Solaris Using GCC 3.4.6 from 
> sunfreeware (with all noted dependancies installed) > gcc --version 
> gcc (GCC)
> 3.4.6
> Copyright (C) 2006 Free Software Foundation, Inc.
> This is free
> software; see the source for copying conditions. There is NO warranty; 
> version
> 3.81 > make --version
> GNU Make 3.81
> Copyright (C) 2006 Free Software
> Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A 
> PARTICULAR PURPOSE. This program built for sparc-sun-solaris2.9 The 
> problem I have been experiencing is a fail during the make sequence. I 
> got the good old error of libtalloc.so.1 link script missing. In fact, 
> when I manually expanded all the 'macros' ( ie $(LIBSMB_OBJ) ) and 
> produce the entire gcc command, libtalloc.so.1 builds successfully, as 
> do a number of other libs after it. libaddns.so.0 built ok by itself, 
> and then I had to do a couple more. Finally I have arrived at the 
> build of bin/smbd. Even with hand parsing the gcc command line, I am 
> getting errors about undefined references to functions: > make Using 
> CFLAGS = -I/usr/local/include -O -I.
> -I/export/home/cbaillie/samba/samba-3.4.7/source3
> -I/export/home/cbaillie/samba/samba-3.4.7/source3/iniparser/src 
> -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/talloc 
> -I./../lib/tevent -I./../lib/tdb/include -I./libaddns -I./librpc 
> -I./.. -DHAVE_CONFIG_H -I/usr/local/include -I/usr/local/include 
> -I/export/home/cbaillie/samba/samba-3.4.7/source3/lib -I.. 
> -I../source4
> LIBS = -lsendfile
> -lresolv -lrt -ldl -lnsl -lsocket -liconv -laio LDFLAGS = -pie 
> -L/usr/local/lib -R/usr/local/lib -R/usr/lib -L/usr/openwin/lib 
> -R/usr/openwin/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib 
> -L/usr/local/BerkeleyDB.4.2/lib -R/usr/local/BerkeleyDB.4.7/lib 
> -lthread -L./bin DYNEXP = -Wl,-E LDSHFLAGS = -G -L/usr/local/lib 
> -R/usr/local/lib -R/usr/lib -L/usr/openwin/lib -R/usr/openwin/lib 
> -L/usr/local/ssl/lib -R/usr/local/ssl/lib 
> -L/usr/local/BerkeleyDB.4.2/lib -R/usr/local/BerkeleyDB.4.7/lib 
> -lthread -L./bin SHLIBEXT = so SONAMEFLAG = -Wl,-soname= Linking 
> bin/smbd
> warning: libcom_err.so.1, needed by /usr/local/lib/libasn1.so, may 
> conflict with
> libcom_err.so.3
> warning: libtalloc.so, needed by /usr/local/lib/libwbclient.so, not 
> found (try using -rpath or -rpath-link)
> smbd/mangle_hash.o: In function
> `mangle_hash_init':
> mangle_hash.c:(.text+0x15ac): undefined reference to `tdb_open_ex'
> rpc_parse/parse_prs.o: In function
> `tdb_prs_fetch':
> parse_prs.c:(.text+0x31cc): undefined reference to `tdb_fetch'
> passdb/secrets.o: In function
> `open_schannel_session_store':
> secrets.c:(.text+0x2b70): undefined
> reference to `tdb_close'
> secrets.c:(.text+0x2c18): undefined reference to `tdb_close'
> passdb/secrets.o: In function
> `secrets_store_schannel_session_info':
> secrets.c:(.text+0x2f38): undefined
> reference to `tdb_close'
> passdb/secrets.o: In function
> `secrets_restore_schannel_session_info':
> secrets.c:(.text+0x3094):
> undefined reference to `tdb_close'
> secrets.c:(.text+0x31a0): undefined
> reference to `tdb_close'
> passdb/secrets.o:secrets.c:(.text+0x3268): more undefined references 
> to `tdb_close' follow
> libsmb/unexpected.o: In function
> `unexpected_packet':
> unexpected.c:(.text+0x1a0): undefined reference to `tdb_store'
> -- snip -- and so on. Is anyone out there more experienced with 
> compiling OSS stuff on Solaris/SPARC willing to help with this build? 
> We were running 3.0.25b happily, until a recent reboot when we 
> discovered our shiney new Windows 2008 domain controllers don't play 
> nicely with that version. Now trying to get our production server back 
> online with a newer version. Regards, Collin Baillie
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba

best regards

/*   Christoph Beyer     |   Office: Building 2b / 23     *\
  *   DESY                |    Phone: 040-8998-2317        *
  *   - IT -              |      Fax: 040-8998-4060        *
\*   22603 Hamburg       |     http://www.desy.de         */

More information about the samba mailing list