Summary:ASTERISK-07993: 1.4 trunk with-odbc fails on RHEL4
Reporter:Eric Romang / DCLUX (eromang)Labels:
Date Opened:2006-10-24 10:01:09Date Closed:2011-06-07 14:03:26
Versions:Frequency of

I try to compil asterisk 1.4 trunk with --with-odbc option

My OS is RHEL4 ES.

UnixODBC is installed :

shell > rpm -qa | grep -i odbc

shell > rpm -ql unixODBC-devel


But when i run :

./configure --with-odbc

I got this error message :

checking for newt.h... yes
checking for SQLConnect in -lodbc... no
configure: ***
configure: *** The unixODBC installation on this system appears to be broken.
configure: *** without explicitly specifying --with-odbc

I i try :

./configure --with-odbc=/usr

the same error

etc. etc

What is the trouble ?

Comments:By: Russell Bryant (russell) 2006-10-25 14:42:20

The way configure scripts work is that it builds very small test programs and compiles and runs them.  If this is successful, the script has determined that the library is present and usable.  So, if your system has decided that libraries will live in /usr/lib64, then the system should also be set up such that /usr/lib64 is a default location to look for them.

To fix this issue, I would be willing to bet that you need to add a symlink from /usr/lib to point to /usr/lib64/.  In any case, this is not something that is an Asterisk configuration problem.

Good luck!

By: Eric Romang / DCLUX (eromang) 2006-10-26 03:05:30


I have compil asterisk 1.2 odbc support without troubles, until the odbc headers and files are into /usr/lib64.

You say to me to do a symlink on /usr/lib64 to /usr/lib .... but i have also librairies into /usr/lib, so the symlink is not possible.

Red Hat Entreprise Server 4 is a certified OS for enterprise. You will have the same troubles with people how run :

- Centos :


- Fedora Core :


You actually testing if the system is 64 bit processor but don't take care about /lib64 or /usr/lib64

Some example you could do :

if test "x$LINUX_64_MODE" = x64; then
   # Some platforms are per default 64-bit, so there's no /lib64
   if test -d /lib64; then

sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"

 # Test if the compiler is 64bit
 echo 'int i;' > conftest.$ac_ext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 (eval $ac_compile) 2>&5
 echo "$as_me:$LINENO: \$? = $ac_status" >&5
 (exit $ac_status); }; then
   case `/usr/bin/file conftest.$ac_objext` in
   *"ELF 32"*)
   *"ELF 64"*)

Don't say that the system should "set up such that /usr/lib64 is a default location to look for them." The configure script should detect on wich plateform  you are.

This is a bug into the asterisk configure script.


By: jmls (jmls) 2006-11-06 09:57:32.000-0600

russell, are you still convinced that this is a lib problem, not asterisk ?.
/me is trying to close out 1.4 bugs :)

By: Russell Bryant (russell) 2006-11-06 12:07:29.000-0600

No, this is something we need to address.  I just have not had time to do it, yet.

By: hristo (hristo) 2006-11-09 16:10:06.000-0600

I had similar problem on Fedora Core 5, installing libtool-ltdl-devel solves the problem. I guess this package is needed by the small odbc detection program.

By: Anthony LaMantia (alamantia) 2006-11-23 12:45:07.000-0600

from the configure.ac script,
AST_EXT_LIB_CHECK([UNIXODBC], [odbc], [SQLConnect], [sql.h], [-lltdl])
that would be the cause of our dependence on GNU ltdl for the ocbc code,

mabye we should write a patch that provides some better error information?

By: Jason Parker (jparker) 2006-12-22 10:46:22.000-0600

Can you show us the relevant parts of config.log after this happens?

By: Serge Vecher (serge-v) 2007-03-20 14:52:07

eromang: what's the status here?

By: Jason Parker (jparker) 2007-05-09 11:22:26

Closing.  No response from reporter in several months.  Also, I've seen other reports that installing libtool-ltdl-devel fixes this issue.