On Tue, 13 Dec 2005, Richard Lacroix wrote: ; I'm trying to compile PHP 5.1.1 with MySQL support on a Sun Sparc with Solaris ; 8. I try with 3 different version on MySQL (4.0, 4.1 and 5.0). The configure ; goes OK but I always have the same error. with make. ; ; ; My configure options are: ; ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs ; --disable-pdo --with-mysql=/usr/local/mysql ; ; Note 1: if I remove MySQL support, everything is OK ; Note 2: If I use PHP 5.0.5 with any version of MySQL, everything is OK too. ; ; ; And the error is: ; ; ld: fatal: relocations remain against allocatable but non-writable sections ; collect2: ld returned 1 exit status ; gmake: *** [libphp5.la] Error 1
See PHP bug 35465 (http://bugs.php.net/35465) You need to either: Recompile MySQL with shared libraries; Recompile the MySQL static libraries as relocatable; Configure PHP with CFLAGS=-mimpure-text; Use the libtool from PHP 5.0.5. Use Sun's own C compiler instead of GCC. All bug the first two options will make the PHP shared objects much less shareable and increase memory usage (for example, if you're using an Apache module, the multiple httpd processes will all need their own copy of PHP, which is not a good thing but it is what you would have had with PHP 5.0). A.