[Samba] compile on solaris 64bit, static winbind

Dirk Jakobsmeier dirk.jakobsmeier at wige.com
Wed Oct 7 22:45:48 MDT 2009


Hello Eric,

thank you for your answer.

Am Mittwoch 07 Oktober 2009 19:54:20 schrieb Eric Boehm:
> On Wed, Oct 07, 2009 at 03:10:16PM +0200, Dirk Jakobsmeier wrote:
> >>>>> "Dirk" == Dirk Jakobsmeier <dirk.jakobsmeier at wige.com> writes:
> 
>     Dirk> Hello, i got many problems in compiling a working samba to
>     Dirk> use in our environment.
> 
>     Dirk> - solaris 10 on amd64 sun hardware
>     Dirk> - version above 3.3.0 because of one of our applications
>     Dirk> - samba as memeber server in active directory because of
>     Dirk>   usermanagement on
>     Dirk> windows 2003
>     Dirk> - 64-bit samba because of many many open files
>     Dirk> - static libraries because of relocation error: R_AMD64_PC32
>     Dirk>   with shared ones
>     Dirk> (espacially libwbinfo.so)
>     Dirk> - non compiling static libwbclient because of
>     Dirk>   shared-libraries-disabled not
>     Dirk> found (SHLD=shared-libraries-disabled in Makefile)
>     Dirk> - found comment about different handling on libwbclient
>     Dirk>   (samba distribution)
>     Dirk> and libtalloc (system os)
> 
>     Dirk> result is a nearly perfect working environment (even net
>     Dirk> join ads -w DOMAIN -U Administrator) but non working
>     Dirk> winbindd so no passwords from AD
> 
>     Dirk> Could anyone give us a hint to make this working, because
>     Dirk> after some weeks of testing and searching via internet my
>     Dirk> brain got absolutely blank.
> 
> I haven't had any problem building Samba 64-bit for Solaris Sparc. It
> might be helpful to see the output from make or from running the
> binary to see what is going wrong.
> 
> It's often the case that you need to sed LD_LIBRARY_PATH or
> LD_RUN_PATH or otherwise specify where executables can find the shared
> libraries.
> 
i've set all those paths. Not finding libraries is not the problem. If i 
configure samba like:

./configure --prefix=/usr/local/samba --with-acl-support --with-
krb5=/usr/local/samba --with-libiconv=/usr/local/samba --
libdir=/usr/local/samba

i get the following errors:

libsmb/clikrb5.c:1619:2: #error UNKNOWN_KRB5_ENCTYPE_TO_STRING_FUNCTION                                                                                                                                                                           
so edited include/config.h and set
#define HAVE_KRB5_ENCTYPE_TO_STRING_WITH_KRB5_CONTEXT_ARG
manually (using heimdal). Next run:

Linking bin/smbd                                                                                                                                                                                                                                 
ld: Schwerer Fehler: Datei dynconfig.o: falsche ELF-Klasse: ELFCLASS64                                                                                                                                                                           
ld: Schwerer Fehler: Dateiverarbeitungsfehler. Keine Ausgabe in bin/smbd 
geschrieben                                                                                                                                                             
collect2: ld returned 1 exit status                                                                                                                                                                                                              
*** Error code 1                                                                                                                                                                                                                                 

because several CFLAGS where missing in Makefile like:

bin/smbd: $(BINARY_PREREQS) $(SMBD_OBJ) bin/libtalloc.so bin/libtdb.so 
bin/libwbclient.so
        @echo Linking $@
        @$(CC) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LDAP_LIBS) \
                $(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \
                $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) $(AVAHI_LIBS) 
\
                $(POPT_LIBS)  $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
                $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)

No CFLAGS where set. So after adding them to every single line in Makefile i 
just added CFLAGS to LDFLAGS (they are used in every CC line). Then after 
copying libtalloc and libtdb manually to destination direcotry and trying 
smbstatus i got:

ld.so.1: smbstatus: fatal: relocation error: R_AMD64_PC32: file 
/usr/local/samba/lib/libtalloc.so: symbol main: value 0x2800148234f does not 
fit

This error is with all shared libraries i use when i compiled 64bit binaries. 
So I have to use static version of samba. Or do you have any tip how to work 
around this problem. The solaris 64bit installation has got both, 32bit and 
64bit libraries. Perhaps this is the problem.

Many thanks for your help
Regards

Dirk

-- 


More information about the samba mailing list