Bug #17604 Updated: Apache 2/MySQL/PHP4/Sablotron Will not compile
| From: | kevin at kevinfries dot com | Date: | Tue, 18 Jun 2002 20:28:23 +0000 |
| Subject: | Bug #17604 Updated: Apache 2/MySQL/PHP4/Sablotron Will not compile | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-11182@lists.php.net to get a copy of this message | ||
ID: 17604
Updated by: kevin@kevinfries.com
Reported By: kevin@kevinfries.com
Status: Open
Bug Type: Compile Failure
Operating System: Solaris 8 IA
PHP Version: 4.2.1
New Comment:
OK, I think I know what you want now. I went into the
/tmp/php4-200206171200 directory and issued the following command:
/bin/sh libtool --silent --mode=link g++ -export-dynamic -DPHP_ATOM_INC
-I/tmp/php4-200206171200/include -I/tmp/php4-200206171200/main
-I/tmp/php4-200206171200 -I/usr/local/apache/include
-I/tmp/php4-200206171200/Zend -I/usr/local/mysql/include/mysql
-I/tmp/php4-200206171200/ext/xml/expat -I/usr/local/include
-D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
-I/tmp/php4-200206171200/TSRM -g -O2 -pthreads -DZTS -avoid-version
-module -L/usr/ucblib -L/usr/local/mysql/lib/mysql -L/usr/local/lib -R
/usr/ucblib -R /usr/local/mysql/lib/mysql -R /usr/local/lib
ext/ctype/ctype.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/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/var_unserializer.lo ext/standard/ftok.lo
ext/standard/aggregation.lo ext/tokenizer/tokenizer.lo ext/xml/xml.lo
ext/xml/expat/xmlparse.lo ext/xml/expat/xmlrole.lo
ext/xml/expat/xmltok.lo ext/xslt/xslt.lo ext/xslt/sablot.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_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 -lsablot -lexpat -lmysqlclient -lcrypt
-lresolv -lresolv -lresolv -lm -ldl -lsocket -lsocket -lcrypt -ldl -o
sapi/cli/php
What I got back was:
Undefined first referenced
symbol in file
libiconv /usr/local/lib/libsablot.so
libiconv_open /usr/local/lib/libsablot.so
libiconv_close /usr/local/lib/libsablot.so
ld: fatal: Symbol referencing errors. No output written to
sapi/cli/php
collect2: ld returned 1 exit status
So I went to verify libiconv and this is what I found:
bash-2.05# ls -l /usr/local/lib/libiconv*
-rw-r--r-- 1 root other 695 Jun 9 00:05
/usr/local/lib/libiconv.la
lrwxrwxrwx 1 root other 17 Jun 9 00:05
/usr/local/lib/libiconv.so -> libiconv.so.2.0.4
lrwxrwxrwx 1 root other 17 Jun 9 00:05
/usr/local/lib/libiconv.so.2 -> libiconv.so.2.0.4
-rwxr-xr-x 1 root other 900391 Jun 9 00:05
/usr/local/lib/libiconv.so.2.0.4
-rwxr-xr-x 1 root other 900792 Jun 9 00:05
/usr/local/lib/libiconv_plug.so
It seems to be that PHP can not find something that Sabcmd is able to
find just fine, and is in the same directory as the libsablot.so file.
Part of the command was:
-I/usr/local/include
so there is not excuse for not finding the link it was looking for.
Previous Comments:
------------------------------------------------------------------------
[2002-06-18 15:17:23] markonen@php.net
Right. I didn't mean that, though. Could you try the last
libtool line you pasted in your previous comment, but with
gcc replaced with g++?
The one that begins with:
/bin/sh libtool --silent --mode=link gcc -export-dynamic
...
and ends with all the errors.
------------------------------------------------------------------------
[2002-06-18 13:52:23] kevin@kevinfries.com
Sorry, had a migrain starting mid-day yesterday, so I was a little slow
to respond.
using the command:
CC=g++ ./configure --with-mysql=/usr/local/mysql --enable-xslt
--with-xslt-sablot --enable-track-vars --with-apxs2
or
CC=g++ LDFLAGS="-lgcc_s" ./configure --with-mysql=/usr/local/mysql
--enable-xslt --with-xslt-sablot --enable-track-vars --with-apxs2
Both get me:
checking base type of last arg to accept... socklen_t
checking return type of qsort... void
checking for mysql_close in -lmysqlclient... no
checking for mysql_errno in -lmysqlclient... no
configure: error: Try adding --with-zlib-dir=<DIR>. Please check
config.log for more information.
issuing the command: tail -20 config.log, gives me:
----------------------------------------------
configure:44593: checking for mysql_errno in -lmysqlclient
configure:44612: g++ -o conftest -g -O2 -pthreads
-D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
-L/usr/local/mysql/lib/mysql
-R/usr/ucblib -L/usr/ucblib conftest.c -lmysqlclient -lz
1>&5
Undefined first referenced
symbol in file
mysql_errno() /var/tmp//ccWDjo0O.o
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 44601 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_errno();
int main() {
mysql_errno()
; return 0; }
----------------------------------------------
However, when I issue the command:
CC=gcc LDFLAGS="-lgcc_s" ./configure --with-mysql=/usr/local/mysql
--enable-xslt --with-xslt-sablot --enable-track-vars --with-apxs2
the last think I see is:
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
| *** NOTE *** |
| The default for register_globals is now OFF! |
| |
| If your application relies on register_globals being ON, you |
| should explicitly set it to on in your php.ini file. |
| Note that you are strongly encouraged to read |
| http://www.php.net/manual/en/security.registerglobals.php
|
| about the implications of having register_globals set to on, and |
| avoid using it if possible. |
+--------------------------------------------------------------------+
Thank you for using PHP.
----------------------------------------------
This is like dancing in a mine field.
ever since upgrading my compiler from 3.01 to 3.1 the make keeps
putting the message:
cc1: warning: changing search order for system directory
"/usr/local/include"
cc1: warning: as it has already been specified as a non-system
directory
ever time it compiles a file. This is the only program to do this. I
even tried to recompile Sablotron, thinking that the libs changed with
the new compiler. Sabcmd still works fine just like before, and PHP
refuses to link to it.
Doing a make command, I takes quite a while and compiles many, many
files, but in the end, the message I get is:
cc1: warning: changing search order for system directory
"/usr/local/include"
cc1: warning: as it has already been specified as a non-system
directory
/bin/sh libtool --silent --mode=link gcc -export-dynamic -DPHP_ATOM_INC
-I/tmp/php4-200206171200/include -I/tmp/php4-200206171200/main
-I/tmp/php4-200206171200 -I/usr/local/apache/include
-I/tmp/php4-200206171200/Zend -I/usr/local/mysql/include/mysql
-I/tmp/php4-200206171200/ext/xml/expat -I/usr/local/include
-D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
-I/tmp/php4-200206171200/TSRM -g -O2 -pthreads -DZTS -avoid-version
-module -L/usr/ucblib -L/usr/local/mysql/lib/mysql -L/usr/local/lib -R
/usr/ucblib -R /usr/local/mysql/lib/mysql -R /usr/local/lib
ext/ctype/ctype.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/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/var_unserializer.lo ext/standard/ftok.lo
ext/standard/aggregation.lo ext/tokenizer/tokenizer.lo ext/xml/xml.lo
ext/xml/expat/xmlparse.lo ext/xml/expat/xmlrole.lo
ext/xml/expat/xmltok.lo ext/xslt/xslt.lo ext/xslt/sablot.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_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 -lsablot -lexpat -lmysqlclient -lcrypt
-lresolv -lresolv -lresolv -lm -ldl -lsocket -lsocket -lcrypt -ldl -o
sapi/cli/php
Undefined first referenced
symbol in file
libiconv /usr/local/lib/libsablot.so
vtable for __cxxabiv1::__si_class_type_info/usr/local/lib/libsablot.so
libiconv_open /usr/local/lib/libsablot.so
vtable for
__cxxabiv1::__vmi_class_type_info/usr/local/lib/libsablot.so
operator new[](unsigned) /usr/local/lib/libsablot.so
libiconv_close /usr/local/lib/libsablot.so
vtable for __cxxabiv1::__class_type_info/usr/local/lib/libsablot.so
operator delete(void*) /usr/local/lib/libsablot.so
operator new(unsigned) /usr/local/lib/libsablot.so
__gxx_personality_v0 /usr/local/lib/libsablot.so
operator delete[](void*) /usr/local/lib/libsablot.so
ld: fatal: Symbol referencing errors. No output written to
sapi/cli/php
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
------------------------------------------------------------------------
[2002-06-18 04:32:05] markonen@php.net
Kevin, could you try that last link again by hand,
substituting g++ for gcc?
I want to get this fixed on the PHP side, and there's no
way we can include stuff like libgcc_s by default.
------------------------------------------------------------------------
[2002-06-17 19:09:54] sniper@php.net
If you didn't try it yet, try adding --enable-libgcc to your configure
line (to be sure, use clean, fresh sources extracted from the latest
snapshot tarball)
And if that doesn't work, try that LDFLAGS="-lgcc_s"
--Jani
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/17604
--
Edit this bug report at http://bugs.php.net/?id=17604&edit=1