Why do I get linker errors building Apache and PHP with ODBC-ODBC Bridge
There are generally two reasons for linker failures when building Apache and PHP with the Easysoft ODBC-ODBC Bridge.
- You have installed a
libc5
-based ODBC-ODBC Bridge on aglibc
-based Linux machine. (Or vice versa.)A typical result of this when building Apache is:
Creating Configuration.apaci in src ld: warning: libm.so.5, needed by
/usr/local/easysoft/oob/client/lib/libesoobclient.so, may conflict with libm.so.6 /usr/i486-linux-libc5/lib/libm.so.5: warning: erfcl is not implemented and will always fail /usr/i486-linux-libc5/lib/libm.so.5: warning: erfl is not implemented and will always fail /usr/i486-linux-libc5/lib/libm.so.5: undefined reference to `__getfpucw' make: *** [dummy] Error 1This output resulted from building Apache on a
glibc
-based system with thelibc5
version of ODBC-ODBC Bridge. -
The linker doesn't know how to find the ODBC-ODBC Bridge client shared object.
Refer to the
Apache_PHP
document in thedocs
directory of the ODBC-ODBC Bridge distribution carefully. Pay particular attention to the:--with-custom-odbc
PHP setting.CUSTOM_ODBC_LIBS
PHP setting. The example log in theApache_PHP
file shows one command line split over multiple lines. Make sure you enter this all as one line.-
LDFLAGS
when configuring Apache. If you don't setLDFLAGS
as described in theApache_PHP
document, you'll get an error during configuration similar to:/usr/bin/ld: cannot open -lesoobclient: No such file or directory collect2: ld returned 1 exit status make: *** [dummy] Error 1
libesoobclient.so
shared object path in/etc/ld.so.conf
. Runldconfig
so that the linker rereads this file.