hi,all I want to build openldap on mingw and msys with back-sql, but the configure fails with following error message:
*checking sql.h usability... no checking sql.h presence... yes configure: WARNING: sql.h: present but cannot be compiled configure: WARNING: sql.h: check for missing prerequisite headers? configure: WARNING: sql.h: see the Autoconf documentation configure: WARNING: sql.h: section "Present But Cannot Be Compiled" configure: WARNING: sql.h: proceeding with the preprocessor's result configure: WARNING: sql.h: in the future, the compiler will take precedence configure: WARNING: ## --------------------------------------------- ## configure: WARNING: ## Report this to <**http://www.openldap.org/its/*http://www.openldap.org/its/ *> ## configure: WARNING: ## --------------------------------------------- ## checking for sql.h... yes checking sqlext.h usability... no checking sqlext.h presence... yes configure: WARNING: sqlext.h: present but cannot be compiled configure: WARNING: sqlext.h: check for missing prerequisite headers? configure: WARNING: sqlext.h: see the Autoconf documentation configure: WARNING: sqlext.h: section "Present But Cannot Be Compiled" configure: WARNING: sqlext.h: proceeding with the preprocessor's result configure: WARNING: sqlext.h: in the future, the compiler will take precedence configure: WARNING: ## --------------------------------------------- ## configure: WARNING: ## Report this to <**http://www.openldap.org/its/*http://www.openldap.org/its/ *> ## configure: WARNING: ## --------------------------------------------- ## checking for sqlext.h... yes checking for SQLDriverConnect in -liodbc... no checking for SQLDriverConnect in -lodbc... no configure: error: could not locate suitable ODBC library*
in mingw/lib there is libodbc32.a, I copied and renamed it as libodbc.a and checked it has 'SQLDriverConnect' function:
*$ nm libodbc32.a | grep SQLDriverConnect 00000000 I **__imp__SQLDriverConnectW@32* __imp__SQLDriverConnectW@32 *00000000 T **_SQLDriverConnectW@32* _SQLDriverConnectW@32 *00000000 I **__imp__SQLDriverConnectA@32* __imp__SQLDriverConnectA@32 *00000000 T **_SQLDriverConnectA@32* _SQLDriverConnectA@32 *00000000 I **__imp__SQLDriverConnect@32* __imp__SQLDriverConnect@32 *00000000 T **_SQLDriverConnect@32* _SQLDriverConnect@32
but configure still fails with above errors. could anyone help me ? any commets are appreciated.
Zhang William wrote:
but configure still fails with above errors. could anyone help me ? any commets are appreciated.
You should post the contents of config.log (or direct to a publicly accessible URL pointing to that file).
p.
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.n.c. Via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it ------------------------------------------ Office: +39.02.23998309 Mobile: +39.333.4963172 Email: pierangelo.masarati@sys-net.it ------------------------------------------
On 1/10/07, Pierangelo Masarati ando@sys-net.it wrote:
Zhang William wrote:
You should post the contents of config.log (or direct to a publicly accessible URL pointing to that file).
OK, I use openldap2.3.24: export CFLAGS="-g -I/c/cpp/lib-gcc/include -I/c/cpp/lib-gcc/include/bdb" LDFLAGS="-L/c/cpp/lib-gcc/lib -L/c/cpp/mingw/lib" CPPFLAGS="-g -I/c/cpp/lib-gcc/include/bdb"; ./configure --enable-hdb=no --enable-overlays --enable-sql --enable-meta --enable-ldap --enable-rewrite --enable-null --enable-shared=no
config.log:
On 1/11/07, Zhang William william.zzw@gmail.com wrote:
On 1/10/07, Pierangelo Masarati ando@sys-net.it wrote:
Zhang William wrote:
You should post the contents of config.log (or direct to a publicly accessible URL pointing to that file).
OK, I use openldap2.3.24: export CFLAGS="-g -I/c/cpp/lib-gcc/include -I/c/cpp/lib-gcc/include/bdb" LDFLAGS="-L/c/cpp/lib-gcc/lib -L/c/cpp/mingw/lib" CPPFLAGS="-g -I/c/cpp/lib-gcc/include/bdb"; ./configure --enable-hdb=no --enable-overlays --enable-sql --enable-meta --enable-ldap --enable-rewrite --enable-null --enable-shared=no
config.log:
I found that the error is for the lack of some basic types which is defined in windows.h, so I edited configure as:
line: 1414 cat >>confdefs.h <<_ACEOF #ifdef MINGW #include <windows.h> #endif //zzw: mingw need this ? #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF
line: 6689 #ifndef MINGW char SQLDriverConnect (); //zzw: mingw dont accept this ? #else #include <sqlext.h> #endif int main () { #ifndef MINGW SQLDriverConnect (); #else SQLDriverConnect(0,0,0,0,0,0,0,0); #endif
and add "-DMINGW" in CFLAGS. in makefile of slapd, add "-lRpcrt4" in AC_LIBS.
And make OK, but not very sure it can run with sql backend successfully.
openldap-software@openldap.org