Issue 7891 - checking for SQLDriverConnect in -lodbc
Summary: checking for SQLDriverConnect in -lodbc
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: build (show other issues)
Version: 2.4.39
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-03 08:11 UTC by vbvbrj@gmail.com
Modified: 2014-10-23 07:28 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description vbvbrj@gmail.com 2014-07-03 08:11:51 UTC
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.
Comment 1 Quanah Gibson-Mount 2014-07-22 13:33:06 UTC
changed notes
changed state Open to Release
moved from Incoming to Build
Comment 2 OpenLDAP project 2014-10-23 07:28:28 UTC
fixed in master
fixed in RE25
fixed in RE24
Comment 3 Quanah Gibson-Mount 2014-10-23 07:28:28 UTC
changed notes
changed state Release to Closed