go to bug id or search bugs for
Can't build --with-gmp on centos5. There is gmp.x86_64 4.1.4-10.el5
build error: too few arguments to function ‘__gmp_randinit_lc_2exp’
static void gmp_init_random(TSRMLS_D)
gmp_randinit_lc_2exp(GMPG(rand_state), 32L); << this line
last 5.4.35 5.5.19 and previous PHP 5.6.2 versions are ok
centos6 (gmp-4.3.1-7.el6_2.2.x86_64) builds without problem
./configure ... --with-gmp ... && make
/usr/src/php-5.6.3/ext/gmp/gmp.c: In function ‘gmp_init_random’:
/usr/src/php-5.6.3/ext/gmp/gmp.c:1779: warning: passing argument 2 of ‘__gmp_randinit_lc_2exp’ makes pointer from integer without a cast
/usr/src/php-5.6.3/ext/gmp/gmp.c:1779: error: too few arguments to function ‘__gmp_randinit_lc_2exp’
Add a Patch
Add a Pull Request
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.
Related To: Bug #68450
Hi, this was my fault, and yes it was completely by accident.
I originally changed the default RNG to MT, without realising I had to cater for pre-4.2
When I added the conditional to use the LCG for pre-4.2 I missed the _size off.
Sorry! Thanks for the patch Remi.