Re: [Samba] compile on solaris 64bit, static winbind
On Thu, Oct 08, 2009 at 07:13:40AM +0200, Dirk Jakobsmeier wrote: Dirk == Dirk Jakobsmeier dirk.jakobsme...@wige.com writes: Dirk Hello Eric, yes me again, 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) Dirk $(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 Dirk 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. Dirk i've found the problem after concentrating me on the Dirk relocation problem. I've found an article related on gcc and Dirk solaris ld and shared libraries. The option -G (shared libs Dirk using gcc) does not tell the solaris (/usr/ccs/bin/ld) Dirk linker to use share libraries. I have to change this options Dirk in the Makefile to -fPIC -shared and then samba compiles Dirk using shared libs. So now i will go on with my tests and Dirk will tell the list if everythink works. Dirk Thank you for opening my mind to search for the problem with Dirk the shared libraries. Another hint I can give you when you are building a 64 bit Samba is to specify the necessary CFLAGS, LDFLAGS when you run configure. Here's how I run configure when building with the gcc compiler. I create a small shell script called 'myconfigure' cat myconfigure CC='gcc' CXX=g++ \ CPPFLAGS='-D__EXTENSIONS__ -I/usr/local/include -I/usr/local/openldap/include -I/usr/local/sasl/include -I/usr/local/kerberos/include -I/usr/local/BerkeleyDB/include -I/usr/local/openssl/include' \ CFLAGS='-g -m64' \ LDFLAGS='-L/opt/corp/local/samba/lib -R/opt/corp/local/samba/lib -R\$$ORIGIN/../lib' \ ../source/configure \ --prefix=/opt/corp/local/samba \ --with-libiconv=/usr/local \ --with-readline=/usr/local \ --with-ldap \ --with-krb5=/usr/local/kerberos \ --with-ads \ --with-automount \ --with-libsmbclient \ --with-acl-support \ --with-winbind You will obviously need to adapt this for your own environment, but I think you get the idea. You can remove the -R\$$ORIGIN/../lib. I put all the shared libraries I need in the samba lib directory. That's there in case I want to run samba from another location. If you are using the Sun Studio compiler, here's a slightly different configuration of samba. The relevant changes are for CC and CFLAGS CC='cc' CXX=CC \ CFLAGS='-g -xarch=v9a' \ CC='cc' CXX=CC \ CPPFLAGS='-D__EXTENSIONS__ -I/usr/local/include' \ CFLAGS='-g -xarch=v9a' \ LDFLAGS='-L/opt/corp/local/samba/lib -R/opt/corp/local/samba/lib -L/usr/local/lib/sparcv9 -R/usr/local/lib/sparcv9 -L/usr/local/lib -R/usr/local/lib' \ ../source/configure \ --with-libiconv=/usr/local \ --with-readline=/usr/local \ --enable-debug \ --prefix=/opt/corp/local/samba One important point is that you need to make sure that the -L and -R switches are pointing to locations that have 64bit instead of 32bit libraries. Good luck. -- Eric M. Boehm /\ ASCII Ribbon Campaign bo...@nortel.com \ / No HTML or RTF in mail X No proprietary word-processing Respect Open Standards / \ files in mail -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] compile on solaris 64bit, static winbind
Hello Eric, Am Donnerstag 08 Oktober 2009 14:26:22 schrieb Eric Boehm: On Thu, Oct 08, 2009 at 07:13:40AM +0200, Dirk Jakobsmeier wrote: Dirk == Dirk Jakobsmeier dirk.jakobsme...@wige.com writes: Dirk Hello Eric, yes me again, 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) Dirk $(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 samba@lists.samba.org This error is with all shared libraries i use when i compiled 64bit Dirk 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. Dirk i've found the problem after concentrating me on the Dirk relocation problem. I've found an article related on gcc and Dirk solaris ld and shared libraries. The option -G (shared libs Dirk using gcc) does not tell the solaris (/usr/ccs/bin/ld) Dirk linker to use share libraries. I have to change this options Dirk in the Makefile to -fPIC -shared and then samba compiles Dirk using shared libs. So now i will go on with my tests and Dirk will tell the list if everythink works. Dirk Thank you for opening my mind to search for the problem with Dirk the shared libraries. Another hint I can give you when you are building a 64 bit Samba is to specify the necessary CFLAGS, LDFLAGS when you run configure. Here's how I run configure when building with the gcc compiler. I create a small shell script called 'myconfigure' cat myconfigure CC='gcc' CXX=g++ \ CPPFLAGS='-D__EXTENSIONS__ -I/usr/local/include -I/usr/local/openldap/include -I/usr/local/sasl/include -I/usr/local/kerberos/include -I/usr/local/BerkeleyDB/include -I/usr/local/openssl/include' \ CFLAGS='-g -m64' \ LDFLAGS='-L/opt/corp/local/samba/lib -R/opt/corp/local/samba/lib -R\$$ORIGIN/../lib' \ ../source/configure \ --prefix=/opt/corp/local/samba \ --with-libiconv=/usr/local \ --with-readline=/usr/local \ --with-ldap \ --with-krb5=/usr/local/kerberos \ --with-ads \ --with-automount \ --with-libsmbclient \ --with-acl-support \ --with-winbind You will obviously need to adapt this for your own environment, but I think you get the idea. You can remove the -R\$$ORIGIN/../lib. I put all the shared libraries I need in the samba lib directory. That's there in case I want to run samba from another location. If you are using the Sun Studio compiler, here's a slightly different configuration of samba. The relevant changes are for CC and CFLAGS CC='cc' CXX=CC \ CFLAGS='-g -xarch=v9a' \ CC='cc' CXX=CC \ CPPFLAGS='-D__EXTENSIONS__ -I/usr/local/include' \ CFLAGS='-g -xarch=v9a' \ LDFLAGS='-L/opt/corp/local/samba/lib -R/opt/corp/local/samba/lib -L/usr/local/lib/sparcv9 -R/usr/local/lib/sparcv9 -L/usr/local/lib -R/usr/local/lib' \ ../source/configure \ --with-libiconv=/usr/local \ --with-readline=/usr/local \ --enable-debug \ --prefix=/opt/corp/local/samba i have nearly the same options now and it seems like everything is working. The main problem was the switch -G that should be a -fPIC and -shared one. Many thanks for your informations that helped me a lot. Regards -- Dirk -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] compile on solaris 64bit, static winbind
Hello, i got many problems in compiling a working samba to use in our environment. - solaris 10 on amd64 sun hardware - version above 3.3.0 because of one of our applications - samba as memeber server in active directory because of usermanagement on windows 2003 - 64-bit samba because of many many open files - static libraries because of relocation error: R_AMD64_PC32 with shared ones (espacially libwbinfo.so) - non compiling static libwbclient because of shared-libraries-disabled not found (SHLD=shared-libraries-disabled in Makefile) - found comment about different handling on libwbclient (samba distribution) and libtalloc (system os) result is a nearly perfect working environment (even net join ads -w DOMAIN -U Administrator) but non working winbindd so no passwords from AD Could anyone give us a hint to make this working, because after some weeks of testing and searching via internet my brain got absolutely blank. with friendly regards Dirk -- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] compile on solaris 64bit, static winbind
On Wed, Oct 07, 2009 at 03:10:16PM +0200, Dirk Jakobsmeier wrote: Dirk == Dirk Jakobsmeier dirk.jakobsme...@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. -- Eric M. Boehm /\ ASCII Ribbon Campaign bo...@nortel.com \ / No HTML or RTF in mail X No proprietary word-processing Respect Open Standards / \ files in mail -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] compile on solaris 64bit, static winbind
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.jakobsme...@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 -- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] compile on solaris 64bit, static winbind
Hello Eric, yes me again, 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.jakobsme...@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 i've found the problem after concentrating