Re: [Samba] ????: Could not build Samba with ADS support on Solaris 10 [SEC=UNCLASSIFIED]
I had had some success with the GCC and OpenLDAP from www.sunfreeware.com. But otherwise had set environmental variables like you had. Maybe setting PKG_CONFIG_PATH variable might help? Both blastwave and sunfreeware have precompiled versions of Samba (at least 3.4.x.) I had problems with nss_winbind support (that may have just been a LD_LIBRARY_PATH issue when running samba.) The other downside with the blastwave and sunfreeware version was that they were 32-bit on the x64 platform. But they may meet your needs. I still think Sun Studio is the best way to get a good 64-bit compiled version if you can't get the packages from Oracle/Sun. -Original Message- From: samba-boun...@lists.samba.org [mailto:samba-boun...@lists.samba.org] On Behalf Of youngjohn04 Sent: Friday, July 08, 2011 7:02 PM To: 'Wilkinson, Alex'; samba@lists.samba.org Subject: Re: [Samba] ????: Could not build Samba with ADS support on Solaris 10 [SEC=UNCLASSIFIED] Thank you Alex. I tried as you did, unfortunately, it still not work. I also tried compile v3.0.37 and using gcc4, the same error. -bash-3.00# uname -a SunOS sol10-4 5.10 Generic_141445-09 i86pc i386 i86pc -bash-3.00# -bash-3.00# pkginfo |grep CSW system CSWalternatives alternatives - an implementation of linux-style alternatives choice mgr application CSWautoconf autoconf - GNU auto-configuration tool application CSWautomake automake - A tool for automatically generating Makefiles. application CSWbash bash - A sh-compatible command language interpreter application CSWbdb4 berkeleydb4 - Stub package as contents moved to CSWbdb42 application CSWbdb42 berkeleydb42 - BerkeleyDB 4.2 embedded database libraries and utilities application CSWbdb48 berkeleydb48 - BerkeleyDB 4.8 embedded database libraries and utilities system CSWbinutils binutils - GNU 'binary utilities': gas, gld, gprof, and others application CSWbison bison - GNU Project parser generator (yacc replacement) application CSWbzip2 bzip2 - a program and library for lossless, block-sorting data compression application CSWcacertificatesca_certificates - CA certificates application CSWcas-cpsampleconf cas_cpsampleconf - Class action script cpsampleconf application CSWcas-crontab cas_crontab - Class action script crontab application CSWcas-etcservices cas_etcservices - Class action script etcservices application CSWcas-inetd cas_inetd - Class action script inetd application CSWcas-initsmf cas_initsmf - Class action script initsmf application CSWcas-migrateconf cas_migrateconf - Class action script migrateconf application CSWcas-postmsg cas_postmsg - Class action script postmsg application CSWcas-preserveconf cas_preserveconf - Class action script preserveconf application CSWcas-pycompile cas_pycompile - Class action script pycompile application CSWcas-texinfo cas_texinfo - Class action script texinfo application CSWcas-usergroup cas_usergroup - Class action script usergroup system CSWcommoncommon - common files and dirs for CSW packages application CSWcoreutils coreutils - GNU core utilities application CSWcswclassutils cswclassutils - CSW class action utilities application CSWcurlrtcurl_rt_stub - Transitional package. Content moved to CSWlibcurl2 CSWlibcurl3 CSWlibcurl4 application CSWexpat expat - XML Parser Toolkit application CSWflex flex - older version of the 'flex' parser generator application CSWgawk gawk - GNU grep application CSWgcc3 gcc3 - GNU C Compiler branch 3 Replacement application CSWgcc3core gcc3core - GNU C Compiler application CSWgcc3corertgcc3corert - GNU C Compiler Run Time application CSWgcc3g++ gcc3g++ - GNU C++ Compiler application CSWgcc3g++rt gcc3g++rt - GNU C++ Compiler Run Time application CSWgcc3rtgcc3rt - GNU Compiler Suite branch 3 Run Time Replacement application CSWgcc4core gcc4core - GNU C Compiler application CSWgcc4corertgcc4corert - GNU C Compiler Run Time application CSWgcc4objc gcc4objc - GNU Objective C Compiler application CSWgcc4objcrtgcc4objcrt - GNU Objective C Compiler Run Time application CSWgcryptlibgcrypt_stub - Transitional package. Content moved to CSWlibgcrypt-utils application CSWgdbm
Re: [Samba] ????: Could not build Samba with ADS support on Solaris 10 [SEC=UNCLASSIFIED]
pplication CSWosslrtopenssl_rt - Openssl runtime libraries application CSWosslutils openssl_utils - Openssl binaries and related tools application CSWperl perl - A high-level, general-purpose programming language system CSWpkggetpkg_get - CSW version of automated package download tool application CSWpkgutil pkgutil - Installs Solaris packages easily application CSWreadline readline_stub - Transitional package. Content moved to CSWlibhistory4 CSWlibhistory5 CSWlibhistory6 CSWlibreadli ... application CSWsasl sasl - Simple Authentication and Security Layer system CSWtcpwrap tcpwrappers - (ipv6.4 patched) lib and tools for pre-screening tcp connections application CSWterminfo terminfo - Database of terminal information, part of ncurses application CSWtexinfo texinfo - The GNU Documentation System application CSWunixodbc unixodbc - ODBC drivers for Unix systems application CSWzlib zlib - Zlib Data Compression Library -bash-3.00# -bash-3.00# ls -l /usr/ccs/bin/ld lrwxrwxrwx 1 root root 16 Jul 9 06:06 /usr/ccs/bin/ld -> /opt/csw/bin/gld -bash-3.00# PATH=$PATH:/usr/ccs/bin:/opt/csw/bin:/opt/csw/gcc3/bin export PATH CC=/opt/csw/gcc3/bin/gcc export CC CPP=/opt/csw/gcc3/bin/cpp export CPP LD_LIBRARY_PATH=/opt/csw/lib:/opt/csw/libexec export LD_LIBRARY_PATH LD_LIBRARY_PATH=/opt/csw/lib # CPPFLAGS="-I/usr/local/include" CPPFLAGS="-I/opt/csw/include -I/usr/include -I/usr/sfw/include" export CPPFLAGS cd /samba-3.4.12/source3 ./configure --with-ldap --with-ads ... checking for ber_sockbuf_add_io... yes checking for LDAP_OPT_SOCKBUF... no checking for LBER_OPT_LOG_PRINT_FN... no checking for ldap_init in -lldap... yes checking for ldap_set_rebind_proc... yes checking whether ldap_set_rebind_proc takes 3 arguments... 3 checking for ldap_initialize... no checking whether LDAP support is used... yes checking for Active Directory and krb5 support... yes checking for ldap_initialize... (cached) no configure: error: Active Directory support requires ldap_initialize Regards youngjohn04 -Original Message- From: samba-boun...@lists.samba.org [mailto:samba-boun...@lists.samba.org] On Behalf Of Wilkinson, Alex Sent: Thursday, July 07, 2011 11:03 AM To: samba@lists.samba.org Subject: Re: [Samba] ????: Could not build Samba with ADS support on Solaris 10 [SEC=UNCLASSIFIED] 0n Wed, Jul 06, 2011 at 11:13:54PM +0800, youngjohn04 wrote: >With these environment variables set, same error appeared. > >To avoid using bundled ldap, I removed SUNWlldap, keep only Openldap, but >this also made no difference. >I also tried using Sun Studio12, failed too. Try something like: 1. Dependencies #pkg-get -i autoconf automake berkeleydb4 binutils bison common flex gcc3 gcc3core gcc3corert gcc3g++ gcc3g++rt gcc3rt ggettext gmake gnupg gnutls krb5_lib krb5_lib_dev krb5_user openldap openldap_client openldap_rt sasl zlib 2. $PATH At a minimum: /usr/sbin:/usr/bin:/usr/ccs/bin:/opt/csw/bin:/opt/csw/gcc3/bin 3. /bin/sh variables Use /bin/sh when doing the build. you then need to set the following variables: CC=gcc CPPFLAGS="-I/opt/csw/include -I/usr/include -I/usr/sfw/include" LDFLAGS="-L/opt/csw/lib -L/usr/sfw/lib -R/opt/csw/lib:/usr/sfw/lib" LD_LIBRARY_PATH="/opt/csw/lib" export CC LDFLAGS LD_LIBRARY_PATH CPPFLAGS 4. ld(1) hack This is the only hack that hack to be done. samba likes to use GNU ld and not the native solaris linker. This is the hack you will need: #mv /usr/ccs/bin/ld /usr/ccs/bin/ld.orig #ln -s /opt/csw/bin/gld /usr/ccs/bin/ld 5. Build #./configure --prefix=/export/server_apps/SAMBA_3_0_32/ --with-ldap --with-ads --with-krb5=/opt/csw --with-winbind --with-pam --disable-cups --with-acl-support --with-krb5=/opt/csw --with-shared-modules=idmap_rid #make #make install The aforementioned recipe has worked for me many times in the past. I havent tried recently though. -Alex IMPORTANT: This email remains the property of the Department of Defence and is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have received this email in error, you are requested to contact the sender and delete the email. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] ????: Could not build Samba with ADS support on Solaris 10 [SEC=UNCLASSIFIED]
0n Wed, Jul 06, 2011 at 11:13:54PM +0800, youngjohn04 wrote: >With these environment variables set, same error appeared. > >To avoid using bundled ldap, I removed SUNWlldap, keep only Openldap, but >this also made no difference. >I also tried using Sun Studio12, failed too. Try something like: 1. Dependencies #pkg-get -i autoconf automake berkeleydb4 binutils bison common flex gcc3 gcc3core gcc3corert gcc3g++ gcc3g++rt gcc3rt ggettext gmake gnupg gnutls krb5_lib krb5_lib_dev krb5_user openldap openldap_client openldap_rt sasl zlib 2. $PATH At a minimum: /usr/sbin:/usr/bin:/usr/ccs/bin:/opt/csw/bin:/opt/csw/gcc3/bin 3. /bin/sh variables Use /bin/sh when doing the build. you then need to set the following variables: CC=gcc CPPFLAGS="-I/opt/csw/include -I/usr/include -I/usr/sfw/include" LDFLAGS="-L/opt/csw/lib -L/usr/sfw/lib -R/opt/csw/lib:/usr/sfw/lib" LD_LIBRARY_PATH="/opt/csw/lib" export CC LDFLAGS LD_LIBRARY_PATH CPPFLAGS 4. ld(1) hack This is the only hack that hack to be done. samba likes to use GNU ld and not the native solaris linker. This is the hack you will need: #mv /usr/ccs/bin/ld /usr/ccs/bin/ld.orig #ln -s /opt/csw/bin/gld /usr/ccs/bin/ld 5. Build #./configure --prefix=/export/server_apps/SAMBA_3_0_32/ --with-ldap --with-ads --with-krb5=/opt/csw --with-winbind --with-pam --disable-cups --with-acl-support --with-krb5=/opt/csw --with-shared-modules=idmap_rid #make #make install The aforementioned recipe has worked for me many times in the past. I havent tried recently though. -Alex IMPORTANT: This email remains the property of the Department of Defence and is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have received this email in error, you are requested to contact the sender and delete the email. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Could not build Samba with ADS support on Solaris 10
Samba on Solaris can be a real challenge. Your build is probably picking up the Sun native(non-openldap) ldap libraries which is why you have ldap support but not AD support. AD support always requires kerberos but the Solaris kerberos libraries Did you set LD_LIBRARY_PATH? You may also need to set LDLFAGS LDFLAGS=" -L/usr/local/lib -R/usr/local/lib -L/usr/lib -R/usr/lib" LDFLAGS="-L/usr/local/samba-3.5.2/lib -R/usr/local/samba-3.5.2/lib $LDFLAGS" If the compiler uses /usr/ccs/bin/ld , you will usually have have compiler failures. If /usr/sfw/bin/gcc uses a gnu ld you may have better luck. Probably the most reliable may to compile for Solaris is to use Sun Studio compilers and dmake. Sun-bundled Samba 3.0.x was compiled with sun ldap, but with some extra netscape (?) libraries. If you have an Oracle support contract you can download a Sun-provided Samba 3.5.x - and forget compiling it at all. I do not know if they used openldap or native ldap libraries. I don't know if the samba patches are included in the latest patch cluster. (I suspect so.) It would be nice to have a wiki page on samba.org for building Samba under Solaris. On 07/06/2011 08:33 AM, youngjohn04 wrote: I tried to build Samba with ADS support, I got error, messages are: . checking for ldap_initialize... no checking whether LDAP support is used... yes checking for Active Directory and krb5 support... yes checking for ldap_initialize... (cached) no configure: error: Active Directory support requires ldap_initialize I installed Openldap(downloaded from sunfreeware), tried the following commands, all resulted the same. $ ./configure --with-ads $ ./configure --with-ads CPPFLAGS="-I/usr/local/include" $ export CPPFLAGS="-I/usr/local/include"; ./configure --with-ads Samba Version: 3.4.13 or 3.5.9, Solaris 10 Sparc or x86_64. C compiler: /usr/sfw/bin/gcc I also tried on Redhat Linux 5.5, succeeded, without error. Anyone have any idea? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Could not build Samba with ADS support on Solaris 10
I tried to build Samba with ADS support, I got error, messages are: . checking for ldap_initialize... no checking whether LDAP support is used... yes checking for Active Directory and krb5 support... yes checking for ldap_initialize... (cached) no configure: error: Active Directory support requires ldap_initialize I installed Openldap(downloaded from sunfreeware), tried the following commands, all resulted the same. $ ./configure --with-ads $ ./configure --with-ads CPPFLAGS="-I/usr/local/include" $ export CPPFLAGS="-I/usr/local/include"; ./configure --with-ads Samba Version: 3.4.13 or 3.5.9, Solaris 10 Sparc or x86_64. C compiler: /usr/sfw/bin/gcc I also tried on Redhat Linux 5.5, succeeded, without error. Anyone have any idea? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba