Bug #70641 [Com]: Compile fails for ext/standard/random.c

From: Date: Mon, 05 Oct 2015 15:15:12 +0000
Subject: Bug #70641 [Com]: Compile fails for ext/standard/random.c
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196404@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70641&edit=1 ID: 70641 Comment by: security at paragonie dot com Reported by: sascha dot pfalz at ivz dot de Summary: Compile fails for ext/standard/random.c Status: Open Type: Bug Package: Compile Failure Operating System: RHEL 5.7 PHP Version: 7.0.0RC4 Block user comment: N Private report: N New Comment: https://github.com/torvalds/linux/blob/master/include/linux/random.h https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/vmwgfx/device_include/vm_basic_types.h#L5 Actually, it looks like this header file isn't at all necessary for getrandom(2). Previous Comments: ------------------------------------------------------------------------ [2015-10-05 15:05:23] security at paragonie dot com As someone who doesn't own an RHEL license, I can't say I know what their copy of /usr/include/linux/random.h is doing. Could you pastebin it for me? ------------------------------------------------------------------------ [2015-10-05 12:07:38] sascha dot pfalz at ivz dot de Description: ------------ Trying to compile the sources gave the following error: In file included from /usr/src/php-7.0.0RC4/ext/standard/random.c:35: /usr/include/linux/random.h:38: error: expected specifier-qualifier-list before ‘__u32’ /usr/include/linux/random.h:42: error: expected specifier-qualifier-list before ‘__u32’ make: *** [ext/standard/random.lo] Error 1 Looking at the source, there is the following include part: #ifdef __linux__ # include <linux/random.h> #endif I've commented the whole section and the code compiles. Uncommented it again and got the described error. The compile works with this section commented out. My configure line: CFLAGS="-m64 -O3 -pipe" CXXFLAGS="${CFLAGS}" ./configure \ --with-libdir=lib64 \ --with-apxs2=/opt/apache22/bin/apxs \ --enable-fpm \ --enable-phpdbg \ --enable-phpdbg-webhelper \ --with-config-file-path=/opt/apache22/conf/php70 \ --with-config-file-scan-dir=/opt/apache22/conf/php70/php.d \ --enable-sigchild \ --with-libxml-dir=/usr \ --with-openssl=/opt/openssl \ --with-system-ciphers \ --with-pcre-regex \ --with-zlib=/usr \ --enable-bcmath \ --with-bz2=/usr \ --enable-calendar \ --with-curl=/usr \ --enable-dba \ --with-gdbm=/usr \ --with-db4=/usr \ --with-libxml-dir=/usr \ --enable-exif \ --enable-ftp \ --with-openssl-dir=/opt/openssl \ --with-gd \ --with-jpeg-dir=/usr \ --with-png-dir=/usr \ --with-zlib-dir=/usr \ --with-xpm-dir=/usr \ --with-freetype-dir=/usr \ --enable-gd-native-ttf \ --enable-gd-jis-conv \ --with-gettext=/usr \ --with-gmp=/opt/gmp6 \ --with-mhash \ --with-imap=/usr/local/php-imap \ --without-kerberos \ --with-imap-ssl=/opt/openssl \ --enable-intl \ --with-icu-dir=/opt/icu \ --with-ldap \ --with-ldap-sasl \ --enable-mbstring \ --with-libmbfl \ --with-mcrypt \ --with-mysqli=mysqlnd \ --with-mysql-sock=/var/lib/mysql/mysql.sock \ --with-oci8 \ --enable-pcntl \ --with-pdo-mysql=mysqlnd \ --with-zlib-dir=/usr \ --with-pdo-oci \ --with-readline=/usr \ --enable-shmop \ --with-libxml-dir=/usr \ --without-snmp \ --enable-soap \ --enable-sockets \ --enable-sysvmsg \ --enable-sysvsem \ --enable-sysvshm \ --enable-wddx \ --with-libxml-dir=/usr \ --enable-zip \ --with-pear=/opt/apache22/PEAR \ --with-xsl \ --enable-mysqlnd \ --with-xmlrpc On this box I've had PHP 5.6.x series compiled so far without any problems. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70641&edit=1

« previous php.bugs (#196404) next »