From: [EMAIL PROTECTED]
Operating system: RedHat 6.2
PHP version: 4.1.2
PHP Bug Type: Compile Failure
Bug description: SAPDB Compile Failure
I'm trying to compile PHP 4.1.1 on RH 6.2 w/SAPDB.
Configure line:
Note that I have a compile system set up, so the directory
vars below are available during compile:
./configure \
--prefix=${PHP_CGI_PREFIX_DIR} \
--with-config-file-path=${APACHE_PREFIX_DIR}/conf \
--enable-discard-path \
--disable-shared \
--enable-ftp \
--with-zlib \
--enable-bcmath \
--enable-calendar \
--with-imlib=/usr/local/lib/ \
--with-iconv=/usr/local/lib \
--with-jpeg-dir=/usr/lib \
--with-tiff-dir=/usr/lib \
--with-sapdb=/opt/sapdb/interfaces/odbc \
--with-oci8=${ORACLE_DIR} \
--with-mhash=${MHASH_PREFIX_DIR} \
--with-mcrypt=${MCRYPT_PREFIX_DIR} \
--with-dom=${LIBXML2_PREFIX_DIR} \
--enable-xslt --with-xslt-sablot=${SAB_PREFIX_DIR}
\
--with-curl=${CURL_PREFIX_DIR} \
--with-expat-dir=${EXPAT_PREFIX_DIR} \
--enable-wddx \
--enable-memory-limit \
--enable-debug=no
I use a shell include to set paths, thus the ${foo}
Configure is fine, make fails with:
/usr/bin/ld: cannot find -lsqlrte
collect2: ld returned 1 exit status
make[1]: *** [php] Error 1
make[1]: Leaving directory
`/root/bc_install/packages/php-4.1.1.cgi'
make: *** [all-recursive] Error 1
So...
/usr/bin/ld: cannot find -lsqlrte despite my having
included the correct path(s) in ld.so.conf:
/opt/sapdb/interfaces/odbc/lib
/opt/sapdb/depend/lib
and having run ldconfig...
I still get
/usr/bin/ld: cannot find -lsqlrte
------------------
So went looking for the lib:
root@core lib> ld -v |grep sql
/// i.e. no results from this search, which lists all known
libs
root@core lib> ldconfig -v |grep sql
libsqlod.so => libsqlod.so
libsqlrte.so => libsqlrte.so
libsqlcls.so => libsqlcls.so
// note that ldconfig _is_ tracking these libs. confusing
I have never seen an instance where ldconfig knows about
something ld doesn't.
---------------
I then got this mail from a guy at SAP:
I think, I've found the solution.
Facts:
- libsqlod is the driver
- libsqlrte is some lib of our runtime env
- libsqlrte is added to the libs in the configure file
Therefore, php wants to link with -lsqlrte which is
actually not necessary.
Solution:
- quick and dirty: cp libsqlod.so libsqlrte.so
- edit php's ext/odbc/config.m4: delete the line
"AC_ADD_LIBRARY(sqlrte)"
in the sapdb section. Then autoconf, configure, make
...
The problem is a remainder of the ancestor ADABAS.
Please tell me, whether it now works for you.
I will then inform the list about this.
Greetings Thomas
--
Edit bug report at http://bugs.php.net/?id=16100&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16100&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16100&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16100&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16100&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16100&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16100&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16100&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16100&r=submittedtwice