php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73739 undefined reference to `php_mt_rand_range'
Submitted: 2016-12-14 17:19 UTC Modified: 2016-12-14 17:37 UTC
From: mail at dasprids dot de Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: master-Git-2016-12-14 (Git) OS: UbuntuGNOME 16.04
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mail at dasprids dot de
New email:
PHP Version: OS:

 

 [2016-12-14 17:19 UTC] mail at dasprids dot de
Description:
------------
OS: UbuntuGNOME 16.04
GCC-Version: 5.0

make fails to compile on both GIT master and 7.1.

Test script:
---------------
./configure && make

Expected result:
----------------
make runs successfully

Actual result:
--------------
ext/fileinfo/libmagic/.libs/softmagic.o: In function `moffset':
php-src/ext/fileinfo/libmagic/softmagic.c:822: undefined reference to `der_offs'
ext/fileinfo/libmagic/.libs/softmagic.o: In function `magiccheck':
php-src/ext/fileinfo/libmagic/softmagic.c:1978: undefined reference to `der_cmp'
ext/filter/.libs/callback_filter.o: In function `php_filter_callback':
php-src/ext/filter/callback_filter.c:38: undefined reference to `call_user_function_ex'
ext/spl/.libs/php_spl.o: In function `php_spl_object_hash':
php-src/ext/spl/php_spl.c:749: undefined reference to `php_mt_rand'
php-src/ext/spl/php_spl.c:750: undefined reference to `php_mt_rand'
ext/standard/.libs/array.o: In function `php_array_data_shuffle':
php-src/ext/standard/array.c:2322: undefined reference to `php_mt_rand_range'
php-src/ext/standard/array.c:2347: undefined reference to `php_mt_rand_range'
ext/standard/.libs/array.o: In function `zif_array_rand':
php-src/ext/standard/array.c:5064: undefined reference to `php_mt_rand_range'
php-src/ext/standard/array.c:5034: undefined reference to `php_mt_rand_range'
ext/standard/.libs/basic_functions.o: In function `zm_startup_basic':
php-src/ext/standard/basic_functions.c:3663: undefined reference to `zm_startup_mt_rand'
ext/standard/.libs/basic_functions.o:(.data.rel.ro+0x1068): undefined reference to `zif_mt_srand'
ext/standard/.libs/basic_functions.o:(.data.rel.ro+0x1088): undefined reference to `zif_mt_getrandmax'
ext/standard/.libs/basic_functions.o:(.data.rel.ro+0x10a8): undefined reference to `zif_mt_rand'
ext/standard/.libs/basic_functions.o:(.data.rel.ro+0x10c8): undefined reference to `zif_mt_srand'
ext/standard/.libs/basic_functions.o:(.data.rel.ro+0x10e8): undefined reference to `zif_mt_getrandmax'
ext/standard/.libs/rand.o: In function `php_rand':
php-src/ext/standard/rand.c:44: undefined reference to `php_mt_rand'
ext/standard/.libs/rand.o: In function `zif_rand':
php-src/ext/standard/rand.c:68: undefined reference to `php_mt_rand_common'
php-src/ext/standard/rand.c:57: undefined reference to `php_mt_rand'
php-src/ext/standard/rand.c:65: undefined reference to `php_mt_rand_common'
ext/standard/.libs/rand.o: In function `php_srand':
php-src/ext/standard/rand.c:36: undefined reference to `php_mt_srand'
ext/standard/.libs/string.o: In function `php_string_shuffle':
php-src/ext/standard/string.c:5388: undefined reference to `php_mt_rand_range'
collect2: error: ld returned 1 exit status
Makefile:269: recipe for target 'sapi/cli/php' failed
make: *** [sapi/cli/php] Error 1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-14 17:21 UTC] nikic@php.net
Are you sure this is a clean build? Please rerun ./buildconf. It looks like you're using the ./configure of a previous PHP version.
 [2016-12-14 17:25 UTC] mail at dasprids dot de
Oh, you were (partially) right, I totally forgot about that part! Anyway, now I get a new failure though:

ext/filter/.libs/callback_filter.o: In function `php_filter_callback':
/home/dasprid/dev/php-src/ext/filter/callback_filter.c:38: undefined reference to `call_user_function_ex'
collect2: error: ld returned 1 exit status
Makefile:269: recipe for target 'sapi/cli/php' failed
make: *** [sapi/cli/php] Error 1
 [2016-12-14 17:32 UTC] nikic@php.net
call_user_function_ex() is now a macro defined in zend_API.h, which is pretty certainly (indirectly) included by that file. This also looks like some kind of stale build issue. Did you run "make clean" before this build?
 [2016-12-14 17:36 UTC] mail at dasprids dot de
Okay, now I feel stupid ;)

Thanks for that, issue can be closed.
 [2016-12-14 17:37 UTC] nikic@php.net
-Status: Open +Status: Not a bug
 [2016-12-14 17:37 UTC] nikic@php.net
-> Not a bug per previous comment.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 15:01:34 2025 UTC