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 thelibc5version of ODBC-ODBC Bridge. -
The linker doesn't know how to find the ODBC-ODBC Bridge client shared object.
Refer to the
Apache_PHPdocument in thedocsdirectory of the ODBC-ODBC Bridge distribution carefully. Pay particular attention to the:--with-custom-odbcPHP setting.CUSTOM_ODBC_LIBSPHP setting. The example log in theApache_PHPfile shows one command line split over multiple lines. Make sure you enter this all as one line.-
LDFLAGSwhen configuring Apache. If you don't setLDFLAGSas described in theApache_PHPdocument, 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.soshared object path in/etc/ld.so.conf. Runldconfigso that the linker rereads this file.