0

I did everything right with the installation of all dependencies for Apache2 and PHP i think.

First I installed a clean Ubuntu 14.04 with all actual updates. Then I installed with "apt-get build-dep php5 apache2" the necessary dependencies.

After that I did following steps:

For the last dependencies:

apt-get install apache2 mysql-client mysql-server php5 libapache2-mod-php5 libxml2-dev libcurl4-openssl-dev libbz2-dev libjpeg-dev libpng-dev libfreetype6-dev libtidy-dev libxslt-dev libmcrypt-dev php5-gd php5-curl libc-client2007e-dev

ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a 

(that the compile process find the libc-client.a file)

Finally started the compile process from the php-5.6.3 directory

./configure --with-config-file-path=/etc/php5/apache2 --with-pear=/usr/share/php --with-gd --with-mysql --with-mysqli --with-pdo-mysql=/usr --with-curl --disable-debug --with-mhash --with-jpeg-dir=/usr --with-freetype-dir=/usr --with-zlib --with-gettext --with-bz2 --with-mcrypt --with-iconv --enable-soap --with-openssl --enable-mbstring --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --enable-bcmath --with-imap --with-xsl --with-imap-ssl --enable-zip --with-tidy --with-kerberos --enable-calendar --enable-sockets --with-libxml-dir=/usr --with-apxs2

make install

And then i got follwing error:

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libc-client.a(osdep.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/lib/x86_64-linux-gnu/libc-client.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [libphp5.la] Fehler 1

I really don't know how to fix this because it really should not happen. Everything ist clean installed and google also tells nothing which can help....

Would be great if somebody here could help me :D

1

Error message tells that you can add -fPIC compiler flag.

http://jaytaylor.com/blog/2010/10/06/howto-fix-fpic-errors/

On this page you can find semi-good solution - enable PIC to whole PHP.

export CC=”gcc -fPIC”
export CXX=”g++ -fPIC”

But I don't know what disadvantages this solution has.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.