|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16100 SAPDB Compile Failure
Submitted: 2002-03-15 14:00 UTC Modified: 2002-08-13 01:00 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: enigma at turingstudio dot com Assigned:
Status: No Feedback Package: Compile Failure
PHP Version: 4.1.2 OS: RedHat 6.2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-03-15 14:00 UTC] enigma at turingstudio dot com
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 \

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 
make: *** [all-recursive] Error 1

/usr/bin/ld: cannot find -lsqlrte despite my having 
included the correct path(s) in


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 

root@core lib> ldconfig -v |grep sql => => =>

// 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.

    - 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.


    - quick and dirty: cp
    - edit php's ext/odbc/config.m4: delete the line
      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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-15 14:18 UTC] enigma at turingstudio dot com
Agh! Now configure does what it should (but I still can't 

I get a nice message:

|                       *** ATTENTION ***                            
| Something is likely to be messed up here, because the 
configure    |
| script was not able to detect a simple feature on your 
platform.   |
| This is often caused by incorrect configuration 
parameters. Please |
| see the file debug.log for error messages.                         
| If you are unable to fix this, send the file debug.log to 
the      |
| mailing list and include 
appropiate      |
| information about your setup.                                      

here is the debug.log:

CONFIGURE:   './configure' '--prefix=/usr/local/php4.mod' 
'--with-apache=../apache_1.3.23' '--enable-ftp' 
'--with-zlib' '--enable-bcmath' '--enable-calendar' 
'--with-jpeg-dir=/usr/lib' '--with-imlib=/usr/local/lib/' 
'--with-iconv=/usr/local/lib' '--with-tiff-dir=/usr/lib' 
'--with-dom=/usr/local/libxml2' '--enable-xslt' 
'--with-expat-dir=/usr/local/expat' '--enable-wddx' 
'--enable-memory-limit' '--with-mm=/usr/local/mm' 
CC:         gcc
CFLAGS:     -g -O2
-I$(top_builddir)/Zend -I/usr/local/curl/include 
-I/usr/local/libxml2/include/libxml2 -I/usr/local/include 
-I/usr/local/mcrypt/include -I/usr/local/mhash/include 
l -I/u01/oracle/product/8.1.6/rdbms/public 
-I/opt/sapdb/interfaces/odbc/incl  -I/usr/local/mm/include
LDFLAGS:     -Wl,-rpath,/usr/local/curl/lib 
-L/usr/local/curl/lib -Wl,-rpath,/usr/local/libxml2/lib 
-L/usr/local/libxml2/lib -Wl,-rpath,/usr/local/lib 
-L/usr/local/lib -Wl,-rpath,/usr/local/mcrypt/lib 
-L/usr/local/mcrypt/lib -Wl,-rpath,/usr/local/mhash/lib 
-Wl,-rpath,/usr/local/mm/lib -L/usr/local/mm/lib
LIBS:       -lmm -lsqlrte -lsqlod -lm -ldl -lmhash -lmcrypt 
-lltdl -liconv -lz -lxml2 -lcurl -ldl -lcrypto -lssl -lcurl 
-lz -lcrypt -lresolv -lm -ldl -lnsl  -lresolv -lcrypt 
SAPI:       apache
PHP_RPATHS:  /usr/local/curl/lib /usr/local/libxml2/lib 
/usr/local/lib /usr/local/mcrypt/lib /usr/local/mhash/lib 
/opt/sapdb/interfaces/odbc/lib /usr/local/mm/lib
uname -a:   Linux 2.2.16-3smp-hh #2 
SMP Wed Jan 24 10:07:49 PST 2001 i686 unknown

gcc -o conftest -g -O2   -Wl,-rpath,/usr/local/curl/lib 
-L/usr/local/curl/lib -Wl,-rpath,/usr/local/libxml2/lib 
-L/usr/local/libxml2/lib -Wl,-rpath,/usr/local/lib 
-L/usr/local/lib -Wl,-rpath,/usr/local/mcrypt/lib 
-L/usr/local/mcrypt/lib -Wl,-rpath,/usr/local/mhash/lib 
-Wl,-rpath,/usr/local/mm/lib -L/usr/local/mm/lib conftest.c 
-lmm -lsqlrte -lsqlod -lm -ldl -lmhash -lmcrypt -lltdl 
-liconv -lz -lxml2 -lcurl -ldl -lcrypto -lssl -lcurl -lz 
-lcrypt -lresolv -lm -ldl -lnsl  -lresolv -lcrypt -lclntsh 
/usr/bin/ld: cannot find -lsqlrte
collect2: ld returned 1 exit status
 [2002-06-30 01:48 UTC]
Please try this snapshot:

 [2002-08-13 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 20 00:01:03 2024 UTC