#50990 [Com]: gmp extension doesn't compile with gmp 5.0.1
ID: 50990
Comment by: susan dot smith dot dev at gmail dot com
Reported By: php-bugs-2010 at ryandesign dot com
Status: Open
Bug Type: GNU MP related
Operating System: Mac OS X 10.6.2
PHP Version: 5.3.2RC1
New Comment:
Don't be silly! MPIR gives better support for Windows, not for "modern
architecture", on POSIX systems GMP (http://gmplib.org/) is usually
better... and LGPL v3 is as compatible with the licence of PHP as LGPL
v2 is.
I solved replacing the outdated __GMP_BITS_PER_MP_LIMB defined constant
with GMP_LIMB_BITS. The latter is present in all previous versions, and
MPIR define it too.
Previous Comments:
------------------------------------------------------------------------
[2010-02-10 10:56:33] pajoye@php.net
ZF depends on the gmp php extension, which can be built against MPIR
instead of gmplib. See http://www.mpir.org/. It is a rock solid
gmp
compatible library with much better support for modern architecture and
optimizations, without the (l)gpl v3 license madness.
------------------------------------------------------------------------
[2010-02-10 10:23:47] juri dot saltbacka at gmail dot com
It is important because ZendFramework depends on GMP. At least on Mac
OS
X
------------------------------------------------------------------------
[2010-02-10 09:31:31] pajoye@php.net
I would suggest to go with MPIR instead. GMP 5.x breaks ABI badly and
is also not compatible with PHP, from a license point of view.
------------------------------------------------------------------------
[2010-02-10 08:59:47] php-bugs-2010 at ryandesign dot com
Description:
------------
The gmp extension doesn't compile with gmp 5.0.1. This used to work
with
gmp 4.3.2.
Reproduce code:
---------------
1. cd /path/to/php-5.3.2RC1
2. ./configure --disable-all --with-gmp=/opt/local
3. make
Expected result:
----------------
successful compile
Actual result:
--------------
/bin/sh /path/to/php-5.3.2RC1/libtool --silent --preserve-dup-deps --
mode=compile gcc -Iext/gmp/ -I/path/to/php-5.3.2RC1/ext/gmp/ -
DPHP_ATOM_INC -I/path/to/php-5.3.2RC1/include -I/path/to/php-
5.3.2RC1/main -I/path/to/php-5.3.2RC1 -I/path/to/php-
5.3.2RC1/ext/date/lib -I/path/to/php-5.3.2RC1/ext/ereg/regex -
I/opt/local/include -I/path/to/php-5.3.2RC1/TSRM -I/path/to/php-
5.3.2RC1/Zend -no-cpp-precomp -g -O2 -fvisibility=hidden -c
/path/to/php-5.3.2RC1/ext/gmp/gmp.c -o ext/gmp/gmp.lo
/path/to/php-5.3.2RC1/ext/gmp/gmp.c: In function zif_gmp_random:
/path/to/php-5.3.2RC1/ext/gmp/gmp.c:1377: error:
__GMP_BITS_PER_MP_LIMB undeclared (first use in this function)
/path/to/php-5.3.2RC1/ext/gmp/gmp.c:1377: error: (Each undeclared
identifier is reported only once
/path/to/php-5.3.2RC1/ext/gmp/gmp.c:1377: error: for each function it
appears in.)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50990&edit=1
Thread (9 messages)