qiandutianxia
qiandutianxia

Reputation: 80

Compile and install php5.4, make: *** [libphp5.la] Error 1

I am trying to build PHP with the following build configuration:

./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-openssl --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr/include/libxml2/libxml --enable-xml  --enable-sockets --with-apxs2=/usr/local/httpd/bin/apxs --with-mcrypt  --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-bz2=/usr/bin/bzip2  --enable-maintainer-zts

and tnhen run make. At some point during the build process I get:

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

Some information about my system:

[root@localhost php-5.4.41]# rpm -qa|grep libxml
libxml2-devel-2.7.6-17.el6_6.1.x86_64
libxml2-2.7.6-17.el6_6.1.x86_64
[root@localhost php-5.4.41]# rpm -qa|grep  libtool
libtool-ltdl-devel-2.2.6-15.5.el6.x86_64
libtool-ltdl-2.2.6-15.5.el6.x86_64
libtool-2.2.6-15.5.el6.x86_64
[root@localhost php-5.4.41]# rpm -qa|grep bzip
bzip2-1.0.5-7.el6_0.x86_64
bzip2-libs-1.0.5-7.el6_0.x86_64

Can anyone help me?

Upvotes: 0

Views: 2056

Answers (1)

jcoppens
jcoppens

Reputation: 5440

This seems very much like trying to compile again a non-64 bit library. /usr/local/lib/libbz2.a does not seem to be the correct location for libbz2 (normally system libraries are installed in /usr/lib). How was it installed?

Upvotes: 2

Related Questions