ID:               40335
 Comment by:       earlej at hotmail dot com
 Reported By:      earlej at hotmail dot copm
 Status:           Feedback
 Bug Type:         Compile Failure
 Operating System: RHEL4
 PHP Version:      4.4.4
 New Comment:

Yes.. for various reasons, we also cannot upgrade to 5.x.  Perhaps, one
day, time permitting, I will again be able to test the building of 5.x
on all our systems, but so far, we've found the 4.x series to be the
most (easily) compilable (via scripted operations) across our systems.


Previous Comments:
------------------------------------------------------------------------

[2007-02-05 15:40:00] shane at hemc dot coop

Is there a fix for the 4.4.4 version? I cannot upgrade to v5 quite
yet...please help.

------------------------------------------------------------------------

[2007-02-02 22:41:40] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip



------------------------------------------------------------------------

[2007-02-02 22:35:25] earlej at hotmail dot copm

Description:
------------
# export CFLAGS="-m64 -fPIC"
# gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.1.1/configure --prefix=/usr/local/gcc411
--quiet --enable-threads=posix --with-system-zlib
--enable-__cxa_atexit
--enable-languages=c,c++ --disable-multilib
--disable-libunwind-exceptions
Thread model: posix
gcc version 4.1.1

# ./configure (about as simple as it gets)
# make
...
ext/mysql/libmysql/my_tempnam.o: In function `my_tempnam':
my_tempnam.c:(.text+0x69): warning: the use of `tempnam' is dangerous,
better use `mkstemp'
main/output.o: In function `php_output_init_globals':
output.c:(.text+0x12): undefined reference to
`php_default_output_func'
output.c:(.text+0x23): undefined reference to
`php_default_output_func'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php] Error 1

If I try and build a DSO for Apache 1.3.37, using:

./configure \
--prefix=~/tools/php \
--with-xsl=~/tools/libxslt \             
--with-openssl=~/tools/openssl \             
--with-libxml-dir=~/tools/libxml2 \             
--with-zlib=~/tools/zlib \             
--without-xmlrpc \             
--without-bz2 \             
--with-mysql \             
--without-sqlite \             
--enable-force-cgi-redirect \             
--enable-memory-limit \             
--disable-pear \             
--disable-ipv6 \
--with-pgsql=/home/jonathan/sw/build/pgclient \
--with-apxs=~/tools/apache/bin/apxs

Then I receive:

/usr/local/gcc411/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/../../../../x86
_64-unknown-linux-gnu/bin/ld: main/output.lo: relocation R_X86_64_PC32
against `php_default_output_func' can not be used when making a shared
object; recompile with -fPIC
/usr/local/gcc411/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/../../../../x86
_64-unknown-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make: *** [libphp4.la] Error 1

Compile output shows main/output.c _is_built using -fPIC:

/bin/sh /home/jonathan/sw/build/php-4.4.4/libtool --silent
--preserve-dup-deps --mode=compile gcc  -Imain/
-I/home/jonathan/sw/vbuild/php-4.4.4/main/ -DPHP_ATOM_INC
-I/home/jonathan/sw/build/php-4.4.4/include
-I/home/jonathan/sw/build/php-4.4.4/main
-I/home/jonathan/sw/build/php-4.4.4
-I~/tools/openssl/include 
-I~/tools/zlib/include
-I/home/jonathan/sw/build/pgclient/
-I/home/jonathan/sw/build/php-4.4.4/ext/xml/expat
-I/home/jonathan/sw/build/php-4.4.4/TSRM
-I/home/jonathan/sw/build/php-4.4.4/Zend    -m64 -fPIC   -c
/home/jonathan/sw/build/php-4.4.4/main/output.c -o
main/output.lo

Expected result:
----------------
I would expect a properly built PHP instance.

Actual result:
--------------
Unless I use GCC 3.4.6 (the default on this system), I cannot build
PHP.

------------------------------------------------------------------------

[2007-02-02 22:32:28] earlej at hotmail dot copm

Description:
------------
# export CFLAGS="-m64 -fPIC"
# gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.1.1/configure --prefix=/usr/local/gcc411
--quiet --enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--enable-languages=c,c++ --disable-multilib
--disable-libunwind-exceptions
Thread model: posix
gcc version 4.1.1

# ./configure (about as simple as it gets)
# make
...
ext/mysql/libmysql/my_tempnam.o: In function `my_tempnam':
my_tempnam.c:(.text+0x69): warning: the use of `tempnam' is dangerous,
better use `mkstemp'
main/output.o: In function `php_output_init_globals':
output.c:(.text+0x12): undefined reference to
`php_default_output_func'
output.c:(.text+0x23): undefined reference to
`php_default_output_func'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php] Error 1

If I try and build a DSO for Apache 1.3.37, using:

./configure \
--prefix=~/tools/php \
--with-xsl=~/tools/libxslt \             
--with-openssl=~/tools/openssl \             
--with-libxml-dir=~/tools/libxml2 \             
--with-zlib=~/tools/zlib \             
--without-xmlrpc \             
--without-bz2 \             
--with-mysql \             
--without-sqlite \             
--enable-force-cgi-redirect \             
--enable-memory-limit \             
--disable-pear \             
--disable-ipv6 \
--with-pgsql=/home/jonathan/sw/build/pgclient \
--with-apxs=~/tools/apache/bin/apxs

Then I receive:

/usr/local/gcc411/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/../../../../x86_64-unknown-linux-gnu/bin/ld:
main/output.lo: relocation R_X86_64_PC32 against
`php_default_output_func' can not be used when making a shared object;
recompile with -fPIC
/usr/local/gcc411/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/../../../../x86_64-unknown-linux-gnu/bin/ld:
final link failed: Bad value
collect2: ld returned 1 exit status
make: *** [libphp4.la] Error 1

Compile output shows main/output.c _is_built using -fPIC:

/bin/sh /home/jonathan/sw/vdx_ostk/build/php-4.4.4/libtool --silent
--preserve-dup-deps --mode=compile gcc  -Imain/
-I/home/jonathan/sw/vdx_ostk/build/php-4.4.4/main/ -DPHP_ATOM_INC
-I/home/jonathan/sw/vdx_ostk/build/php-4.4.4/include
-I/home/jonathan/sw/vdx_ostk/build/php-4.4.4/main
-I/home/jonathan/sw/vdx_ostk/build/php-4.4.4
-I/root/vdxtools/openssl/include -I/root/vdxtools/zlib/include
-I/home/jonathan/sw/vdx_ostk/build/pgclient/
-I/home/jonathan/sw/vdx_ostk/build/php-4.4.4/ext/xml/expat
-I/home/jonathan/sw/vdx_ostk/build/php-4.4.4/TSRM
-I/home/jonathan/sw/vdx_ostk/build/php-4.4.4/Zend    -m64 -fPIC   -c
/home/jonathan/sw/vdx_ostk/build/php-4.4.4/main/output.c -o
main/output.lo

Expected result:
----------------
I would expect a properly built PHP instance.

Actual result:
--------------
Unless I use GCC 3.4.6 (the default on this system), I cannot build
PHP.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=40335&edit=1

Reply via email to