PHP 4.0 Bug #3596: ltlib.mk forces gcc for some components (pcre and others)
| From: | gerdts at cae dot wisc dot edu | Date: | Wed, 23 Feb 2000 23:31:56 +0000 |
| Subject: | PHP 4.0 Bug #3596: ltlib.mk forces gcc for some components (pcre and others) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-15915@lists.php.net to get a copy of this message | ||
From: gerdts@cae.wisc.edu
Operating system: Solaris 2.6, 7
PHP version: 4.0 Beta 4 Patch Level 1
PHP Bug Type: Compile Failure
Bug description: ltlib.mk forces gcc for some components (pcre and others)
env CC=cc ./configure && make
...
/bin/sh ../libtool --silent --mode=link cc -g -o libZend.la -ldb -lpam -ldl -ldl -lresolv
-lresolv -lm -lcrypt -lsocket -lnsl -lsocket zend-parser.lo zend_alloc.lo zend_compile.lo
zend_constants.lo zend_dynamic_array.lo zend_execute.lo zend_execute_API.lo zend_highlight.lo
zend_llist.lo zend_opcode.lo zend_operators.lo zend_ptr_stack.lo zend_stack.lo zend_variables.lo
zend.lo zend_API.lo zend_extensions.lo zend_hash.lo zend_list.lo zend_indent.lo
zend_builtin_functions.lo zend_sprintf.lo libZend_c.la
Making all in ext
Making all in db
gcc -DHAVE_CONFIG_H -I. -I/tmp/php-4.0b4pl1/ext/db -I../.. -I../../Zend -I/tmp/php-4.0b4pl1
-I/afs/engr.wisc.edu/src/gnu/include -I/afs/engr.wisc.edu/src/free/include
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -g -c db.c && touch db.lo
...
ild: (undefined symbol) __eprintf -- referenced in the text segment of .libs/libphp4.a(getopt.o)
*** Error code 5
make: Fatal error: Command failed for target `php'
Current working directory /tmp/php-4.0b4pl1
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Note that __eprintf comes from assert.h from egcs. In order to use __eprintf, one needs to link
against libgcc. Since the linking is being done with cc, not gcc, the libgcc is not linked by
default, and as such the missing symbol comes about.
Fix:
*** build/ltlib.mk.orig Wed Feb 23 17:31:09 2000
--- build/ltlib.mk Wed Feb 23 17:31:16 2000
***************
*** 30,33 ****
include $(topsrcdir)/build/library.mk
# CC = insure
! CC = gcc
--- 30,33 ----
include $(topsrcdir)/build/library.mk
# CC = insure
! # CC = gcc