Does anyone have at least an outline of what it takes to successfully compile OpenLDAP for the Win32 platform?
Thanks!
Joe
Joe Flowers wrote:
Does anyone have at least an outline of what it takes to successfully compile OpenLDAP for the Win32 platform?
Use MSYS, type "configure" and "make". No different from any other platform.
Of course you also need to build BerkeleyDB, Cyrus SASL, OpenSSL, and a decent regex library first. I use Henry Spencer's regex.
Thanks!
Joe
.
Many many thanks Howard. I haven't dealt with the MSYS environment before but I gave it a stab yesterday and ran into a few errors/walls, but I'm going to hit it again hard today and hope I can get through. I didn't want to go too long without thanking you for the very helpful road map.
Joe
Howard Chu wrote:
Joe Flowers wrote:
Does anyone have at least an outline of what it takes to successfully compile OpenLDAP for the Win32 platform?
Use MSYS, type "configure" and "make". No different from any other platform.
Of course you also need to build BerkeleyDB, Cyrus SASL, OpenSSL, and a decent regex library first. I use Henry Spencer's regex.
Thanks!
Joe
.
Can I get some more pointers on what I need to do regarding "Henry Spencer's regex", please?
"configure" within MSYS is failing at "configure: error: POSIX regex required."
Joe
------------------------------------------------------------------------------------ http://www.pell.portland.or.us/~orc/Code/bsd/bsd-current/00library/regex.h
checking sys/epoll.h usability... no checking sys/epoll.h presence... no checking for sys/epoll.h... no checking declaration of sys_errlist... yes checking for strerror... yes checking for strerror_r... no checking regex.h usability... no checking regex.h presence... no checking for regex.h... no configure: error: POSIX regex.h required.
Joe@CUSTOM ~/openldap-2.3.35 ------------------------------------------------------------------------------------ http://search.cpan.org/src/NI-S/Tk-804.027/pTk/mTk/tclGeneric/regex.h
checking regex.h usability... no checking regex.h presence... yes configure: WARNING: regex.h: present but cannot be compiled configure: WARNING: regex.h: check for missing prerequisite headers? configure: WARNING: regex.h: see the Autoconf documentation configure: WARNING: regex.h: section "Present But Cannot Be Compiled" configure: WARNING: regex.h: proceeding with the preprocessor's result configure: WARNING: regex.h: in the future, the compiler will take precedence configure: WARNING: ## --------------------------------------------- ## configure: WARNING: ## Report this to http://www.openldap.org/its/ ## configure: WARNING: ## --------------------------------------------- ## checking for regex.h... yes checking for library containing regfree... no configure: error: POSIX regex required.
------------------------------------------------------------------------------------
Howard Chu wrote:
Joe Flowers wrote:
Does anyone have at least an outline of what it takes to successfully compile OpenLDAP for the Win32 platform?
Use MSYS, type "configure" and "make". No different from any other platform.
Of course you also need to build BerkeleyDB, Cyrus SASL, OpenSSL, and a decent regex library first. I use Henry Spencer's regex.
Thanks!
Joe
.
Joe Flowers wrote:
Can I get some more pointers on what I need to do regarding "Henry Spencer's regex", please?
"configure" within MSYS is failing at "configure: error: POSIX regex required."
http://arglist.com/regex/rxspencer-alpha3.8.g3.tar.gz
Alright, I'm down to here now in MSYS:
"configure: error: BDB/HDB: BerkeleyDB not available"
http://www.oracle.com/technology/software/products/berkeley-db/index.html http://www.oracle.com/technology/software/products/berkeley-db/htdocs/popup/...
If I'm off base, please let me know, but the answer seems to be right around here somewhere.
Joe
... checking db.h usability... no checking db.h presence... yes configure: WARNING: db.h: present but cannot be compiled configure: WARNING: db.h: check for missing prerequisite headers? configure: WARNING: db.h: see the Autoconf documentation configure: WARNING: db.h: section "Present But Cannot Be Compiled" configure: WARNING: db.h: proceeding with the preprocessor's result configure: WARNING: db.h: in the future, the compiler will take precedence configure: WARNING: ## --------------------------------------------- ## configure: WARNING: ## Report this to http://www.openldap.org/its/ ## configure: WARNING: ## --------------------------------------------- ## checking for db.h... yes checking for Berkeley DB major version... 4 checking for Berkeley DB minor version... 5 checking for Berkeley DB link (-ldb45)... no checking for Berkeley DB link (-ldb-45)... no checking for Berkeley DB link (-ldb-4.5)... no checking for Berkeley DB link (-ldb-4-5)... no checking for Berkeley DB link (-ldb-4)... no checking for Berkeley DB link (-ldb4)... no checking for Berkeley DB link (-ldb)... no checking for Berkeley DB link (default)... no configure: error: BDB/HDB: BerkeleyDB not available
Joe@CUSTOM ~/openldap-2.3.35 $
On 5/15/07, Joe Flowers flowers@social.chass.ncsu.edu wrote:
Alright, I'm down to here now in MSYS:
"configure: error: BDB/HDB: BerkeleyDB not available"
http://www.oracle.com/technology/software/products/berkeley-db/index.html http://www.oracle.com/technology/software/products/berkeley-db/htdocs/popup/...
If I'm off base, please let me know, but the answer seems to be right around here somewhere.
Joe
... checking db.h usability... no checking db.h presence... yes configure: WARNING: db.h: present but cannot be compiled configure: WARNING: db.h: check for missing prerequisite headers? configure: WARNING: db.h: see the Autoconf documentation configure: WARNING: db.h: section "Present But Cannot Be Compiled" configure: WARNING: db.h: proceeding with the preprocessor's result configure: WARNING: db.h: in the future, the compiler will take precedence configure: WARNING: ## --------------------------------------------- ## configure: WARNING: ## Report this to http://www.openldap.org/its/ ## configure: WARNING: ## --------------------------------------------- ## checking for db.h... yes checking for Berkeley DB major version... 4 checking for Berkeley DB minor version... 5 checking for Berkeley DB link (-ldb45)... no checking for Berkeley DB link (-ldb-45)... no checking for Berkeley DB link (-ldb-4.5)... no checking for Berkeley DB link (-ldb-4-5)... no checking for Berkeley DB link (-ldb-4)... no checking for Berkeley DB link (-ldb4)... no checking for Berkeley DB link (-ldb)... no checking for Berkeley DB link (default)... no configure: error: BDB/HDB: BerkeleyDB not available
Joe@CUSTOM ~/openldap-2.3.35
It looks like configure found the file db.h, which is human-readable and good for getting the version (like it did), but when it tried to link to the actual library (.so and .a in unix, .dll in windows?) (-ldb45 is the switch that's failing, which is the linking)
You'd specify that path with -L in gcc. Try adding this to your CFLAGS environment.
From man gcc:
-llibrary Use the library named library when linking.
The linker searches a standard list of directories for the library, which is actually a file named `liblibrary.a'. The linker then uses this file as if it had been specified precisely by name.
The directories searched include several standard sys- tem directories plus any that you specify with `-L'.
Hello all-
Well, I've made it much further after running into several more walls, but now I've run into this one.
Any ideas on how to get past this? It occurred while running "make" inside of MSYS on MS Windows XP.
"make[2]: *** [slapd.def] Error 2"
It may be related to the earlier error: "/bin/sh: -c: line 1: syntax error near unexpected token `;'"
Many thanks,
Joe
---------------------------------------------------------------------------------------------------------------------------- cd back-relay; make - --unix -w all make[3]: Entering directory `/home/Joe/openldap-2.3.35/servers/slapd/back-relay' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/home/Joe/openldap-2.3.35/servers/slapd/back-relay'
cd overlays; make - --unix -w static make[3]: Entering directory `/home/Joe/openldap-2.3.35/servers/slapd/overlays' make[3]: Nothing to be done for `static'. make[3]: Leaving directory `/home/Joe/openldap-2.3.35/servers/slapd/overlays' /bin/sh: -c: line 1: syntax error near unexpected token `;' /bin/sh: -c: line 1: `for i in ; do path=`expr "$i" : "-L(.*)"`; if test $? != 0; then continue; fi; paths="$paths $path"; done; objs=""; for i in main.o globals.o bconfig.o config.o daemon.o connection.o search.o filter.o add.o cr.o attr.o entry.o backend.o backends.o result.o operation.o dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o value.o ava.o bind.o unbind.o abandon.o filterentry.o phonetic.o acl.o str2filter.o aclparse.o init.o user.o repl.o lock.o controls.o extended.o kerberos.o passwd.o schema.o schema_check.o schema_init.o schema_prep.o schemaparse.o ad.o at.o mr.o syntax.o oc.o saslauthz.o oidm.o starttls.o index.o sets.o referral.o root_dse.o sasl.o module.o mra.o mods.o sl_malloc.o zn_malloc.o limits.o operational.o matchedValues.o cancel.o syncrepl.o backglue.o backover.o ctxcsn.o ldapsync.o frontend.o slapadd.o slapcat.o slapcommon.o slapdn.o slapindex.o slappasswd.o slaptest.o slapauth.o slapacl.o component.o aci.o alock.o nt_svc.o ../../libraries/liblutil/slapdmsg.res version.o libbackends.a liboverlays.a ../../libraries/liblunicode/liblunicode.a ../../libraries/librewrite/librewrite.a ../../libraries/liblutil/liblutil.a ../../libraries/libldap_r/libldap_r.la ../../libraries/liblber/liblber.la -lrpcrt4 -ldb-4.5 -lregex -lws2_32 ; do obj="" ; case $i in -l*) done="" ; base=`expr "$i" : "-l(.*)"`; for p in $paths ; do for ext in la dll dll.a a ; do path=$p/lib$base.$ext; test ! -f $path && continue; if test $ext = la ; then for t in dlname old_library ; do line=`grep "^$t=" $path`; lib=`expr "$line" : "[^']*'(.*)'"`; test -n "$lib" && test -f $p/$lib && path=$p/$lib && break; done; test $t = dlname && ext=dll; test $t = old_library && ext=a; fi; if test $ext = a ; then obj=$path; fi; done=done; break; done; test -n "$done" && break; done; test -z "$obj" && continue; ;; *.la) if test -n "-static"; then base=`expr "$i" : ".*/(.*).la"`; path=`expr "$i" : "(.*/).*"`; obj=$path.libs/$base.a; fi; ;; *.dll.a) ;; *.o | *.a) obj=$i; esac; objs="$objs $obj"; done; echo dlltool --exclude-symbols main,ServiceMain@8 --export-all-symbols --output-def slapd.def.tmp $objs; dlltool --exclude-symbols main,ServiceMain@8 --export-all-symbols --output-def slapd.def.tmp $objs;' make[2]: *** [slapd.def] Error 2 make[2]: Leaving directory `/home/Joe/openldap-2.3.35/servers/slapd' make[1]: *** [all-common] Error 1 make[1]: Leaving directory `/home/Joe/openldap-2.3.35/servers' make: *** [all-common] Error 1
mae@JLF /home/Joe/openldap-2.3.35 $ ----------------------------------------------------------------------------------------------------------------------------
Hello again,
Anybody have an example/sample of a typical slapd.def file I can look at, please? My MSYS build apparently did not create one automatically and it failed because slapd.def did not exist. I did a "touch slapd.def" and it seemed to build to the finish, but it's hard to believe this is correct.
Thanks.
Joe -------------------------------------------------
Joe Flowers wrote:
Hello all-
Well, I've made it much further after running into several more walls, but now I've run into this one.
Any ideas on how to get past this? It occurred while running "make" inside of MSYS on MS Windows XP.
"make[2]: *** [slapd.def] Error 2"
It may be related to the earlier error: "/bin/sh: -c: line 1: syntax error near unexpected token `;'"
Many thanks,
Joe
mae@JLF /home/Joe/openldap-2.3.35 $ make ........... cd back-relay; make - --unix -w all make[3]: Entering directory `/home/Joe/openldap-2.3.35/servers/slapd/back-relay' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/home/Joe/openldap-2.3.35/servers/slapd/back-relay'
cd overlays; make - --unix -w static make[3]: Entering directory `/home/Joe/openldap-2.3.35/servers/slapd/overlays' make[3]: Nothing to be done for `static'. make[3]: Leaving directory `/home/Joe/openldap-2.3.35/servers/slapd/overlays' /bin/sh: -c: line 1: syntax error near unexpected token `;' /bin/sh: -c: line 1: `for i in ; do path=`expr "$i" : "-L(.*)"`; if test $? != 0; then continue; fi; paths="$paths $path"; done; objs=""; for i in main.o globals.o bconfig.o config.o daemon.o connection.o search.o filter.o add.o cr.o attr.o entry.o backend.o backends.o result.o operation.o dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o value.o ava.o bind.o unbind.o abandon.o filterentry.o phonetic.o acl.o str2filter.o aclparse.o init.o user.o repl.o lock.o controls.o extended.o kerberos.o passwd.o schema.o schema_check.o schema_init.o schema_prep.o schemaparse.o ad.o at.o mr.o syntax.o oc.o saslauthz.o oidm.o starttls.o index.o sets.o referral.o root_dse.o sasl.o module.o mra.o mods.o sl_malloc.o zn_malloc.o limits.o operational.o matchedValues.o cancel.o syncrepl.o backglue.o backover.o ctxcsn.o ldapsync.o frontend.o slapadd.o slapcat.o slapcommon.o slapdn.o slapindex.o slappasswd.o slaptest.o slapauth.o slapacl.o component.o aci.o alock.o nt_svc.o ../../libraries/liblutil/slapdmsg.res version.o libbackends.a liboverlays.a ../../libraries/liblunicode/liblunicode.a ../../libraries/librewrite/librewrite.a ../../libraries/liblutil/liblutil.a ../../libraries/libldap_r/libldap_r.la ../../libraries/liblber/liblber.la -lrpcrt4 -ldb-4.5 -lregex -lws2_32 ; do obj="" ; case $i in -l*) done="" ; base=`expr "$i" : "-l(.*)"`; for p in $paths ; do for ext in la dll dll.a a ; do path=$p/lib$base.$ext; test ! -f $path && continue; if test $ext = la ; then for t in dlname old_library ; do line=`grep "^$t=" $path`; lib=`expr "$line" : "[^']*'(.*)'"`; test -n "$lib" && test -f $p/$lib && path=$p/$lib && break; done; test $t = dlname && ext=dll; test $t = old_library && ext=a; fi; if test $ext = a ; then obj=$path; fi; done=done; break; done; test -n "$done" && break; done; test -z "$obj" && continue; ;; *.la) if test -n "-static"; then base=`expr "$i" : ".*/(.*).la"`; path=`expr "$i" : "(.*/).*"`; obj=$path.libs/$base.a; fi; ;; *.dll.a) ;; *.o | *.a) obj=$i; esac; objs="$objs $obj"; done; echo dlltool --exclude-symbols main,ServiceMain@8 --export-all-symbols --output-def slapd.def.tmp $objs; dlltool --exclude-symbols main,ServiceMain@8 --export-all-symbols --output-def slapd.def.tmp $objs;' make[2]: *** [slapd.def] Error 2 make[2]: Leaving directory `/home/Joe/openldap-2.3.35/servers/slapd' make[1]: *** [all-common] Error 1 make[1]: Leaving directory `/home/Joe/openldap-2.3.35/servers' make: *** [all-common] Error 1
mae@JLF /home/Joe/openldap-2.3.35 $
Joe Flowers skrev, on 01-06-2007 17:53:
Anybody have an example/sample of a typical slapd.def file I can look at, please? My MSYS build apparently did not create one automatically and it failed because slapd.def did not exist. I did a "touch slapd.def" and it seemed to build to the finish, but it's hard to believe this is correct.
I don't use OpenLDAP on Windows, but decided on your behalf to google for slapd.def. The search brought up two answers, both of which could be relevant:
http://www.openldap.org/lists/openldap-software/200705/msg00273.html http://www.csie.ntu.edu.tw/~b92101/uclinux-dist/lib/libldap/servers/slapd/Ma...
Best,
--Tonni
openldap-software@openldap.org