Клиент попросил собрать php 5.3.29 на ubuntu 16.04.3
./configure --prefix=/opt/php-5.3.29 --with-config-file-path=/opt/php-5.3.29 --with-apxs2=/usr/bin/apxs --with-curl --with-openssl --enable-maintainer-zts --with-xmlrpc --with-gd --with-imap --with-ldap --with-mcrypt --with-mcrypt --enable-bcmath --with-gettext --with-mysql --with-xsl --enable-soap --enable-mbstring --enable-zip --with-kerberos --with-imap-ssl --with-pcre-regex --with-pdo-mysql --enable-exif --enable-mbregex --enable-sysvshm --enable-sysvsem --with-zlib --with-bz2 --with-mcrypt --enable-calendar --enable-cli --with-readline --with-tidy --enable-gd-native-ttf --with-freetype-dir=/usr/lib --with-gd --with-jpeg-dir=/usr/lib --enable-sockets --with-mysqli=mysqlnd
делаю make
/usr/bin/ld: /usr/local/lib/libssl.a(s2_srvr.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libssl.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:148: recipe for target 'libphp5.la' failed
make: *** [libphp5.la] Error 1
если я делаю
./configure shared --prefix=/opt/php-5.3.29 --with-config-file-path=/opt/php-5.3.29 --with-apxs2=/usr/bin/apxs --with-curl --with-openssl --enable-maintainer-zts --with-xmlrpc --with-gd --with-imap --with-ldap --with-mcrypt --with-mcrypt --enable-bcmath --with-gettext --with-mysql --with-xsl --enable-soap --enable-mbstring --enable-zip --with-kerberos --with-imap-ssl --with-pcre-regex --with-pdo-mysql --enable-exif --enable-mbregex --enable-sysvshm --enable-sysvsem --with-zlib --with-bz2 --with-mcrypt --enable-calendar --enable-cli --with-readline --with-tidy --enable-gd-native-ttf --with-freetype-dir=/usr/lib --with-gd --with-jpeg-dir=/usr/lib --enable-sockets --with-mysqli=mysqlnd
nstalling PHP SAPI module: apache2handler
/usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1.0/build/libtool' libphp5.la /usr/lib/apache2/modules
/usr/share/apr-1.0/build/libtool --mode=install install libphp5.la /usr/lib/apache2/modules/
libtool: install: install .libs/libphp5.lai /usr/lib/apache2/modules/libphp5.la
libtool: install: install .libs/libphp5.a /usr/lib/apache2/modules/libphp5.a
libtool: install: chmod 644 /usr/lib/apache2/modules/libphp5.a
libtool: install: x86_64-linux-gnu-ranlib /usr/lib/apache2/modules/libphp5.a
libtool: install: warning: remember to run `libtool --finish /opt/source/php-5.3.29/libs'
Warning! dlname not found in /usr/lib/apache2/modules/libphp5.la.
Assuming installing a .so rather than a libtool archive.
chmod 644 /usr/lib/apache2/modules/libphp5.so
chmod: cannot access '/usr/lib/apache2/modules/libphp5.so': No such file or directory
apxs:Error: Command failed with rc=65536
.
Makefile:157: recipe for target 'install-sapi' failed
make: *** [install-sapi] Error 1
как можно исправить ошибки в 1 или во 2 случаях?