From: sunadm at 21cn dot com Operating system: RedHat Linux 9 PHP version: 4.3.2 PHP Bug Type: Compile Failure Bug description: Compile failure with Sybase DB lib.
I have sybase-common-11.9.2 and sybase-openclient installed. These lib is used to access mssql server. Why not use FreeTDS? Because FreeTDS has some problem on multibyte char I/O. PHP configure options: ./configure \ --with-mysql=/usr \ --with-apache=../apache_1.3.27 \ --with-config-file-path=/etc/httpd \ --with-gd \ --enable-gd-native-ttf \ --with-ttf \ --with-gettext=/usr \ --enable-track-vars \ --enable-trans-sid \ --enable-inline-optimization \ --disable-debug \ --enable-ftp \ --with-zlib-dir=/usr \ --with-jpeg-dir=/usr \ --with-png-dir=/usr \ --with-freetype-dir=/usr \ --enable-mbstring \ --with-mbstring=cn \ --with-mbstring=tw \ --enable-mbregex \ --with-sybase=/opt/sybase-11.9.2 \ --with-iconv=/usr Configure is passed. Failure when I use these options to make: /bin/sh /usr/local/src/web/php-4.3.2/libtool --silent --preserve-dup-deps --mode=link gcc -export-dynamic -g -O2 -rdynamic -L/opt/sybase-11.9.2/lib -R /opt/sybase-11.9.2/lib ext/zlib/zlib.lo ext/zlib/zlib_fopen_wrapper.lo ext/ctype/ctype.lo ext/ftp/php_ftp.lo ext/ftp/ftp.lo ext/gd/gd.lo ext/gd/gdttf.lo ext/gd/libgd/gd.lo ext/gd/libgd/gd_gd.lo ext/gd/libgd/gd_gd2.lo ext/gd/libgd/gd_io.lo ext/gd/libgd/gd_io_dp.lo ext/gd/libgd/gd_io_file.lo ext/gd/libgd/gd_ss.lo ext/gd/libgd/gd_io_ss.lo ext/gd/libgd/gd_png.lo ext/gd/libgd/gd_jpeg.lo ext/gd/libgd/gdxpm.lo ext/gd/libgd/gdfontt.lo ext/gd/libgd/gdfonts.lo ext/gd/libgd/gdfontmb.lo ext/gd/libgd/gdfontl.lo ext/gd/libgd/gdfontg.lo ext/gd/libgd/gdtables.lo ext/gd/libgd/gdft.lo ext/gd/libgd/gdcache.lo ext/gd/libgd/gdkanji.lo ext/gd/libgd/wbmp.lo ext/gd/libgd/gd_wbmp.lo ext/gd/libgd/gdhelpers.lo ext/gd/libgd/gd_topal.lo ext/gd/libgd/gd_gif_in.lo ext/gd/libgd/xbm.lo ext/gettext/gettext.lo ext/iconv/iconv.lo ext/mbstring/mbfilter_ja.lo ext/mbstring/mbfilter_cn.lo ext/mbstring/mbfilter_tw.lo ext/mbstring/mbfilter_kr.lo ext/mbstring/mbfilter_ru.lo ext/mbstring/mbfilter.lo ext/mbstring/mbstring.lo ext/mbstring/mbregex.lo ext/mbstring/php_mbregex.lo ext/mbstring/html_entities.lo ext/mbstring/php_unicode.lo ext/mysql/php_mysql.lo ext/overload/overload.lo ext/pcre/pcrelib/maketables.lo ext/pcre/pcrelib/get.lo ext/pcre/pcrelib/study.lo ext/pcre/pcrelib/pcre.lo ext/pcre/php_pcre.lo ext/posix/posix.lo ext/session/session.lo ext/session/mod_files.lo ext/session/mod_mm.lo ext/session/mod_user.lo ext/standard/array.lo ext/standard/base64.lo ext/standard/basic_functions.lo ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo ext/standard/cyr_convert.lo ext/standard/datetime.lo ext/standard/dir.lo ext/standard/dl.lo ext/standard/dns.lo ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo ext/standard/flock_compat.lo ext/standard/formatted_print.lo ext/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo ext/standard/image.lo ext/standard/info.lo ext/standard/iptc.lo ext/standard/lcg.lo ext/standard/link.lo ext/standard/mail.lo ext/standard/math.lo ext/standard/md5.lo ext/standard/metaphone.lo ext/standard/microtime.lo ext/standard/pack.lo ext/standard/pageinfo.lo ext/standard/parsedate.lo ext/standard/quot_print.lo ext/standard/rand.lo ext/standard/reg.lo ext/standard/soundex.lo ext/standard/string.lo ext/standard/scanf.lo ext/standard/syslog.lo ext/standard/type.lo ext/standard/uniqid.lo ext/standard/url.lo ext/standard/url_scanner.lo ext/standard/var.lo ext/standard/versioning.lo ext/standard/assert.lo ext/standard/strnatcmp.lo ext/standard/levenshtein.lo ext/standard/incomplete_class.lo ext/standard/url_scanner_ex.lo ext/standard/ftp_fopen_wrapper.lo ext/standard/http_fopen_wrapper.lo ext/standard/php_fopen_wrapper.lo ext/standard/credits.lo ext/standard/css.lo ext/standard/var_unserializer.lo ext/standard/ftok.lo ext/standard/aggregation.lo ext/standard/sha1.lo ext/sybase/php_sybase_db.lo ext/tokenizer/tokenizer.lo ext/xml/xml.lo ext/xml/expat/xmlparse.lo ext/xml/expat/xmlrole.lo ext/xml/expat/xmltok.lo regex/regcomp.lo regex/regexec.lo regex/regerror.lo regex/regfree.lo TSRM/TSRM.lo TSRM/tsrm_strtok_r.lo TSRM/tsrm_virtual_cwd.lo main/main.lo main/snprintf.lo main/spprintf.lo main/php_sprintf.lo main/safe_mode.lo main/fopen_wrappers.lo main/alloca.lo main/php_scandir.lo main/php_ini.lo main/SAPI.lo main/rfc1867.lo main/php_content_types.lo main/strlcpy.lo main/strlcat.lo main/mergesort.lo main/reentrancy.lo main/php_variables.lo main/php_ticks.lo main/streams.lo main/network.lo main/php_open_temporary_file.lo main/php_logos.lo main/output.lo main/memory_streams.lo main/user_streams.lo Zend/zend_language_parser.lo Zend/zend_language_scanner.lo Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/zend_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_array.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo main/internal_functions_cli.lo -lcrypt -lsybdb -lcrypt -lmysqlclient -liconv -lfreetype -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lcrypt -lcrypt -o sapi/cli/php ext/sybase/php_sybase_db.o(.text+0x634): In function `php_sybase_do_connect': /usr/local/src/web/php-4.3.2/ext/sybase/php_sybase_db.c:491: undefined reference to `dbopen' ext/sybase/php_sybase_db.o(.text+0x70f):/usr/local/src/web/php-4.3.2/ext/sybase/php_sybase_db.c:453: undefined reference to `dbopen' ext/sybase/php_sybase_db.o(.text+0x895):/usr/local/src/web/php-4.3.2/ext/sybase/php_sybase_db.c:544: undefined reference to `dbopen' collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1 When use option 'sybase-ct', it is fails too. When I disable cli by using --disable-cli, configure and compile is passed. Then I change dir to Apache's source to compile it. Configure option list below: ./configure \ --prefix=/etc/httpd \ --activate-module=src/modules/php4/libphp4.a \ --enable-module=so \ --enable-module=rewrite \ --enable-module=include \ --sysconfdir=/etc/httpd Failure at: Configuring for Apache, Version 1.3.27 + using installation path layout: Apache (config.layout) + activated php4 module (modules/php4/libphp4.a) Creating Makefile Creating Configuration.apaci in src Creating Makefile in src + configured for Linux platform + setting C compiler to gcc + setting C pre-processor to gcc -E + checking for system header files + adding selected modules o rewrite_module uses ConfigStart/End + using -lgdbm for DBM support enabling DBM support for mod_rewrite o php4_module uses ConfigStart/End + using builtin Expat + using -ldl for vendor DSO support + checking sizeof various data types + doing sanity check on compiler and options ** A test compilation with your Makefile configuration ** failed. The below error output from the compilation ** test will give you an idea what is failing. Note that ** Apache requires an ANSI C Compiler, such as gcc. ======== Error Output for sanity check ======== cd ..; gcc -DLINUX=22 -I/usr/include/gdbm -DUSE_EXPAT -I./lib/expat-lite `./apaci` -o helpers/dummy helpers/dummy.c -Wl,-rpath,/opt/sybase-11.9.2/lib -rdynamic -L/opt/sybase-11.9.2/lib -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4 -rdynamic -L/opt/sybase-11.9.2/lib -lcrypt -lsybdb -lcrypt -lmysqlclient -liconv -lfreetype -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lcrypt -lcrypt -lm -lcrypt -lgdbm -ldl /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: *** [dummy] Error 1 ============= End of Error Report ============= Aborting! btw: ld.so.conf has the correct sybase lib path. -- Edit bug report at http://bugs.php.net/?id=23884&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23884&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23884&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23884&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23884&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23884&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23884&r=support Expected behavior: http://bugs.php.net/fix.php?id=23884&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23884&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23884&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23884&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23884&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23884&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23884&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23884&r=gnused