php.net |  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
Votes:1
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 \
        --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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

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      |
| php-install@lists.php.net mailing list and include 
appropiate      |
| information about your setup.                                      
|


here is the debug.log:

CONFIGURE:   './configure' '--prefix=/usr/local/php4.mod' 
'--with-config-file-path=/usr/local/apache/conf' 
'--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-oci8=/u01/oracle/product/8.1.6' 
'--with-sapdb=/opt/sapdb/interfaces/odbc' 
'--with-mhash=/usr/local/mhash' 
'--with-mcrypt=/usr/local/mcrypt' 
'--with-dom=/usr/local/libxml2' '--enable-xslt' 
'--with-xslt-sablot=/usr/local/Sablot' 
'--with-curl=/usr/local/curl' 
'--with-expat-dir=/usr/local/expat' '--enable-wddx' 
'--enable-memory-limit' '--with-mm=/usr/local/mm' 
'--enable-debug=no'
CC:         gcc
CFLAGS:     -g -O2
CPPFLAGS:   
CXX:        
CXXFLAGS:   
INCLUDES:    
-I/root/bc_install/packages/apache_1.3.23/src/include 
-I/root/bc_install/packages/apache_1.3.23/src/os/unix  
-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 
-I/root/bc_install/packages/php-4.1.2.mod/ext/mysql/libmysq
l -I/u01/oracle/product/8.1.6/rdbms/public 
-I/u01/oracle/product/8.1.6/rdbms/demo 
-I/u01/oracle/product/8.1.6/network/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 
-L/usr/local/mhash/lib 
-Wl,-rpath,/u01/oracle/product/8.1.6/lib 
-L/u01/oracle/product/8.1.6/lib 
-Wl,-rpath,/opt/sapdb/interfaces/odbc/lib 
-L/opt/sapdb/interfaces/odbc/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 
-lclntsh
DLIBS:      
SAPI:       apache
PHP_RPATHS:  /usr/local/curl/lib /usr/local/libxml2/lib 
/usr/local/lib /usr/local/mcrypt/lib /usr/local/mhash/lib 
/u01/oracle/product/8.1.6/lib 
/opt/sapdb/interfaces/odbc/lib /usr/local/mm/lib
uname -a:   Linux core.turingstudio.com 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 
-L/usr/local/mhash/lib 
-Wl,-rpath,/u01/oracle/product/8.1.6/lib 
-L/u01/oracle/product/8.1.6/lib 
-Wl,-rpath,/opt/sapdb/interfaces/odbc/lib 
-L/opt/sapdb/interfaces/odbc/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 
1>&5
/usr/bin/ld: cannot find -lsqlrte
collect2: ld returned 1 exit status
 [2002-06-30 01:48 UTC] sniper@php.net
Please try this snapshot:

http://snaps.php.net/php4-latest.tar.gz

 [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-2019 The PHP Group
All rights reserved.
Last updated: Fri Mar 22 14:01:26 2019 UTC