Samba Compiling questions

OS: Solaris 10

I downloaded a binary from samba.org (3.0.24)

I extracted the file and ran the following command:

# ./configure --prefix=/usr/sfw --with-configdir=/etc/sfw --with-winbind

Now I am trying to understand the compile process but I can't find many answers online

Compiling lib/sendfile.c
lib/sendfile.c: In function `sys_sendfile':
lib/sendfile.c:188: warning: cast from pointer to integer of different size

lib/iconv.c: In function `sys_iconv':
lib/iconv.c:141: warning: passing arg 2 of `iconv' from incompatible pointer type

Linking nsswitch/libnss_winbind.so
ld: warning: option -o appears more than once, first setting taken

Can someone englighten me? or push me into the right direction? I just want to better understand what these errors mean

I also tried the following command as well:

# ./configure --prefix=/usr/sfw --with-configdir=/etc/sfw --with-pam --with-pam_smbpass --with-winbind --with-ads --with-ldap

checking for Active Directory and krb5 support... yes
checking for ldap_initialize... no
configure: error: Active Directory support requires ldap_initialize

Any ideas?

They are not errors they are warnings. Did your make succeed?

hi reborg, I will get back to you regarding that simpler line for samba

Right now, I am trying to set the following line up as I will NEED AD support (I want to authenticate through AD for my samba users) <-- Am I correct here?

# ./configure --prefix=/usr/sfw --with-configdir=/etc/sfw --with-pam --with-pam_smbpass --with-winbind --with-ads --with-ldap

checking for Active Directory and krb5 support... yes
checking for ldap_initialize... no
configure: error: Active Directory support requires ldap_initialize

from what I've read ldap_initialize is part of the OpenLDAP development libraries

and I know I'm a newb so if someone could shed some light I would be grateful..

I downloaded openldap-stable-20090411.tar

and ran ./configure

and I get this error

configure: error: BDB/HDB: BerkeleyDB not available

I tried running make depend

but

# make depend
make: Fatal error: Don't know how to make target `depend'

I've searched everywhere but I feel like an idiot, I don't know that much about compiling and I can't seem to get samba installed with the correct arguments...

Any thoughts?

---------- Post updated at 03:01 PM ---------- Previous update was at 02:54 PM ----------

# ./configure --prefix=/usr/sfw --with-configdir=/etc/sfw --with-pam --with-pam_smbpass --with-winbind --with-ads --with-ldap

Okay, I'm going to ask 2 more questions for anyone out there willing to help

1) if I place samba into /usr/sfw and patch my Solaris box later on, will the patch (if there is a newer version of samba supported, as of right now it is 3.0.33) overwrite my old binaries as I will have my binaries in the same location??

2) and if I want to authenticate with AD using samba are the above arguments correct?

am I adding too many? (I'm thinking the PAM stuff?)

I read through a lot of the samba.org stuff for AD authentication which a fellow unix.com user pointed me in the direction of but there is no section on what arguments to use to install with samba for AD authentication..

anyone had experience with this?

---------- Post updated at 04:38 PM ---------- Previous update was at 03:01 PM ----------

Is there any way to install just the OpenLDAP Development Libraries?

You'd probably find it easier to grab the dependencies from Freeware for Solaris

Thanks for the reply reborg!

I was able to fin and add openldap-2.4.16-sol10-x86-local.gz (I'm running x86 version on my VMWare)

When I run:
# ./configure --prefix=/usr/sfw --with-configdir=/etc/sfw --with-pam --with-pam_smbpass --with-winbind --with-ads --with-ldap

I get the following:
configure: error: libldap is needed for LDAP support

Now in my /usr/local/lib

I see a few libldap

lrwxrwxrwx 1 root root 20 Jul 25 18:29 libldap-2.4.so.2 -> libldap-2.4.so.2.4.2
-rwxr-xr-x 1 bin bin 897424 May 29 21:56 libldap-2.4.so.2.4.2
-rw-r--r-- 1 bin bin 1136660 May 29 21:56 libldap.a
-rw-r--r-- 1 bin bin 1162 May 29 21:56 libldap.la
lrwxrwxrwx 1 root root 20 Jul 25 18:29 libldap.so -> libldap-2.4.so.2.4.2
lrwxrwxrwx 1 root root 22 Jul 25 18:29 libldap_r-2.4.so.2 -> libldap_r-2.4.so.2.4.2
-rwxr-xr-x 1 bin bin 1011760 May 29 21:56 libldap_r-2.4.so.2.4.2
-rw-r--r-- 1 bin bin 1276954 May 29 21:56 libldap_r.a
-rw-r--r-- 1 bin bin 1176 May 29 21:56 libldap_r.la
lrwxrwxrwx 1 root root 22 Jul 25 18:29 libldap_r.so -> libldap_r-2.4.so.2.4.2

libldap.so (which I think is the library file I want right?)

I put this in my ENV shell before using configure

# LDFLAGS=-L/usr/local/lib
# export LDFLAGS

Is there something I am not understanding here?
Any pointers reborg?

CPPFLAGS="-I/usr/local/include -I/usr/sfw/include -I/usr/include"
LDFLAGS="-L/usr/local/lib -L/usr/sfw/lib -L/usr/lib -R/usr/local/lib:/usr/sfw/lib:/usr/lib".

Thanks for all this help reborg! I did what you suggested but I am still getting the same error... I'm posting a bit more info of my rig

# pkginfo -i | grep ldap
application SMColdap openldap
system SUNWlldap LDAP Libraries
# pkginfo -l SMColdap
PKGINST: SMColdap
NAME: openldap
CATEGORY: application
ARCH: x86
VERSION: 2.4.16
BASEDIR: /usr/local
VENDOR: The OpenLDAP Group
PSTAMP: Steve Christensen
INSTDATE: Jul 25 2009 18:29
EMAIL: sunfreeware@gmail.com
STATUS: completely installed
FILES: 1516 installed pathnames
12 shared pathnames
84 directories
91 executables
50869 blocks used (approx)

# pkginfo -l SUNWlldap
PKGINST: SUNWlldap
NAME: LDAP Libraries
CATEGORY: system
ARCH: i386
VERSION: 11.10.0,REV=2005.01.21.16.34
BASEDIR: /
VENDOR: Sun Microsystems, Inc.
DESC: Ldap libraries in for software development of dynamically linked executables
PSTAMP: on10ptchfeatx20080814051140
INSTDATE: Mar 09 2009 00:35
HOTLINE: Please contact your local service provider
STATUS: completely installed
FILES: 7 installed pathnames
2 shared pathnames
1 linked files
2 directories
4 executables
315 blocks used (approx)

Intalled ldap with openldap-2.4.16-sol10-sparc-local (sunfreeware)
I've been trying to install samba with samba-3.0.24 (which is from samba.org)

I can post the config.log but I did not know what portions would be useful. I posted the output variables.

# LDFLAGS="-L/usr/local/lib -L/usr/sfw/lib -L/usr/lib -R/usr/local/lib:/usr/sfw/lib:/usr/lib"
# export LDFLAGS

# CPPFLAGS="-I/usr/local/include -I/usr/sfw/include -I/usr/include"
# export CPPFLAGS

then I ran the same command

# ./configure --prefix=/usr/sfw --with-configdir=/etc/sfw --with-pam --with-pam_smbpass --with-winbind --with-ads --with-ldap

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_scanf in -llber... 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_dn2ad_canonical... no
configure: error: libldap is needed for LDAP support

This is from the config.log

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACL_LIBS=''
AR='ar'
AUTH_LIBS=''
AUTH_MODULES=''
AUTH_STATIC=''
AWK='nawk'
BROKEN_CC='#'
BUILD_INIPARSER=''
BUILD_POPT=''
CC='gcc'
CFLAGS='-O -D_SAMBA_BUILD_'
CHARSET_MODULES=''
CHARSET_STATIC=''
CIFSMOUNT_PROGS=''
CONFIG_LIBS=''
CPP='gcc -E'
CPPFLAGS='-I/usr/local/include -I/usr/sfw/include -I/usr/include -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64'
CUPS_CONFIG=''
DEFS=''
DYNEXP=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='/usr/sfw/bin/ggrep -E'
EXEEXT=''
EXTRA_ALL_TARGETS=''
EXTRA_BIN_PROGS=''
EXTRA_SBIN_PROGS=''
FLAGS1=''
GREP='/usr/sfw/bin/ggrep'
HOST_OS='solaris2.10'
IDMAP_LIBS=''
IDMAP_MODULES=''
IDMAP_STATIC=''
INIPARSERLIBS=''
INSTALLLIBCMD_A=''
INSTALLLIBCMD_SH=''
INSTALL_CIFSMOUNT=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_LIBMSRPC=''
INSTALL_LIBSMBCLIENT=''
INSTALL_LIBSMBSHAREMODES=''
INSTALL_PAM_MODULES=''
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
KRB5CONFIG=''
KRB5_LIBS=''
LDAP_LIBS='-llber '
LDFLAGS='-L/usr/local/lib -L/usr/sfw/lib -L/usr/lib -R/usr/local/lib:/usr/sfw/lib:/usr/lib -lthread'
LDSHFLAGS='-G'
LIBMSRPC=''
LIBMSRPC_SHARED=''
LIBOBJS=''
LIBS='-lresolv -lnsl -lsocket -liconv -llber '
LIBSMBCLIENT=''
LIBSMBCLIENT_SHARED=''
LIBSMBSHAREMODES=''
LIBSMBSHAREMODES_SHARED=''
LIBUNWIND_PTRACE=''
LTLIBOBJS=''
NSCD_LIBS=''
NSSSONAMEVERSIONSUFFIX=''
OBJEXT='o'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PAM_MODULES=''
PASSDB_LIBS=''
PATH_SEPARATOR=':'
PDB_MODULES=''
PDB_STATIC=''
PERL='/usr/bin/perl'
PICFLAGS='-fPIC'
PICSUFFIX='po'
PIE_CFLAGS=''
PIE_LDFLAGS=''
POPTLIBS=''
PRINT_LIBS=''
PYTHON=''
ROFF=''
RPC_MODULES=''
RPC_STATIC=''
SHELL='/bin/bash'
SHLD='${CC} ${CFLAGS}'
SHLIBEXT='so'
SHLIB_PROGS=''
SMBD_LIBS=''
SMBLDAP=''
SMBLDAPUTIL=''
SMBWRAPPER=''
SMBWRAP_INC=''
SMBWRAP_OBJS=''
SOCKWRAP=''
SONAMEFLAG='-Wl,-soname='
TERMLDFLAGS=''
TERMLIBS=''
UNINSTALLLIBCMD_A=''
UNINSTALLLIBCMD_SH=''
UNINSTALL_CIFSMOUNT=''
UNINSTALL_LIBMSRPC=''
UNINSTALL_LIBSMBCLIENT=''
UNINSTALL_PAM_MODULES=''
VFS_MODULES=''
VFS_STATIC=''
WINBIND_NSS=''
WINBIND_NSS_EXTRA_LIBS=''
WINBIND_NSS_EXTRA_OBJS=''
WINBIND_NSS_LDSHFLAGS=''
WINBIND_WINS_NSS=''
ac_ct_CC='gcc'
bindir='${exec_prefix}/bin'
build='i386-pc-solaris2.10'
build_alias=''
build_cpu='i386'
build_os='solaris2.10'
build_vendor='pc'
builddir=''
configdir='/etc/sfw'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host='i386-pc-solaris2.10'
host_alias=''
host_cpu='i386'
host_os='solaris2.10'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libc_cv_fpie='no'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
lockdir='${VARDIR}/locks'
logfilebase='${VARDIR}'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pammodulesdir='${LIBDIR}/security'
pdfdir='${docdir}'
piddir='${VARDIR}/locks'
prefix='/usr/sfw'
privatedir='${prefix}/private'
program_transform_name='s,x,x,'
psdir='${docdir}'
rootsbindir='${SBINDIR}'
sbindir='${exec_prefix}/sbin'
selftest_prefix='./'
sharedstatedir='${prefix}/com'
smbtorture4_path=''
swatdir='${prefix}/swat'
sysconfdir='${prefix}/etc'
target='i386-pc-solaris2.10'
target_alias=''
target_cpu='i386'
target_os='solaris2.10'
target_vendor='pc'

configure: exit 1

Any ideas?

and if I may ask... what does the -R do for the configure? I could not any -R variables within the configure file

I'm going to keep fiddling with this... I'm starting to get a headache lol... thanks for everything!

---------- Post updated at 09:54 PM ---------- Previous update was at 09:42 PM ----------

I thought adding this

# LD_LIBRARY_PATH=/usr/local/lib:/usr/sfw/lib:/usr/lib
# export LD_LIBRARY_PATH

would help but no good, same error ><

---------- Post updated at 10:34 PM ---------- Previous update was at 09:54 PM ----------

So I changed my LDFLAGS and added -lsasl

# LDFLAGS="-L/usr/local/lib -L/usr/sfw/lib -L/usr/lib -R/usr/local/lib:/usr/sfw/lib:/usr/lib -lsasl"
# export LDFLAGS

I get past the LDAP error

checking for LDAP support... yes

but when I run configure again

checking for magic in krb5_address... yes
configure: error: libkrb5 is needed for Active Directory support

BUT, I have libkrb5 in /usr/lib

# ./configure --prefix=/usr/sfw --with-configdir=/etc/sfw --with-pam --with-pam_smbpass --with-winbind --with-ads --with-ldap --with-krb5=/usr/lib

so I added the --with-krb5=/usr/lib (as the default is /usr)

but I get the same error...

Any ideas?

Ok, for the kerberos you need to specify the path, setting env variables won't do it.

Assuming you grabbed kerberos from SunFreeware this would be the appropriate setting:

./configure --prefix=/usr/sfw --with-ads --with-ldap --with-winbind --with-krb5=/usr/local

Actually if you look at this search it should throw up a pdf with a lot of this information. I found the pdf very useful when I did this, but I have forgotten a lot of it by now.

Hey reborg,

I've tried everything and I just can't seem to get this working ><

so I went through that guide

# LDFLAGS="-L/usr/local/lib -L/usr/sfw/lib -L/usr/lib -R/usr/local/lib:/usr/sfw/lib:/usr/lib"
# export LDFLAGS

# CPPFLAGS="-I/usr/local/include -I/usr/include -I/usr/sfw/include"
# export CPPFLAGS

./configure --prefix=/usr/sfw --with-ads --with-ldap --with-winbind --with-krb5=/usr/local --with-acl-support --with-shared-modules=idmap_ad, vfs_zfsacl

But I get the following error

checking build system type... Invalid configuration `vfs_zfsacl': machine `vfs_zfsacl' not recognized
configure: error: /bin/bash ./config.sub vfs_zfsacl failed

I did a find but I could not vfs_zfsacl <-- idmap_ad.c was in the source directory from which I am configuring from... I think I found somewhere that the version I am using does not support it (3.0.24)

I can't seem to find the kerberos package on sunfreeware
Do you know what the package is called on sunfreeware?

I don't see a libkrb5 package or anything like that

I have this on my machine though

# pkginfo -i | grep krb
system SUNWkrbr Kerberos version 5 support (Root)
system SUNWkrbu Kerberos version 5 support (Usr)

# pkginfo -l SUNWkrbr
PKGINST: SUNWkrbr
NAME: Kerberos version 5 support (Root)
CATEGORY: system
ARCH: i386
VERSION: 11.10.0,REV=2005.01.21.16.34
BASEDIR: /
VENDOR: Sun Microsystems, Inc.
DESC: Kerberos version 5 support (Root)
PSTAMP: on10ptchfeatx20080814051138
INSTDATE: Mar 09 2009 00:21
HOTLINE: Please contact your local service provider
STATUS: completely installed
FILES: 21 installed pathnames
12 shared pathnames
14 directories
1 executables
23 blocks used (approx)

# pkginfo -l SUNWkrbu
PKGINST: SUNWkrbu
NAME: Kerberos version 5 support (Usr)
CATEGORY: system
ARCH: i386
VERSION: 11.10.0,REV=2005.01.21.16.34
BASEDIR: /
VENDOR: Sun Microsystems, Inc.
DESC: Kerberos version 5 support (Usr)
PSTAMP: on10ptchfeatx20080814051139
INSTDATE: Mar 09 2009 00:21
HOTLINE: Please contact your local service provider
STATUS: completely installed
FILES: 39 installed pathnames
9 shared pathnames
10 directories
18 executables
5077 blocks used (approx)

but I don't see anything in /lib but in /usr/lib I have the libkrb5

# pwd
/usr/lib

# ls -l | grep krb
drwxr-xr-x 4 root bin 1024 Mar 9 00:35 krb5
lrwxrwxrwx 1 root root 14 Mar 9 00:21 libkrb5.so -> ./libkrb5.so.1
-rwxr-xr-x 1 root bin 21504 Aug 14 2007 libkrb5.so.1

# ./configure --prefix=/usr/sfw --with-ads --with-ldap --with-winbind --with-acl-support --with-shared-modules=idmap_ad

gives me the dreaded error:

configure: error: libldap is needed for LDAP support

The only way I can get that error to go away is to use

# LDFLAGS="-L/usr/local/lib -L/usr/sfw/lib -L/usr/lib -R/usr/local/lib:/usr/sfw/lib:/usr/lib -lsasl"

but then I get the krb error.. (but I have not installed krb5, I thought it was already installed from the previous pkginfo I provided)

I then ran the following:

# ./configure --prefix=/usr/sfw --with-ads --with-ldap --with-winbind --with-krb5=/usr --with-acl-support --with-shared-modules=idmap_ad

and I get the following error:

checking whether ldap_set_rebind_proc takes 3 arguments... 3
checking for ldap_dn2ad_canonical... no
configure: error: libldap is needed for LDAP support

Now I will try that option is -lsasl again

# LDFLAGS="-L/usr/local/lib -L/usr/sfw/lib -L/usr/lib -R/usr/local/lib:/usr/sfw/lib:/usr/lib -lsasl"
# export LDFLAGS

I kept CCPFLAGS the same

I run the command again

./configure --prefix=/usr/sfw --with-ads --with-ldap --with-winbind --with-krb5=/usr --with-acl-support --with-shared-modules=idmap_ad

I couldn't find much info on -lsasl, I think I read something about static libraries with that option? rebord do you know anything about that?

but with -lsasl it lets me get passed the libldap error

I get the following error:

configure: error: libkrb5 is needed for Active Directory support

but I noticed that during the check it does not find much for krb5

checking for _et_list in -lcom_err... no
checking for krb5_encrypt_data in -lk5crypto... no
checking for des_set_key in -lcrypto... no
checking for copy_Authenticator in -lasn1... no
checking for roken_getaddrinfo_hostspec in -lroken... no
checking for gss_display_status in -lgssapi... no
checking for krb5_mk_req_extended in -lkrb5... no
checking for krb5_kt_compare in -lkrb5... no
checking for gss_display_status in -lgssapi_krb5... no
checking for krb5_set_real_time... no
checking for krb5_set_default_in_tkt_etypes... no
checking for krb5_set_default_tgs_ktypes... no
checking for krb5_principal2salt... no
checking for krb5_use_enctype... no
checking for krb5_string_to_key... no
checking for krb5_get_pw_salt... no
checking for krb5_string_to_key_salt... no
checking for krb5_auth_con_setkey... no
checking for krb5_auth_con_setuseruserkey... no
checking for krb5_locate_kdc... no
checking for krb5_get_permitted_enctypes... no
checking for krb5_get_default_in_tkt_etypes... no
checking for krb5_free_ktypes... no
checking for krb5_free_data_contents... no
checking for krb5_principal_get_comp_string... no
checking for krb5_free_unparsed_name... no
checking for krb5_free_keytab_entry_contents... no
checking for krb5_kt_free_entry... no
checking for krb5_krbhst_get_addrinfo... no
checking for krb5_c_enctype_compare... no
checking for krb5_enctypes_compatible_keys... no
checking for krb5_crypto_init... no
checking for krb5_crypto_destroy... no
checking for krb5_decode_ap_req... no
checking for decode_krb5_ap_req... no
checking for krb5_free_ap_req... no
checking for free_AP_REQ... no
checking for krb5_c_verify_checksum... no
checking for krb5_principal_compare_any_realm... no
checking for krb5_parse_name_norealm... no
checking for krb5_princ_size... no
checking for krb5_get_init_creds_opt_set_pac_request... no
checking for krb5_get_renewed_creds... no
checking for krb5_get_kdc_cred... no
checking for krb5_free_error_contents... no
checking whether krb5_verify_checksum takes 7 arguments... 7
checking for checksum in krb5_checksum... no
checking for etype in EncryptedData... no
checking for ticket pointer in krb5_ap_req... yes
checking for e_data pointer in krb5_error... no
checking for krb5_crypto type... no
checking for krb5_encrypt_block type... yes
checking for addrtype in krb5_address... yes
checking for addr_type in krb5_address... no
checking for enc_part2 in krb5_ticket... yes
checking for keyblock in krb5_creds... yes
checking for session in krb5_creds... no
checking for keyvalue in krb5_keyblock... no
checking for ENCTYPE_ARCFOUR_HMAC_MD5... no
checking for KEYTYPE_ARCFOUR_56... no
checking for AP_OPTS_USE_SUBKEY... yes
checking for KV5M_KEYTAB... yes
checking for KRB5_KU_OTHER_CKSUM... no
checking for KRB5_KEYUSAGE_APP_DATA_CKSUM... yes
checking for the krb5_princ_component macro... no
checking for key in krb5_keytab_entry... yes
checking for keyblock in krb5_keytab_entry... no
checking for magic in krb5_address... yes
configure: error: libkrb5 is needed for Active Directory support

what are you thoughts reborg? I really appreciate all your help.. this has been the worst weeekend ever trying to figure this out lol... I just want to try out for Samba SSO! :smiley:

Let me know your thoughts, I need to take a walk

if you need ANY info that would help you diagnose anything, let me know!

Depending on version you may need Heimdal or maybe just to specify '-lkbr5' in LDFLAGS.

Hi reborg, thanks for the advice!

I started over with the help of this guide I found

I've been documenting what I've been doing so I'll post it here to give you a look at my configuration.

reference url: Solaris9 Samba ADS - Granizada
download the following from Sunfreeware - Freeware Open Source Software for Sun Microsystem's Solaris

BINARY 1
gcc-3.4.6-sol10-x86-local.gz

# gunzip gcc-3.4.6-sol10-x86-local.gz

# pkgadd -d gcc-3.4.6-sol10-x86-local

The following packages are available:
1 SMCgcc gcc
(x86) 3.4.6

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

BINARY 2
bison-2.4.1-sol10-x86-local.gz

# gunzip bison-2.4.1-sol10-x86-local.gz
# pkgadd -d bison-2.4.1-sol10-x86-local

The following packages are available:
1 SMCbison bison
(x86) 2.4.1

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

BINARY 3
m4-1.4.12-sol10-x86-local.gz

# gunzip m4-1.4.12-sol10-x86-local.gz
# pkgadd -d m4-1.4.12-sol10-x86-local

The following packages are available:
1 SMCm4 m4
(x86) 1.4.12

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

BINARY 4
db-4.7.25.NC-sol10-x86-local.gz

# gunzip db-4.7.25.NC-sol10-x86-local.gz
# pkgadd -d db-4.7.25.NC-sol10-x86-local

The following packages are available:
1 SMCdb db
(x86) 4.7.25.NC

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

BINARY 5
binutils-2.19-sol10-x86-local.gz

# gunzip binutils-2.19-sol10-x86-local.gz
# pkgadd -d binutils-2.19-sol10-x86-local

The following packages are available:
1 SMCbinut binutils
(x86) 2.19

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

Processing package instance <SMCbinut> from </var/tmp/source/binutils-2.19-sol10-x86-local>

binutils(x86) 2.19
FSF
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
7 package pathnames are already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.

The following files are already installed on the system and are being
used by another package:
/usr/local/lib/libiberty.a

Do you want to install these conflicting files [y,n,?,q]y

BINARY 6
flex-2.5.35-sol10-x86-local.gz

# gunzip flex-2.5.35-sol10-x86-local.gz
# pkgadd -d flex-2.5.35-sol10-x86-local

The following packages are available:
1 SMCflex flex
(x86) 2.5.35

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

mv /usr/ccs/bin/ld /usr/ccs/bin/ld.off
mv /usr/include/gssapi /usr/include/old.gssapi

# crle -c /var/ld/ld.config -l \
> /lib:/usr/lib:/usr/local/lib:/usr/local/BerkeleyDB.4.7/lib:/opt/local/lib

INSTALL OPENLDAP SOURCE
reference url: OpenLDAP Software 2.4 Administrator's Guide
openldap-stable-20090411.tgz

# echo $PATH
/usr/local/bin:/usr/sbin:/usr/bin
# echo $LDFLAGS
-L/usr/local/lib -L/usr/local/BerkeleyDB.4.7/lib
# echo $CPPFLAGS
-I/usr/local/include -I/usr/local/BerkeleyDB.4.7/include
# echo $CFLAGS
-I/usr/local/include -I/usr/local/BerkeleyDB.4.7/include
# echo $LD_LIBRARY_PATH
/usr/local/lib:/usr/local/BerkeleyDB.4.7/lib:/usr/bin

# gunzip openldap-stable-20090411.tgz
# tar xvf openldap-stable-20090411.tar
# cd openldap-2.4.16

# ./configure --prefix=/opt/local --disable-bdb --enable-null --without-tls

Making servers/slapd/backends.c
Add config ...
Add ldif ...
Add monitor ...
Add bdb ...
Add hdb ...
Add null ...
Add relay ...
Making servers/slapd/overlays/statover.c
Add seqmod ...
Add syncprov ...
Please run "make depend" to build dependencies

# echo $PATH
/usr/local/bin:/usr/sbin:/usr/bin:/usr/ccs/bin

# make depend

# make

# make install

INSTALL HEIMDAL
reference url: ftp://ftp.pdc.kth.se/pub/heimdal/src/
heimdal-1.2.tar.gz

# gunzip heimdal-1.2.tar.gz
# tar xvf heimdal-1.2.tar

Right now I've compiled and installed OpenLDAP and currently trying to install Heimdal

but I get the following error

# ./configure --prefix=/opt/local --enable-dns --enable-shared --disable-krb4 \
> CFLAGS="-I/usr/local/include -I/usr/local/BerkeleyDB.4.2/include" \
> CPPFLAGS="-I/usr/local/include -I/usr/local/BerkeleyDB/4.2/include" \
> LDFLAGS=-L/usr/local/lib
configure: WARNING: Unrecognized options: --enable-dns, --disable-krb4
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking build system type... i386-pc-solaris2.10
checking host system type... i386-pc-solaris2.10
configure: autobuild project... Heimdal
configure: autobuild revision... 1.2
configure: autobuild hostname... master
configure: autobuild timestamp... 20090728-015338
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for bison... bison -y
checking for flex... flex
checking lex output file root... configure: error: cannot find output from flex; giving up

Got an ideas?