|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-09-05 16:47 UTC] jerry at scene-naturally dot dyndns dot org
Description: ------------ When PHP is compiled using the option --with-gmp=/usr/local (gmp being installed in /usr/local) PHP will not compile, failing with the error as noted below. I have chatted with the developer for libgmp, and the gist of the result of the discussion is that this is a PHP bug. Reproduce code: --------------- gmp is compiled using ./configure \ --prefix=/usr/local \ --enable-cxx \ --disable-shared \ ABI=mode32 as per the developer directions for installing libgmp on Mac OS X. (The subsequent build of GMP passes all tests.) Expected result: ---------------- The usual result of a successful compile. Actual result: -------------- /usr/bin/ld: /usr/local/lib/libgmp.a(popcount.o) has local relocation entries in non-writable section (__TEXT,__text) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 22:00:01 2025 UTC |
I got php version 5.3.0 to compile using the "--with-gmp" option and gmp version 4.3.1 as follows: gmp compile dialog: $ cd gmp-4.3.1 $ ./configure --build=i686-apple-darwin9.8.0 \ --host=i686-apple-darwin9.8.0 --target=i686-apple-darwin9.8.0 $ make $ make check $ make install php compile dialog: $ cd php-5.3.0 $ ./configure --build=i686-apple-darwin9.8.0 \ --host=i686-apple-darwin9.8.0 --target=i686-apple-darwin9.8.0 \ --with-apxs2=/usr/sbin/apxs --with-mysql=/usr/local/mysql \ --with-mcrypt=/usr/local/bin/mcrypt --enable-mbstring \ --enable-calendar --enable-ftp --enable-sockets --without-pear \ --disable-cgi --with-zlib --with-pgsql=/usr/local/pgsql \ --with-gmp=/usr/local $ make $ make test $ sudo make install Hope this is helpful. I realize this is an old bug, but I was also having the same problem. I believe that the success of my build is probably related to the use of the "--build", "--host", and/or "--target" options, which are for my Mac OS X 10.5.8 laptop, and others are likely to need different specifications for other Mac OS X configurations. The php configure options "--with-mysql" through "--with-pgsql" are probably unimportant to the success of this build, but I've included them for the sake of completeness, just because I haven't taken the time to test the build without them. This php build is now up and running, and appears to be stable on preliminary testing, although I haven't yet tested any of the gmp functions. If any of the gmp_ functions fail during future development I'll leave another comment (assuming this one is still here). Thanks & long live PHP.