Click to See Complete Forum and Search --> : Error compiling PHP 4.1.0 with SYBASE


Anon
12-13-2001, 08:10 AM
Hello !

I set up a Linux Mandrake 8.1 on X86.
I want my box to connect to a NT Ms SQL Server

I've installed :
apache-manual-1.3.22-1.1mdk
apache-mod_perl-1.3.22_1.26-2.1mdk
apache-conf-1.3.22-1.1mdk
apache-modules-1.3.22-1.1mdk
apache-common-1.3.22-1.1mdk
apache-1.3.22-1.1mdk
For Sybase I installed :
sybase-openclient-11.1.1-3
sybase-common-11.9.2-3
I try to compile php 4.1.0 :
./configure <lot of options> --with-sybase=/opt/sybase-11.9.2

When I run make, I got after one minute :

Making all in .
make[1]: Entre dans le répertoire `/XXX/php-4.1.0'
/bin/sh /XXX/php-4.1.0/libtool --silent --mode=link gcc -I. -I/XXX/php-4.1.0/ -I/XXX/php-4.1.0/main -I/XXX/php-4.1.0 -I/XXX/php-4.1.0/Zend -I/XXX/php-4.1.0/ext/mysql/libmysql -I/opt/sybase-11.9.2/include -I/XXX/php-4.1.0/ext/xml/expat -I/hXXX/php-4.1.0/TSRM -g -O2 -o php -export-dynamic stub.lo libphp4.la
/usr/bin/ld: cannot find -lsybdb
collect2: ld returned 1 exit status



ldconfig -v returns me :
/opt/sybase-11.9.2/lib:
libsybdb.so -> libsybdb.so
libintl.so -> libintl.so
libinsck.so -> libinsck.so
libct.so -> libct.so
libcs.so -> libcs.so
libcomn.so -> libcomn.so
libsybtcl.so -> libsybtcl.so

I cant understand the reason why ld cannot find -lsybdb :(

Any idea ?

Anon
12-21-2001, 05:28 AM
I think you should use --with-sybase-ct=/opt/sybase-11.9.2 when you are compiling php. Havent tried 4.1.0 yet but with 4.0.6 this was the way to go.

Try it, may work.

Regards
//D

Anon
12-21-2001, 06:13 AM
I tried the option --with-sybase-ct instead of and with --with-sybase .

Result is the same : ld error (cannot find sybdb) ...

Anon
07-07-2002, 06:33 AM
Hi,

I had this exact problem with RedHat 7.3.

I copied the libsybdb.a and libsybdb.so files from /opt/sybase-11.9.2 to /usr/lib an it then worked fine.

Thanks
Brendan