php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37427 relocation R_X86_64_32... recompile with -fPIC...
Submitted: 2006-05-13 04:10 UTC Modified: 2006-05-15 19:36 UTC
From: vktechnology at uk2 dot net Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.1.4 OS: fedora
Private report: No CVE-ID: None
 [2006-05-13 04:10 UTC] vktechnology at uk2 dot net
Description:
------------
Install PHP,,has eror after type make

Reproduce code:
---------------
./configure --prefix=/usr/local/php-5.1.4 --with-apxs2=/usr/local/apache2/bin/apxs --enable-ftp 

--with-mysql-dir=/usr/local/mysql-standard-5.0.21-linux-i686  --with-png-dir=/usr/local/libpng-

1.2.8-config --with-zlib-dir=/usr/local/zlib-1.2.2 --with-gd  --disable-libxml --disable-dom --

disable-simplexml --disable-xml --disable-pear  --disable-xmlreader  --disable-xmlwriter

Actual result:
--------------
**********
after type make

have this error

*************
/usr/bin/ld: /usr/local/lib/libz.a(compress.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-14 12:30 UTC] tony2001@php.net
And this is PHP problem because .... ?
 [2006-05-15 14:00 UTC] vktechnology at uk2 dot net
Because in PHP Makefile doesn't complatible with 64 Bits processor

64 Bits processor use "/usr/lib64"
instead of "/usr/local/lib"

***********************************
I found solution to fix this peoblem
now my problem is solved
***********************************

What i did is

after configure and open Makefile to edit Makefile

look example my configure
./configure --libdir=/usr/lib64 --prefix=/usr/local/php-5.1.4 --with-apxs2=/usr/local/apache2/bin/apxs --enable-ftp --with-mysql-dir=/usr/local/mysql --with-libxml-dir=/usr/local/libxml2-2.6.24 --with-png-dir=/usr/local/libpng-1.2.8-config --with-zlib-dir=/usr/local/zlib-1.2.3/ --with-gd --with-jpeg-dir=/usr/local/lib64/ --with-freetype-dir=/usr/local/freetype-2.2.1 

open Makefile
find for 
"/usr/local/lib"
and replace with "/usr/lib64"

*********
here this is code after replace
4 lines

EXTRA_LDFLAGS = -avoid-version -module -L/usr/lib64 -L/usr/local/zlib-1.2.3//lib
EXTRA_LDFLAGS_PROGRAM = -L/usr/lib64 -L/usr/local/zlib-1.2.3//lib
NATIVE_RPATHS = -Wl,-rpath,/usr/lib64 -Wl,-rpath,/usr/local/zlib-1.2.3//lib
PHP_LDFLAGS = -L/usr/lib64 -L/usr/local/zlib-1.2.3//lib
PHP_RPATHS = -R /usr/lib64 -R /usr/local/zlib-1.2.3//lib

********
type make
make install
..done...
 [2006-05-15 14:02 UTC] vktechnology at uk2 dot net
another problem..after configure with

The problem is fixed when using 
--with-mysql-dir=/usr/local/mysql

instead of 
--with-mysql=/usr/local/mysql
********************************
cannot fix,
after install will cannot connect to my sql by using PHP
you will see this error

"Fatal error: Call to undefined function mysql_connect() "

and looking in info.php
cannot see mysql...
 [2006-05-15 14:05 UTC] vktechnology at uk2 dot net
Sory missed type
if configure like this cannot fix problem
"--with-mysql-dir=/usr/local/mysql"

it can complie and make insall 
but after install 
and when use witj PHP it doesn't work

will see this error in php
"Fatal error: Call to undefined function mysql_connect() "
 [2006-05-15 14:18 UTC] tony2001@php.net
Did you try to use --with-libdir=lib64 option?
 [2006-05-15 17:00 UTC] vktechnology at uk2 dot net
Hello tony2001

Yes I use this lib64 option
./configure --libdir=/usr/lib64 ...

everything can past make and make install..
but after this cannot use mySQL..
i donlt know what to do now..

here my phpinfo

http://202.142.221.59/info.php

*********
this one i test to connect with mysql
http://202.142.221.59/config.php

I have this error

"Fatal error: Call to undefined function mysql_connect() "

****


I just have got new server for 2-3 days
Spec

Intel Dual Xeon 3.2GHz, Cach 2MB
Ram 4GB

If you would like to login SSH to my server to check and testing...I can give you root access...
 [2006-05-15 17:15 UTC] tony2001@php.net
>Yes I use this lib64 option --libdir=/usr/lib64

Please now try with --with-libdir=lib64 instead.
They are two _totally_ different options.
 [2006-05-15 17:52 UTC] vktechnology at uk2 dot net
I try with 
--with-libdir=lib64
got error 

and replace in Makefile
user/local/lib/ to /lib64
it ok
make 
make install
done..

********
problem still not solve

http://202.142.221.59/info.php
no mysql enable
***
http://202.142.221.59/config.php
Fatal error: Call to undefined function mysql_connect()
 [2006-05-15 17:58 UTC] vktechnology at uk2 dot net
I test both lib64 and /usr/lib64

is something to do with with mysql option ?

--with-mysql-dir=/usr/local/mysql 
can compile but cannot use after install

and 
--with-mysql=/usr/local/mysql 

cannot compile 
will see this eror
"Fatal error: Call to undefined function mysql_connect() "
 [2006-05-15 18:03 UTC] vktechnology at uk2 dot net
sorry i send wrong...

and if 
--with-mysql=/usr/local/mysql 

cannot compile 
will see this eror

"mysql configure failed. Please check config.log for more information."
 [2006-05-15 18:12 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 [2006-05-15 19:36 UTC] vktechnology at uk2 dot net
Do you know anywhere can i go ?
I can pay for support to get this working
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jun 15 22:01:36 2025 UTC