Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 13th May 2006, 07:22
vktechnology vktechnology is offline
Junior Member
 
Join Date: May 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default install PHP...relocation R_X86_64_32... recompile with -fPIC...

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
Reply With Quote
Sponsored Links
  #2  
Old 13th May 2006, 13:24
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

Seems to be a problem with zlib. Maybe you should try to install the newest zlib (1.2.3) by hand and try again.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 13th May 2006, 14:39
vktechnology vktechnology is offline
Junior Member
 
Join Date: May 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Zlib is ok no problem...

<php>
[root@palungjit zlib-1.2.3]# ./configure
Checking for gcc...
Building static library libz.a version 1.2.3 with gcc.
Checking for unistd.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()
Checking for vsnprintf() in stdio.h... Yes.
Checking for return value of vsnprintf()... Yes.
Checking for errno.h... Yes.
Checking for mmap support... Yes.
[root@palungjit zlib-1.2.3]# make
gcc -O3 -DUSE_MMAP -c -o example.o example.c
gcc -O3 -DUSE_MMAP -c -o adler32.o adler32.c
gcc -O3 -DUSE_MMAP -c -o compress.o compress.c
gcc -O3 -DUSE_MMAP -c -o crc32.o crc32.c
gcc -O3 -DUSE_MMAP -c -o gzio.o gzio.c
gcc -O3 -DUSE_MMAP -c -o uncompr.o uncompr.c
gcc -O3 -DUSE_MMAP -c -o deflate.o deflate.c
gcc -O3 -DUSE_MMAP -c -o trees.o trees.c
gcc -O3 -DUSE_MMAP -c -o zutil.o zutil.c
gcc -O3 -DUSE_MMAP -c -o inflate.o inflate.c
gcc -O3 -DUSE_MMAP -c -o infback.o infback.c
gcc -O3 -DUSE_MMAP -c -o inftrees.o inftrees.c
gcc -O3 -DUSE_MMAP -c -o inffast.o inffast.c
ar rc libz.a adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o
gcc -O3 -DUSE_MMAP -o example example.o -L. libz.a
gcc -O3 -DUSE_MMAP -c -o minigzip.o minigzip.c
gcc -O3 -DUSE_MMAP -o minigzip minigzip.o -L. libz.a
[root@palungjit zlib-1.2.3]# make install
cp zlib.h zconf.h /usr/local/include
chmod 644 /usr/local/include/zlib.h /usr/local/include/zconf.h
cp libz.a /usr/local/lib
cd /usr/local/lib; chmod 755 libz.a
cd /usr/local/lib; if test -f libz.so.1.2.3; then \
rm -f libz.so libz.so.1; \
ln -s libz.so.1.2.3 libz.so; \
ln -s libz.so.1.2.3 libz.so.1; \
(ldconfig || true) >/dev/null 2>&1; \
fi
cp zlib.3 /usr/local/share/man/man3
chmod 644 /usr/local/share/man/man3/zlib.3
</php>
Reply With Quote
  #4  
Old 13th May 2006, 14:41
vktechnology vktechnology is offline
Junior Member
 
Join Date: May 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I use Fedora & Linux,
Intel 64 bit, 3.2 Ghz x 2
4GB Ram.

it is something with X64_X86...
but donlt know how to fix..
Reply With Quote
  #5  
Old 13th May 2006, 17:20
vktechnology vktechnology is offline
Junior Member
 
Join Date: May 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

falko you are right...
thank you

it is something with configure in Zlib


***************

This problem is solved

this is not PHP problem
it something to do with Zlib
----------------------------

I add this in to Make file in Zlib

CFLAGS=-fPIC
and save it

and configure Zlib again
by use this command

./configure --libdir=/usr/lib64

...........
it work now
Reply With Quote
  #6  
Old 14th May 2006, 17:50
vktechnology vktechnology is offline
Junior Member
 
Join Date: May 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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...
Reply With Quote
  #7  
Old 15th May 2006, 17:03
vktechnology vktechnology is offline
Junior Member
 
Join Date: May 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

--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 too...
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I get PHP to work after ISPConfig Install alvadore Installation/Configuration 22 30th March 2008 16:57
ISPConfig install error: The PHP binary coming with ISPConfig does not work... mlanglois Installation/Configuration 9 13th July 2006 15:56
Downgrade php5 to php4.4.2 llizards Installation/Configuration 4 14th March 2006 00:58
all my site go to /var/www/ Absolusteph Installation/Configuration 14 11th March 2006 22:27
Nasty time with PHP on the install dkhird Installation/Configuration 1 11th September 2005 14:09


All times are GMT +2. The time now is 14:49.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.