php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24899 errors compiling whith sybase
Submitted: 2003-08-01 02:34 UTC Modified: 2003-08-05 11:09 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: ejantos at yahoo dot com Assigned:
Status: Closed Package: Sybase (dblib) related
PHP Version: 4.3.2 OS: redhat 9.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ejantos at yahoo dot com
New email:
PHP Version: OS:

 

 [2003-08-01 02:34 UTC] ejantos at yahoo dot com
Description:
------------
Hello,

i'm trying to install php with sybase but i always get 
errors. what should i do?

thanks in advance.
tomio

when i compile it i get this errors:

/opt/sybase-11.9.2/lib/libsybdb.so: undefined reference to `__ctype_b'
/opt/sybase-11.9.2/lib/libsybdb.so: undefined reference to `__ctype_tolower'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1


my configuration:
./configure \
 --prefix=/usr/local/apache/httpd_1.3.28/php4 \
 --with-apxs=/usr/local/apache/httpd_1.3.28/bin/apxs \
 --disable-debug --enable-tracks-vars --enable-libgcc --enable-EAPI --enable-bcmath \
 --with-tsrm-pthreads --enable-calendar --enable-ccvs --enable-cdb --enable-cpdflib --enable-ctype \
 --enable-curl --enable-dba=shared --enable-dbase --enable-dbx --enable-dom --enable-exif --enable-ftp \
 --enable-gd --enable-gdbm --enable-gettext --enable-hyperwave --enable-icap --enable-imap --enable-imap-ssl \
 --enable-jpeg-dir --enable-kerberos --enable-mailparse --enable-magic-quotes --enable-mbstring \
 --enable-mcal --enable-mcrypt --enable-mhash --enable-pdflib \
 --enable-shmop --enable-sigchild --enable-snmp --enable-sysvsem --enable-sysvshm \
 --with-pgsql=/usr \
 --enable-tiff-dir --enable-trans-sid --enable-ttf --enable-unixODBC --enable-wddx \
 --with-gmp --with-mysql=/usr \
 --with-openssl=/usr --with-xml --enable-t1lib --with-t1lib=/usr/local --with-jpeg-dir=/usr/local \
 --with-gd=/usr/local --enable-gd-native-ttf --enable-gd-imgstrttf \
 --with-freetype-dir=/usr/local \
 --enable-xpm --with-xpm-dir=/usr/X11R6 \
 --with-png-dir=/usr/local --enable-png \
 --enable-zlib --with-zlib-dir=/usr --enable-sockets \
 --with-mm=/usr/local --with-bz2\
 --enable-mbstr-enc-trans --enable-mbstring --enable-dbx --enable-dio \
 --with-sybase=/opt/sybase-11.9.2



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-04 08:24 UTC] sniper@php.net
What does this output:

# ldd /opt/sybase-11.9.2/lib/libsybdb.so

Is /opt/sybase-11.9.2/lib/ in your /etc/ld.so.conf ??

 [2003-08-04 08:32 UTC] sniper@php.net
Also, remove these from your configure line:

--enable-tracks-vars (does not exist)
--enable-libgcc (not needed)
--enable-EAPI (automatic)
--with-tsrm-pthreads (detected)

And lot of those --enable-* options you have do NOT exist,
read the "./configure --help" to see what really exists and how the options are supposed to be used.

 [2003-08-04 08:59 UTC] ejantos at yahoo dot com
What does this output:
># ldd /opt/sybase-11.9.2/lib/libsybdb.so
 statically linked

>Is /opt/sybase-11.9.2/lib/ in your /etc/ld.so.conf ??
yes. it is there.


tomio
 [2003-08-04 09:07 UTC] ejantos at yahoo dot com
i tryied to use php4-STABLE-200308041330 and i got another 
error messages:


/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c: In function `php_sybase_do_connect':
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:395: request for member `value' in something not a structure or union
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c: In function `zif_sybase_select_db':
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:657: invalid type argument of `unary *'
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c: In function `zif_sybase_free_result':
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:954: parse error before "if"
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c: At top level:
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:955: parse error before "return"
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:957: `sybase_result_index' undeclared here (not in a function)
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:957: `type' undeclared here (not in a function)
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:957: warning: initialization makes integer from pointer without a cast
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:957: initializer element is not constant
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:957: warning: data definition has no type or storage class
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:959: parse error before "if"
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:961: parse error before '->' token
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:963: parse error before '(' token
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:964: parse error before '->' token
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c: In function `zif_sybase_result':
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:1326: request for member `value' in something not a structure or union
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c: In function `zif_sybase_affected_rows':
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:1370: invalid type argument of `->'
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:1370: invalid type argument of `->'
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:1370: incompatible types in initialization
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:1370: incompatible types in assignment
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:1370: invalid type argument of `unary *'
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:1370: incompatible type for argument 1 of `_zval_copy_ctor'
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:1370: invalid type argument of `->'
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:1370: invalid type argument of `->'
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:1370: incompatible type for argument 1 of `convert_to_long'
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308041330/ext/sybase/php_sybase_db.c:1371: invalid type argument of `unary *'
make: *** [ext/sybase/php_sybase_db.lo] Error 1
w


my configuartion:
./configure \
 --prefix=/usr/local/apache/httpd_1.3.28/php4 \
 --with-apxs=/usr/local/apache/httpd_1.3.28/bin/apxs \
 --disable-debug --enable-EAPI --enable-bcmath \
 --enable-calendar --enable-ccvs --enable-cdb --enable-cpdflib \
 --enable-dbase --enable-dbx --enable-dom --enable-exif --enable-ftp \
 --enable-dba \
 --enable-gd --enable-gettext --enable-hyperwave --enable-icap --enable-imap \
 --enable-jpeg-dir --enable-kerberos --enable-mailparse --enable-magic-quotes \
 --enable-mcal --enable-mcrypt --enable-mhash --enable-pdflib \
 --enable-shmop --enable-sigchild --enable-snmp --enable-sysvsem --enable-sysvshm \
 --with-pgsql=/usr \
 --enable-tiff-dir --enable-trans-sid --enable-ttf --enable-unixODBC --enable-wddx \
 --with-gmp --with-mysql=/usr \
  --with-xml --enable-t1lib --with-t1lib=/usr/local --with-jpeg-dir=/usr/local \
 --with-gd=/usr/local --enable-gd-native-ttf --enable-gd-imgstrttf \
 --with-freetype-dir=/usr/local \
 --enable-xpm --with-xpm-dir=/usr/X11R6 \
 --with-png-dir=/usr/local --enable-png \
 --enable-zlib --with-zlib-dir=/usr --enable-sockets \
 --with-mm=/usr/local --with-bz2 \
 --with-gdbm=/usr \
 --with-db4=/usr \
 --enable-mbstr-enc-trans --enable-mbstring --enable-dio \
 --with-openssl=/usr --enable-imap-ssl \
 --disable-ctype \
 --enable-curl \
 --with-tsrm-pthreads \
 --with-sybase=/opt/sybase-11.9.2
 [2003-08-04 09:34 UTC] ejantos at yahoo dot com
i compiled php-4.3.0 and again i got this same message with 
my configure flags:

opt/sybase-11.9.2/lib/libsybdb.so: undefined reference to `__ctype_b'
/opt/sybase-11.9.2/lib/libsybdb.so: undefined reference to `__ctype_tolower'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1



./configure \
 --prefix=/usr/local/apache/httpd_1.3.28/php4 \
 --with-apxs=/usr/local/apache/httpd_1.3.28/bin/apxs \
 --disable-debug --enable-EAPI --enable-bcmath \
 --enable-calendar \
 --enable-exif \
 --enable-gd --enable-gettext --enable-imap \
 --enable-jpeg-dir --enable-magic-quotes \
 --enable-mcal --enable-mcrypt --enable-mhash \
 --with-pgsql=/usr \
 --enable-trans-sid \
 --with-gmp --with-mysql=/usr \
 --enable-t1lib --with-t1lib=/usr/local --with-jpeg-dir=/usr/local \
 --with-gd=/usr/local --enable-gd-native-ttf --enable-gd-imgstrttf \
 --with-freetype-dir=/usr/local \
 --with-png-dir=/usr/local --enable-png \
 --enable-zlib --with-zlib-dir=/usr \
 --with-mm=/usr/local --with-bz2 \
 --enable-mbstr-enc-trans --enable-mbstring \
 --with-openssl=/usr --enable-imap-ssl \
 --with-sybase=/opt/sybase-11.9.2
 [2003-08-04 09:38 UTC] sniper@php.net
The compile failures should be fixed in CVS now. Should be in snapshot(s) in an hour from now.

 [2003-08-05 02:44 UTC] ejantos at yahoo dot com
Hallo,

i still have the same message when i use php4-STABLE-latest.tar.gz with tihis configuration:

./configure \
 --prefix=/usr/local/apache/httpd_1.3.28/php4 \
 --with-apxs=/usr/local/apache/httpd_1.3.28/bin/apxs \
 --enable-calendar \
 --enable-exif \
 --enable-gd \
 --with-pgsql=/usr \
 --enable-trans-sid \
 --with-gmp --with-mysql=/usr \
 --enable-t1lib --with-t1lib=/usr/local --with-jpeg-dir=/usr/local \
 --with-gd=/usr/local \
 --with-freetype-dir=/usr/local \
 --with-png-dir=/usr/local --enable-png \
 --enable-zlib --with-zlib-dir=/usr \
 --with-mm=/usr/local \
 --enable-mbstr-enc-trans --enable-mbstring \
 --with-openssl=/usr \
 --disable-cli \
 --with-sybase=/opt/sybase-11.9.2



/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308050530/ext/sybase/php_sybase_db.c: In function `zif_sybase_select_db':
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308050530/ext/sybase/php_sybase_db.c:655: invalid type argument of `->'
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308050530/ext/sybase/php_sybase_db.c:655: invalid type argument of `->'
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308050530/ext/sybase/php_sybase_db.c:655: incompatible types in initialization
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308050530/ext/sybase/php_sybase_db.c:655: incompatible types in assignment
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308050530/ext/sybase/php_sybase_db.c:655: invalid type argument of `unary *'
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308050530/ext/sybase/php_sybase_db.c:655: incompatible type for argument 1 of `_zval_copy_ctor'
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308050530/ext/sybase/php_sybase_db.c:655: invalid type argument of `->'
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308050530/ext/sybase/php_sybase_db.c:655: invalid type argument of `->'
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308050530/ext/sybase/php_sybase_db.c:655: incompatible type for argument 1 of `_convert_to_string'
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308050530/ext/sybase/php_sybase_db.c:657: invalid type argument of `unary *'
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308050530/ext/sybase/php_sybase_db.c: In function `zif_sybase_free_result':
/usr/local/jantos/CVSROOT/Webserver/apache/php4-STABLE-200308050530/ext/sybase/php_sybase_db.c:963: request for member `value' in something not a structure or union
make: *** [ext/sybase/php_sybase_db.lo] Error 1
 [2003-08-05 08:35 UTC] ejantos at yahoo dot com
hello,

thanks for your help. now php-4.3.2 works on my linux box 
redhat-9.0 with sybase-11.9.*.
i had to put this configure flag "--disable-cli". without 
this flag it doesn't work with sybase 11.9.*.


these are my configuration flags:



./configure \
 --prefix=/usr/local/apache/httpd_1.3.28/php4 \
 --with-apxs=/usr/local/apache/httpd_1.3.28/bin/apxs \
 --enable-EAPI \
 --enable-bcmath \
 --enable-calendar \
 --enable-exif \
 --enable-sigchild \
 --enable-trans-sid \
 --enable-gettext \
 --enable-magic-quotes \
 --enable-mcal \
 --enable-mcrypt \
 --enable-mhash \
 --enable-shmop \
 --enable-sysvsem \
 --enable-sysvshm \
 --with-gmp=/usr \
 --with-gd=/usr/local \
 --enable-gd \
 --enable-gd-native-ttf \
 --enable-gd-imgstrttf \
 --with-jpeg-dir=/usr/local \
 --enable-tiff-dir=/usr \
 --with-freetype-dir=/usr/local \
--with-t1lib=/usr/local \
 --with-xpm-dir=/usr/X11R6 \
 --with-png-dir=/usr/local \
 --with-zlib-dir=/usr \
 --with-zlib \
 --with-bz2=/usr \
 --with-mm=/usr/local \
 --enable-mbstring \
 --enable-mbstr-enc-trans \
 --enable-dio \
 --enable-mime-magic \
 --with-openssl=/usr \
 --enable-curl \
 --with-tsrm-pthreads \
 --enable-ftp \
 --enable-imap \
 --enable-imap-ssl \
 --enable-mailparse \
 --with-java=/usr/java/j2sdk \
 --with-dom-xslt=/usr \
 --with-dom-exslt=/usr \
 --with-dom=/usr \
 --with-expat-dir=/usr \
 --with-gnu-ld \
 --enable-dbase \
 --enable-dba \
 --enable-cdb \
 --enable-dbx \
 --with-pgsql=/usr \
 --with-mysql=/usr \
 --with-gdbm=/usr \
 --with-db4=/usr \
 --disable-ctype \
 --enable-libgcc \
 --enable-pdflib \
 --disable-cli \
 --with-sybase-ct=/opt/sybase-11.9.2


tomio
 [2003-08-05 11:09 UTC] sniper@php.net
Works fine with latest CVS. (I fixed the last compile errors)

 [2004-03-05 05:41 UTC] mandreiana at yahoo dot com
This still doesn't work with php 4.3.4, I get the same error.
Looked in ChangeLog-2003 for your fix, there's no entry for it (4 august).
There's an entry on 28 august, where php_sybase_ct.c was sync'ed with HEAD. Maybe this overwrote it?
 [2004-03-05 05:54 UTC] mandreiana at yahoo dot com
This is the same problem, with another solution
http://dbforums.com/t865269.html

(use older glibc). Is this php's fault?
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 07:01:28 2025 UTC