I just wanted to build PHP7 from Scratch.
I used this command:
cd php-7.0.0
./configure --prefix=/usr/local/php/7.0.0 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-pdo-mysql --with-mysqli --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-imap=shared,/usr --with-imap-ssl --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm --sysconfdir=/etc/php7/ --with-xpm-dir=/usr --enable-intl --with-ldap --enable-mysqlnd --with-pear=/usr/local/php/7.0.0/pear --with-apxs2 --enable-dtrace --disable-phpdbg --enable-zend-signals
make clean
make
But it breaks with the the Error Message:
/bin/sh /usr/src/php7/php-7.0.0/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/imap/ -I/usr/src/php7/php-7.0.0/ext/imap/ -DPHP_ATOM_INC -I/usr/src/php7/php-7.0.0/include -I/usr/src/php7/php-7.0.0/main -I/usr/src/php7/php-7.0.0 -I/usr/src/php7/php-7.0.0/ext/date/lib -I/usr/include/libxml2 -I/usr/X11 -I/usr/include/freetype2 -I/usr/include/c-client -I/usr/src/php7/php-7.0.0/ext/mbstring/oniguruma -I/usr/src/php7/php-7.0.0/ext/mbstring/libmbfl -I/usr/src/php7/php-7.0.0/ext/mbstring/libmbfl/mbfl -I/usr/include/postgresql -I/usr/src/php7/php-7.0.0/ext/sqlite3/libsqlite -I/usr/src/php7/php-7.0.0/ext/zip/lib -I/usr/src/php7/php-7.0.0/TSRM -I/usr/src/php7/php-7.0.0/Zend -I/usr/include -g -O2 -fvisibility=hidden -DZEND_SIGNALS -c /usr/src/php7/php-7.0.0/ext/imap/php_imap.c -o ext/imap/php_imap.lo
/bin/sh /usr/src/php7/php-7.0.0/libtool --silent --preserve-dup-deps --mode=link cc -DPHP_ATOM_INC -I/usr/src/php7/php-7.0.0/include -I/usr/src/php7/php-7.0.0/main -I/usr/src/php7/php-7.0.0 -I/usr/src/php7/php-7.0.0/ext/date/lib -I/usr/include/libxml2 -I/usr/X11 -I/usr/include/freetype2 -I/usr/include/c-client -I/usr/src/php7/php-7.0.0/ext/mbstring/oniguruma -I/usr/src/php7/php-7.0.0/ext/mbstring/libmbfl -I/usr/src/php7/php-7.0.0/ext/mbstring/libmbfl/mbfl -I/usr/include/postgresql -I/usr/src/php7/php-7.0.0/ext/sqlite3/libsqlite -I/usr/src/php7/php-7.0.0/ext/zip/lib -I/usr/src/php7/php-7.0.0/TSRM -I/usr/src/php7/php-7.0.0/Zend -I/usr/include -g -O2 -fvisibility=hidden -DZEND_SIGNALS -o ext/imap/imap.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/src/php7/php-7.0.0/modules -avoid-version -module -L/usr/lib/x86_64-linux-gnu/mit-krb5 -L/usr/lib/x86_64-linux-gnu ext/imap/php_imap.lo -L/usr/lib/x86_64-linux-gnu/mit-krb5 -lc-client -lcrypt -lpam -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto
/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
Makefile:1027: recipe for target 'ext/imap/imap.la' failed
make: *** [ext/imap/imap.la] Error 1
Check a lot of things already. I also linked the x86 Version of the c-client. But nothing helped so far. I also set the CXFLAG -fPIC butt that didn't solved it either