Samba Compiling questions


 
Thread Tools Search this Thread
Operating Systems Solaris Samba Compiling questions
# 1  
Old 07-24-2009
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?
# 2  
Old 07-24-2009
They are not errors they are warnings. Did your make succeed?
# 3  
Old 07-25-2009
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?
# 4  
Old 07-25-2009
You'd probably find it easier to grab the dependencies from Freeware for Solaris
# 5  
Old 07-25-2009
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?
# 6  
Old 07-25-2009
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".
# 7  
Old 07-25-2009
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?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Compiling Samba 4.4.5

I am running Fedora V21 and had their default Samba installed. But I wanted to put up a PDC with ADS, so I uninstalled samba and down loaded the Samba 4.4.5 source along with the Kerberos devel kit etc. I then configured and compiled etc and it indicated it was successful. But I can't load the... (0 Replies)
Discussion started by: griffinmt
0 Replies

2. Solaris

Two simple questions about Solaris DCHP and Samba

I have two simple questions First is :can dhcp server NATIVE of solaris perform dhcp updates of bind via dnssec like dchpd on linux? Second: Is possible to build a pdc with samba and iplanet ldap server?Or is better with openldap? I never found howto or discussions about iplanet server. Thanks (0 Replies)
Discussion started by: Linusolaradm1
0 Replies

3. Solaris

Compiling Error in Samba 3.4.1 on Solaris 10

Hi all, I am getting the following error While installing Samba 3.4.1 on Solaris 10. #./autogen.sh ./autogen.sh : autoheader : not found ./autogen.sh : test : argument expected Please help me as I am in a critical state of the project. Warm regards, Sathya (10 Replies)
Discussion started by: sathya47
10 Replies

4. UNIX for Dummies Questions & Answers

Compiling samba problem

People i download the lastest version of samba i`am tryng to compile it in a solaris 9 i'm reading the how to of samba, i am in the first step making the autogen.sh but show me this when i do ./autogen.sh ./autogen.sh: running script/mkversion.sh ./script/mkversion.sh: 'include/version.h'... (0 Replies)
Discussion started by: enkei17
0 Replies

5. Solaris

Problem compiling Samba 3.5.1 on Solaris 10 with gcc (3.4.6)

I'm getting this error when 'Linking shared library bin/libtalloc.so.2'... anyone know what's up here? Using CFLAGS = -O -I. -I/source/samba-3.5.1/source3 -I/source/samba-3.5.1/source3/../lib/popt -I/source/samba-3.5.1/source3/iniparser/src -Iinclude -I./include -I. -I. -I./../lib/replace... (6 Replies)
Discussion started by: son_t
6 Replies

6. UNIX for Advanced & Expert Users

Compiling Samba from Source on AIX, Active Directory, LDAP, Kerberos

Hello, I asked this question in the AIX subforum but never received an answer, probably because the AIX forum is not that heavily trafficked. Anyway, here it is.. I have never had any issues like this when compiling applications from source. When I try to compile samba-3.5.0pre2, configure runs... (9 Replies)
Discussion started by: raidzero
9 Replies

7. AIX

Compiling samba from source in AIX 5.3

Hello all. I have never had any issues like this when compiling applications from source. When I try to compile samba-3.5.0pre2, configure runs with no issues, but when the time comes to make, this happens: make: make 1254-025 There must be an existing description file or specify a target. ... (4 Replies)
Discussion started by: raidzero
4 Replies

8. UNIX for Dummies Questions & Answers

Samba pre-install questions.

Greetings, I hope this is the right forum. I am looking to install Samba on my Linux box on my home network. I'm pretty sure I can deal with the how, I'm just not certain of the what. ok I'm using Debian lenny with no GUI. I have apt working and I've successfully installed and used one package... (10 Replies)
Discussion started by: fguy
10 Replies

9. AIX

Compiling samba 3.0.27a under AIX

Compiling samba 3.0.27a under AIX I try to compile Samba 3.0.27a under AIX with LDAP and KErberos. The configure work fine: CFLAGS: -I/opt/pware/include -I/opt/pware/lib/ -I/opt/pware/open_ldap_exec/lib/ -I/software/samba/oldap/usr/lib -I/software/samba/oldap/usr/include ./configure... (2 Replies)
Discussion started by: BenediktS
2 Replies

10. UNIX and Linux Applications

Compiling samba 3.0.27a under AIX

I try to compile Samba 3.0.27a under AIX with LDAP and KErberos. The configure work fine: CFLAGS: -I/opt/pware/include -I/opt/pware/lib/ -I/opt/pware/open_ldap_exec/lib/ -I/software/samba/oldap/usr/lib -I/software/samba/oldap/usr/include ./configure --prefix=/opt/pware/samba/3.0.27a... (1 Reply)
Discussion started by: BenediktS
1 Replies
Login or Register to Ask a Question