[Samba] Samba complie problem

Gaiseric Vandal gaiseric.vandal at gmail.com
Fri Aug 31 10:22:33 MDT 2012


Compiling Samba on Solaris 10 can be a real challenge.  A lot of the
issues seem to be related to the old version of ld.     I would expect
that you would have more luck on Solaris 11 but I have not tried it yet. 

I ended up using Sun Studio and dmake.     If you can look for older
posts from me there should be notes on what I did.

Solaris 10 (with the latest updates) should include samba 3.5.x .    A
lot less aggravation than compiling IF it meets your needs.  

On 08/31/12 12:16, Nitin Thakur wrote:
> Well managed to fix it, it was openladap. Now I have problem with make: -
>
>       SONAMEFLAG = -Wl,-soname=
> Linking shared library bin/libtalloc.so.2
> /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../sparc-sun-solaris2.10/bin/ld: anonymous version tag cannot be combined with other version tags
> collect2: ld returned 1 exit status
> *** Error code 1
> The following command caused the error:
> gcc -I/opt/local/samba/include -I/opt/local/samba/include -I.  -I/opt/local/samba-3.6.7/source3  -I/opt/local/samba-3.6.7/source3/../lib/iniparser/src  -Iinclude -I./include  -I. -I. -I./../lib/replace -I./../lib/tevent -I./librpc -I./.. -I./../lib/talloc -I../lib/tdb/include  -DHAVE_CONFIG_H  -I/opt/local/samba/include -I/opt/local/samba/include -I/usr/local/inclue -I/usr/sfw/include -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLDAP_DEPRECATED -DSUNOS5    -I/opt/local/samba-3.6.7/source3/lib  -I..  -D_SAMBA_BUILD_=3 -D_SAMBA_BUILD_=3 -fPIC -shared -Wl,-z,relro -L/opt/local/samba/lib -R/opt/local/samba/lib -L/opt/local/samba/lib -R/opt/local/samba/lib -L/usr/local/lib -L/usr/sfw/lib -R/usr/local/lib -R/usr/sfw/lib -R/usr/lib -lthread -L./bin -lc -Wl,-z,defs -Wl,--version-script,/opt/local/samba-3.6.7/source3/exports/`basename bin/libtalloc.so.2 | sed 's:\.so[\.0-9]*$:.syms:'` -o bin/libtalloc.so.2 ../lib/talloc/talloc.o ./../lib/replace/replace.o ./../lib/replace
>  /snprintf.o ./../lib/replace/getpass.o ./../lib/replace/strptime.o ./../lib/replace/timegm.o  ./../lib/replace/getifaddrs.o -lnsl -lsocket -Wl,-soname=`basename bin/libtalloc.so.2`
> make: Fatal error: Command failed for target `bin/libtalloc.so.2'
>
> Any idea?
>
> Thanks
>
> Nitin
>
>> From: nitinthakur at hotmail.com
>> To: samba at lists.samba.org
>> Date: Thu, 30 Aug 2012 18:49:50 +0000
>> Subject: Samba complie problem
>>
>> hi  all
>>
>> Samba build problem when compiling with --with-ads
>>
>> I have complid, kerberos and openldap in /opt/local/samba and I am using gcc with gnu binutils. Its a solaris 10 sparc.
>>
>> Configure gives me following error: -
>>
>> checking for LDAP support... yes
>> checking ldap.h usability... yes
>> checking ldap.h presence... yes
>> checking for ldap.h... yes
>> checking lber.h usability... yes
>> checking lber.h presence... yes
>> checking for lber.h... yes
>> checking for ber_tag_t... yes
>> checking for ber_scanf in -llber... yes
>> checking for ber_sockbuf_add_io... yes
>> checking for LDAP_OPT_SOCKBUF... yes
>> checking for LBER_OPT_LOG_PRINT_FN... yes
>> checking for ldap_init in -lldap... no
>> checking for ldap_set_rebind_proc... no
>> checking whether ldap_set_rebind_proc takes 3 arguments... 3
>> checking for ldap_initialize... no
>> configure: error: libldap is needed for LDAP support
>>
>> Config.log output: -
>>
>> configure:25335: gcc -o conftest -I/opt/local/samba/include -I/opt/local/samba/include -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include -L/opt/local/samba/lib -R/opt/local/samba/lib -lthread -L./bin -L/usr/lib conftest.c -lldap -llber   -lresolv -lrt    -lnsl -lsocket  -lmd5 -lrt  -liconv >&5
>> /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../sparc-sun-solaris2.10/bin/ld: /opt/local/samba/lib/libldap.so: dladdr: invalid version 12 (max 0)
>> /opt/local/samba/lib/libldap.so: could not read symbols: Bad value
>>
>> I installed openldap in /opt/local/samba.
>>
>> # find /opt/local/samba -name libldap\*
>> /opt/local/samba/lib/libldap_r.a
>> /opt/local/samba/lib/libldap.so
>> /opt/local/samba/lib/libldap.la
>> /opt/local/samba/lib/libldap-2.4.so.2
>> /opt/local/samba/lib/libldap.a
>> /opt/local/samba/lib/libldap_r.so
>> /opt/local/samba/lib/libldap_r-2.4.so.2
>> /opt/local/samba/lib/libldap-2.4.so.2.8.4
>> /opt/local/samba/lib/libldap_r-2.4.so.2.8.4
>> /opt/local/samba/lib/libldap_r.la
>>
>> Thanks
>>
>> Nitin
>  		 	   		  





More information about the samba mailing list