khalid.m.alvi@census.gov
2004-May-24 12:16 UTC
[Samba] Samba 3.0.4 fails to compile on Solaris 9
I have been trying to compile Samba 3.0.4 on a SunFire v880 running Solaris 9 but "make" generates a fatal error. My goal is to get Samba compiled with the "--with-ldapsam" option so that I can use SunOne Directory Server 5.2 as the back-end repository for user authentication. I have gcc version 3.3.2 installed in /usr/local/bin/gcc which I have used to successfully compile other applications. This is one of my ./configure attempts: # ./configure --prefix=/usr/local/samba-3.0.4 --with-ldapsam --with-ldap \> --with-quotasUsing libraries: LIBS = -lsendfile -lsec -lgen -lresolv -lsocket -lnsl -ldl LDAP_LIBS = -lldap -llber AUTH_LIBS checking configure summary... yes configure: creating ./config.status config.status: creating include/stamp-h config.status: creating Makefile config.status: creating script/findsmb config.status: creating smbadduser config.status: creating script/gen-8bit-gap.sh config.status: creating include/config.h # make Using FLAGS = -O -Iinclude -I/sysadmin/samba/samba-3.0.4/source/include -I/sys admin/samba/samba-3.0.4/source/ubiqx -I/sysadmin/samba/samba-3.0.4/source/smbwra pper -I. -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/sysadmin/samba/samba-3.0 .4/source LIBS = -lsendfile -lsec -lgen -lresolv -lsocket -lnsl -ldl LDSHFLAGS = -G LDFLAGS Compiling dynconfig.c In file included from include/includes.h:891, from dynconfig.c:21: include/proto.h:589: error: parse error before "LDAP_CONST" *** Error code 1 make: Fatal error: Command failed for target `dynconfig.o' I have tried various options with configure but they all generate the same exact error. My attempts includes running ./configure with no options at all and with "--with-included-popt" option as was suggested in one of the threads. (I downloaded popt and installed it in /usr/local.) What am I doing wrong? Any help will be greatly appreciated. Doing ./configure -help indicates that the option --with-ldap has the default value of "yes" and the option --with-ldapsam has the default value of "no." So I downloaded the precompiled version of Samba 3.0.2a from www.sunfreeware.com to take advantage of the defaults but when I configure it for LDAP and try to start it, the smbd and nmbd logs say that ldap server and ldap ports are unknown parameters. Any suggestions? Khalid Alvi
Hi Khalid, I've been looking at some possible configurations with Samba on Solaris and SunONE Directory server for some time so I'll tell you what I know. Firstly are you aware that currently Samba does not work with Sun's libLDAP libraries? You must install openLDAP libraries in order to get any LDAP/AD functionality working on Solaris. This may be why your compile is failing. Secondly I know that having both Sun and OpenLDAP libraries can cause some conflicts, to the extent I am not currently using LDAP as a backend for anything on my Solarirs Samba machines. I have raised the problem with Sun UK and I know this issue is also raised with Sun Germany, who have apparently identified a problem but are yet to confirm whether they will fix it. Sorry I don't have anything more helpful to contribute but just thought I should warn you. Incidentally there is no issues I'm aware of between SunONE DS and Samba, only the LDAP libraries found on Solaris machines... thanks Andy. I have been trying to compile Samba 3.0.4 on a SunFire v880 running Solaris 9 but "make" generates a fatal error. My goal is to get Samba compiled with the "--with-ldapsam" option so that I can use SunOne Directory Server 5.2 as the back-end repository for user authentication. I have gcc version 3.3.2 installed in /usr/local/bin/gcc which I have used to successfully compile other applications. This is one of my ./configure attempts: # ./configure --prefix=/usr/local/samba-3.0.4 --with-ldapsam --with-ldap \> --with-quotasUsing libraries: LIBS = -lsendfile -lsec -lgen -lresolv -lsocket -lnsl -ldl LDAP_LIBS = -lldap -llber AUTH_LIBS checking configure summary... yes configure: creating ./config.status config.status: creating include/stamp-h config.status: creating Makefile config.status: creating script/findsmb config.status: creating smbadduser config.status: creating script/gen-8bit-gap.sh config.status: creating include/config.h # make Using FLAGS = -O -Iinclude -I/sysadmin/samba/samba-3.0.4/source/include -I/sys admin/samba/samba-3.0.4/source/ubiqx -I/sysadmin/samba/samba-3.0.4/source/smbwra pper -I. -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/sysadmin/samba/samba-3.0 .4/source LIBS = -lsendfile -lsec -lgen -lresolv -lsocket -lnsl -ldl LDSHFLAGS = -G LDFLAGS Compiling dynconfig.c In file included from include/includes.h:891, from dynconfig.c:21: include/proto.h:589: error: parse error before "LDAP_CONST" *** Error code 1 make: Fatal error: Command failed for target `dynconfig.o' I have tried various options with configure but they all generate the same exact error. My attempts includes running ./configure with no options at all and with "--with-included-popt" option as was suggested in one of the threads. (I downloaded popt and installed it in /usr/local.) What am I doing wrong? Any help will be greatly appreciated. Doing ./configure -help indicates that the option --with-ldap has the default value of "yes" and the option --with-ldapsam has the default value of "no." So I downloaded the precompiled version of Samba 3.0.2a from www.sunfreeware.com to take advantage of the defaults but when I configure it for LDAP and try to start it, the smbd and nmbd logs say that ldap server and ldap ports are unknown parameters. Any suggestions? Khalid Alvi -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
> >I have been trying to compile Samba 3.0.4 on a SunFire v880 running Solaris >9 but "make" generates a fatal error. My goal is to get Samba compiled >with the "--with-ldapsam" option so that I can use SunOne Directory Server >5.2 as the back-end repository for user authentication. I have gcc version >3.3.2 installed in /usr/local/bin/gcc which I have used to successfully >compile other applications. >I tripped over something similar to this on the same hardware and O/S (although it's nothig to do with the hardware, Ibelieve). THe problem is proably that "./configure" has found the Solaris supplied LDAP which simply isn't good enough for Samba. Here's my notes on how I solved it:- 26-Apr-2004 Compiling OpenLDAP-2.1.30 from www.openldap.org needed:- setenv CC gcc ./configure --prefix=/usr/local/openldap/2.1.30 --disable-slapd make depend make set path = ( $path /usr/local/gcc/bin ) setenv LDFLAGS '-L /usr/local/openldap/2.1.30/lib' setenv CFLAGS '-I /usr/local/openldap/2.1.30/include' ./configure --exec-prefix=/usr/local/samba/3.0.2a \ --mandir=/usr/local/samba/3.0.2a/man \ --with-configdir=/usr/local/samba/etc \ --with-codepagedir=/usr/local/samba/share \ --with-ads I was trying to get AD support to work, but I think your problem and mine are both LDAP based. One thing I did then note, was that I had to set:- LD_LIBRARY_PATH to have "/usr/local/openldap/2.1.30/lib" in it, or all the Samba programs fell over with an 'ld.so' error on startup. I stuck this in the init.d/samba script for autostart and in my .cshrc and/or .profile to get it to work interactively. Hope this helps, Mac Assistant Systems Adminstrator @nibsc.ac.uk dmccann@nibsc.ac.uk Work: +44 1707 641565 Everything else: +44 7956 237670 (anytime)