Can't compile php extension after upgrade Apache to worker and newest version

bartkob

Verified User
Joined
Sep 12, 2007
Messages
27
Hello,

I was using libpuzzle library for over a year. Unfortunately, today after changing Apache mpm from prefork to worker and upgrade Apache 2.29 and PHP 5.4.33 I can't compile libpuzzle library.
I don't know what happened. Reverting to prefork didn't help.

This is how i made installation:
Code:
wget http://download.pureftpd.org/pub/pure-ftpd/misc/libpuzzle/releases/libpuzzle-0.11.tar.gz
tar -zxvf libpuzzle-0.11.tar.gz
cd libpuzzle-0.11/php/libpuzzle
phpize
./configure --with-libpuzzle
make clean
make
make install

There is such error during "make":

Code:
/bin/sh /root/libpuzzle-0.9/php/libpuzzle/libtool --mode=link cc -DPHP_ATOM_INC -I/root/libpuzzle-0.9/php/libpuzzle/include -I/root/libpuzzle-0.9/php/libpuzzle/main -I/root/libpuzzle-0.9/php/libpuzzle -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -o libpuzzle.la -export-dynamic -avoid-version -prefer-pic -module -rpath /root/libpuzzle-0.9/php/libpuzzle/modules  libpuzzle.lo -lpuzzle -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz -lm
cc -shared  .libs/libpuzzle.o  -lpuzzle -lXpm -lX11 /usr/lib/libjpeg.so -lfontconfig /usr/lib/libfreetype.so -lpng12 -lz -lm  -Wl,-soname -Wl,libpuzzle.so -o .libs/libpuzzle.so
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libpuzzle.a(puzzle.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libpuzzle.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libpuzzle.la] Błąd 1

Did you know if I change something in my system during apache, php (and ./build all) update? Is it a way to fix it?
Maybe there was 32bits previously, and now everything is in 64bits.
 
Last edited:
Hello,


I really doubt it relates to apache upgrade. Though I don't have a ready-made solution for you I could try to fix it myself on your server and then provide you with details. Please send me a PM for a quote if you are interested.
 
Try running ./configure --enable-shared --with-libpuzzle

Or add -fPic in your makefile
 
Back
Top