[Home]

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
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Hello,

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
unixODBC-2.2.11-1.RHEL4.1
unixODBC-devel-2.2.11-1.RHEL4.1
MyODBC-2.50.39-21.RHEL4.1

shell > rpm -ql unixODBC-devel

/usr/include/autotest.h
/usr/include/odbcinst.h
/usr/include/odbcinstext.h
/usr/include/sql.h
/usr/include/sqlext.h
/usr/include/sqltypes.h
/usr/include/sqlucode.h
/usr/include/uodbc_stats.h
/usr/lib64/libboundparam.a
/usr/lib64/libboundparam.so
/usr/lib64/libesoobS.a
/usr/lib64/libesoobS.so
/usr/lib64/libgtrtst.a
/usr/lib64/libgtrtst.so
/usr/lib64/libmimerS.a
/usr/lib64/libmimerS.so
/usr/lib64/libnn.a
/usr/lib64/libnn.so
/usr/lib64/libodbc.a
/usr/lib64/libodbccr.a
/usr/lib64/libodbccr.so
/usr/lib64/libodbcdrvcfg1S.a
/usr/lib64/libodbcdrvcfg1S.so
/usr/lib64/libodbcdrvcfg2S.a
/usr/lib64/libodbcdrvcfg2S.so
/usr/lib64/libodbcinst.a
/usr/lib64/libodbcinst.so
/usr/lib64/libodbcinstQ.a
/usr/lib64/libodbcminiS.a
/usr/lib64/libodbcminiS.so
/usr/lib64/libodbcmyS.a
/usr/lib64/libodbcnnS.a
/usr/lib64/libodbcnnS.so
/usr/lib64/libodbcpsql.a
/usr/lib64/libodbcpsqlS.a
/usr/lib64/libodbctxt.a
/usr/lib64/libodbctxt.so
/usr/lib64/libodbctxtS.a
/usr/lib64/libodbctxtS.so
/usr/lib64/liboplodbcS.a
/usr/lib64/liboplodbcS.so
/usr/lib64/liboraodbcS.a
/usr/lib64/liboraodbcS.so
/usr/lib64/libsapdbS.a
/usr/lib64/libsapdbS.so
/usr/lib64/libtdsS.a
/usr/lib64/libtdsS.so
/usr/lib64/libtemplate.a
/usr/lib64/libtemplate.so

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 ?

Regards
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

Hello,

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 :

http://rpm.pbone.net/index.php3/stat/4/idpl/3134424/com/unixODBC-devel-2.2.8-2.3.0.2.x86_64.rpm.html#content

- Fedora Core :

http://rpm.pbone.net/index.php3/stat/4/idpl/3419764/com/unixODBC-devel-2.2.11-7.1.x86_64.rpm.html#content

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
     libsuff=64
   fi
 fi

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

*-*-linux*)
 # 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
 ac_status=$?
 echo "$as_me:$LINENO: \$? = $ac_status" >&5
 (exit $ac_status); }; then
   case `/usr/bin/file conftest.$ac_objext` in
   *"ELF 32"*)
     LINUX_64_MODE="32"
     ;;
   *"ELF 64"*)
     LINUX_64_MODE="64"
     ;;
   esac
 fi

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.



Regards.

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.