Full_Name: Mimiko Version: 2.4.39 OS: Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3+deb7u2 x86_64 GNU/Linux URL: ftp://ftp.openldap.org/incoming/ Submission from: (NULL) (77.89.245.38)
Can not compile OpenLDAP statically. I get this error: configure:21678: checking for SQLDriverConnect in -lodbc configure:21703: cc -o conftest -fPIC -static-libgcc -static -fPIC -I/opt/openssl/include -I/opt/krb5/include -I/opt/zlib/include -Wl,-R,ORIGIN/../lib/../lib/../lib/../lib../lib:ORIGIN/../lib/x86_64-linux-gnu -L/opt/openssl/lib -L/opt/krb5/lib -L/opt/zlib/lib conftest.c -lodbc -pthread
&5
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libodbc.a(_odbcinst_UserINI.o): In function `_odbcinst_UserINI': (.text+0x3b): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libodbc.a(SQLCreateDataSource.o): In function `SQLCreateDataSource': (.text+0x301): undefined reference to `lt_dlinit' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libodbc.a(SQLCreateDataSource.o): In function `SQLCreateDataSource': (.text+0x315): undefined reference to `lt_dlsetsearchpath' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libodbc.a(SQLCreateDataSource.o): In function `SQLCreateDataSource': (.text+0x33d): undefined reference to `lt_dlopen' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libodbc.a(SQLCreateDataSource.o): In function `SQLCreateDataSource': (.text+0x355): undefined reference to `lt_dlsym' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libodbc.a(SQLCreateDataSource.o): In function `SQLCreateDataSource': (.text+0x3ee): undefined reference to `lt_dlopen' .... collect2: error: ld returned 1 exit status configure:21703: $? = 1
To resolve this I must supply LIBS='-lltdl -ldl', but ./configure script does not pass this correctly, as this LIBS must be after -lodbc. In configure line 21684 is the line: LIBS="-lodbc $LIBS" It seems that LIBS which I pass to ./configure script does not get there. So I modify ./configure like this: LIBS="-lodbc -lltdl -ldl $LIBS" Please update ./configure script in git to overcome this error without manually modifying script.