[Samba] ????: Could not build Samba with ADS support on Solaris 10 [SEC=UNCLASSIFIED]

youngjohn04 youngjohn04 at 163.com
Fri Jul 8 17:02:06 MDT 2011


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 CSWcacertificates                ca_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      CSWcommon                        common - common files and dirs
for CSW packages
application CSWcoreutils                     coreutils - GNU core utilities
application CSWcswclassutils                 cswclassutils - CSW class
action utilities
application CSWcurlrt                        curl_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 CSWgcc3corert                    gcc3corert - GNU C Compiler Run
Time
application CSWgcc3g++                       gcc3g++ - GNU C++ Compiler
application CSWgcc3g++rt                     gcc3g++rt - GNU C++ Compiler
Run Time
application CSWgcc3rt                        gcc3rt - GNU Compiler Suite
branch 3 Run Time Replacement
application CSWgcc4core                      gcc4core - GNU C Compiler
application CSWgcc4corert                    gcc4corert - GNU C Compiler Run
Time
application CSWgcc4objc                      gcc4objc - GNU Objective C
Compiler
application CSWgcc4objcrt                    gcc4objcrt - GNU Objective C
Compiler Run Time
application CSWgcrypt                        libgcrypt_stub - Transitional
package. Content moved to CSWlibgcrypt-utils
application CSWgdbm                          gdbm - Legacy package as
contents moved to CSWlibgdbm3
application CSWggettext                      ggettext - GNU locale utilities
application CSWggettext-data                 ggettext_data - GNU locale
utilities, translation files
application CSWggettextrt                    ggettextrt - GNU locale
utilities, transitional dependency package
application CSWgm4                           gm4 - GNU m4 Unix macro
processor
application CSWgmake                         gmake - Controls generation of
executables and other compile-related tasks
application CSWgnupg                         gnupg - GnuPG is a complete and
free replacement for PGP.
application CSWgnutls                        gnutls - GNU Transport Layer
Security Utility Programs
application CSWgpg-error                     gpg_error - Tools for
libgpg-error.so
application CSWgpgerr                        libgpg_error_stub -
Transitional package. Content moved to CSWgpg-error
application CSWgsed                          gsed - The GNU non-interactive
text Stream-oriented EDitor (sed)
application CSWiconv                         libiconv - GNU iconv library
system      CSWisaexec                       isaexec - sneaky wrapper around
Sun isaexec
application CSWkrb5lib                       krb5_lib - MIT Kerberos 5 core
libraries
application CSWkrb5libdev                    krb5_lib_dev - MIT Kerberos 5
developer libraries
application CSWkrb5user                      krb5_user - MIT Kerberos 5user
tools
application CSWlibasprintf0                  libasprintf0 - GNU locale
utilities, libasprintf.so.0
application CSWlibcurl2                      libcurl2 - Library for
client-side URL transfers, libcurl.so.2
application CSWlibcurl3                      libcurl3 - Library for
client-side URL transfers, libcurl.so.3
application CSWlibcurl4                      libcurl4 - Library for
client-side URL transfers, libcurl.so.4
application CSWlibgcrypt-utils               libgcrypt_utils - Utility
programs for libgcrypt
application CSWlibgdbm3                      libgdbm3 - GDBM share library,
libgdbm.so.3
application CSWlibgettextlib0-14-1           libgettextlib0_14_1 - GNU
locale utilities, libgettextlib-0.14.1.so
application CSWlibgettextlib0-17             libgettextlib0_17 - GNU locale
utilities, libgettextlib-0.17.so
application CSWlibgettextlib0-18-1           libgettextlib0_18_1 - GNU
locale utilities, libgettextlib-0.18.1.so GNU locale utilities,
libgettextlib-0.18.1.so
application CSWlibgettextpo0                 libgettextpo0 - GNU locale
utilities, libgettextpo.so.0
application CSWlibgettextsrc0-18-1           libgettextsrc0_18_1 - GNU
locale utilities, libgettextsrc-0.18.1.so
system      CSWlibgmp                        libgmp - GNU Multiple Precision
Arithmetic Library
application CSWlibgnutls13                   libgnutls13 - Legacy GNU TLS
providing libgnutls.so.13
application CSWlibgnutls26                   libgnutls26 - GNU Transport
Layer Security libraries and tools providing libgnutls*.so.26
application CSWlibgpg-error0                 libgpg_error0 - GNU gpg related
library, libgpg-error.so.0
application CSWlibhistory4                   libhistory4 - GNU readline
library, libhistory.so.4
application CSWlibhistory5                   libhistory5 - GNU readline
library, libhistory.so.5
application CSWlibhistory6                   libhistory6 - GNU readline
library, libhistory.so.6
application CSWlibicu                        libicu - International
Components for Unicode
application CSWlibicu42                      libicu42 - International
Components for Unicode, libicu*.so.42
application CSWlibidn11                      libidn11 - GNU IDN library,
libidn.so.11
application CSWlibintl2                      libintl2 - GNU locale
utilities, libintl.so.2
application CSWlibintl3                      libintl3 - GNU locale
utilities, libintl.so.3
application CSWlibintl8                      libintl8 - GNU locale
utilities, libintl.so.8
application CSWlibltdl7                      libltdl7 - Libtool libltdl.so.7
from libtool 2.x
system      CSWlibmpfr                       libmpfr - GNU Multiple
Precision floating-point arithmetic library
application CSWlibncurses5                   libncurses5 - A free software
emulation of curses, libncurses.so.5
application CSWlibncursesw5                  libncursesw5 - A free software
emulation of curses, libncursesw.so.5
application CSWlibnet                        libnet - Libnet Package
Construction Library (Legacy)
application CSWlibpanel5                     libpanel5 - A free software
emulation of curses, libpanel.so.5
application CSWlibpanelw5                    libpanelw5 - A free software
emulation of curses, libpanelw.so.5
application CSWlibreadline4                  libreadline4 - GNU readline
library, libreadline.so.4
application CSWlibreadline5                  libreadline5 - GNU readline
library, libreadline.so.5
application CSWlibreadline6                  libreadline6 - GNU readline
library, libreadline.so.6
application CSWlibsigsegv2                   libsigsegv2 - A library for
catching and handling segmentation faults, libsigsegv.so.2
application CSWlibtasn1-3                    libtasn1_3 - GNU ASN 1 library,
libtasn1.so.3
application CSWlibxml2                       libxml2_stub - Transitional
package. Content moved to CSWlibxml2-2
application CSWlibxml2-2                     libxml2_2 - XML Parser Library
application CSWncurses                       ncurses - A free software
emulation of curses
application CSWoldap                         openldap - OpenLDAP server for
Lightweight Directory Access Protocol
application CSWoldapclient                   openldap_client - OpenLDAP
client executables
application CSWoldaprt                       openldap_rt - OpenLDAP runtime
libraries
application CSWossl                          openssl - Openssl meta package
application CSWossldevel                     openssl_devel - Openssl
development files
application CSWosslrt                        openssl_rt - Openssl runtime
libraries
application CSWosslutils                     openssl_utils - Openssl
binaries and related tools
application CSWperl                          perl - A high-level,
general-purpose programming language
system      CSWpkgget                        pkg_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-bounces at lists.samba.org [mailto:samba-bounces at lists.samba.org]
On Behalf Of Wilkinson, Alex
Sent: Thursday, July 07, 2011 11:03 AM
To: samba at 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




More information about the samba mailing list