samba-users May 2010 archive
Main Archive Page > Month Archives  > samba-users archives
samba-users: Re: [Samba] Fwd: RE: Problems 'make'ing on Solaris

Re: [Samba] Fwd: RE: Problems 'make'ing on Solaris 9/10

From: Gaiseric Vandal <gaiseric.vandal_at_nospam>
Date: Tue May 18 2010 - 02:44:35 GMT
To: "'Samba'" <>

As per Klaus Kreuzwieser's suggestions (5/12/2010) I tweeked my
and Makefile files to support /usr/ccs/bin/ld.

However, when I compile samba 3.5.2 with sunfreeware gcc 3.4.6, blastwave
gcc 4.x or blastwave gcc 3.x I get the following error on make:

Compiling smbd/server.c
Linking bin/smbd
modules/vfs_scannedonly.o: In function `connect_to_scanner':
vfs_scannedonly.c:(.text+0x3b1): undefined reference to `SUN_LEN'
collect2: ld returned 1 exit status
make: *** [bin/smbd] Error 1

Google search indicates that "SUN_LEN" is not a standard "unix" definition,
and is gnu/linux specific. Maybe samba 3.5.3 will fix this.

Although I am getting the feeling that the open source crowd has decided to
give up on solaris. (or maybe Sun/Oracle has given up on open source or at
least on Samba- it doesn't have much role in a oracle apps/database world.)

-----Original Message-----
From: Gaiseric Vandal []
Sent: Monday, May 17, 2010 5:56 PM
To: Samba
Subject: Re: [Samba] Fwd: RE: Problems 'make'ing on Solaris 9/10

Thanks for the advice. I am continuing to work on trying to compile
Samba 3.4.8 or 3.5.2.

I am now using the GCC4 compiler from blastwave. The sunfreeware one
appears to be 32-bit only. Since I am running 64-bit OS I would like to
stick with 64-bit as much as possible.

I am making decent progress with Samba 3.4.8

If I set

I can not compile. If I set

it can compile. I think it has problems with libtdb unless libtdb is

I also need to leave the "--with-netapi" option out completely.
I can not compile with "--with-ads=yes." I think this may be related to
shared library support problems. I don't actually need ads support- I
just need to configure trusts with Active Directory domains.

I have symlinked "/usr/ccs/bin/ld -> /opt/csw/bin/ld" - since "make"
attempts to pass options to ld that are not legit for non-gnu ld. I
haven't tried your recommended changes yet- I was trying to track down
what would or wouldn't compile with ld symlinked.

I will let you know what happens once I do try the changes you recommended.

On 05/12/2010 03:38 PM, Klaus Kreuzwieser wrote:
> Hello,
> if you can't wait for 3.5.3 here is a way to build Samba 3.5.2 on
> Solaris 10 without any system modifications (we used gcc 3.4.6).
> Install all dependencies from
> Edit source3/configure script and replace "LD=ld" with
> "LD=/usr/ccs/bin/ld"
> PATH=/usr/sbin:/usr/bin:/usr/local/bin
> CPPFLAGS="-I/usr/local/include"
> LDFLAGS="-L/usr/local/lib"
> ./configure --enable-socket-wrapper
> --prefix=/usr/local/opt/samba-3.5.2 --with-acl-support --with-ads
> --with-aio-support --with-automount --with-krb5=/usr/local --with-ldap
> --with-pam
> Edit the created Makefile, replace LD flags "-G" with "-fPIC -shared"
> and all "-lthread" with "-lthread -lintl".
> /usr/local/bin/make -j5
> /usr/local/bin/make install
> That's it.
> ---Klaus

-- To unsubscribe from this list go to the following URL and read the instructions: