php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69827 Don't know how to define struct flock on this system
Submitted: 2015-06-14 08:27 UTC Modified: 2015-06-14 10:25 UTC
From: jiaxianglu at gmail dot com Assigned: laruence (profile)
Status: Closed Package: Compile Failure
PHP Version: 7.0.0alpha1 OS: CentOS6.4
Private report: No CVE-ID: None
 [2015-06-14 08:27 UTC] jiaxianglu at gmail dot com
Description:
------------
php-7.0.0alpha1
CentOS release 6.4 (Final)
2.6.32-358.el6.x86_64


Test script:
---------------
yum -y install libxml2 libxml2-devel openssl openssl-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libmcrypt libmcrypt-devel libxslt libxslt-devel libtool libtool-ltdl libtool-ltdl-devel

libgd is reinstalled by libgd-2.1.1.tar.xz
./configure --prefix=/usr/local/gd2
make && make install

compile following args:
./configure --enable-fpm --prefix=/usr/local/php7 --with-config-file-path=/usr/local/php7/etc \
--with-fpm-user=nobody --with-fpm-group=nobody --with-mysqli --with-pdo-mysql \
--with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib \
--enable-libxml --with-libxml-dir=/usr --enable-xml \
--enable-dom --disable-rpath --enable-bcmath --enable-shmop \
--enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex \
--enable-mbstring --with-mcrypt --enable-ftp --enable-gd-native-ttf \
--with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc \
--enable-zip --enable-soap --without-pear --with-gettext \
--disable-fileinfo --enable-maintainer-zts --enable-exif --with-xsl --with-gd=/usr/local/gd2

Actual result:
--------------
This is the result:
checking whether to enable Zend OPcache support... yes
checking whether to enable file based caching (experimental)... no
checking for mprotect... yes
checking for sysvipc shared memory support... no
checking for mmap() using MAP_ANON shared memory support... no
checking for mmap() using /dev/zero shared memory support... no
checking for mmap() using shm_open() shared memory support... no
checking for mmap() using regular file shared memory support... no
checking "whether flock struct is linux ordered"... "no"
checking "whether flock struct is BSD ordered"... "no"
configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no

If I used '--enable-opcache=no' , when I make it, it return:
/home/jiaxiang/php-7.0.0alpha1/ext/gd/gd.c:57:22: error: X11/xpm.h: No such file or directory
make: *** [ext/gd/gd.lo] Error 1

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-14 09:30 UTC] laruence@php.net
please check config.log for more info about error
 [2015-06-14 09:30 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2015-06-14 09:31 UTC] jiaxianglu at gmail dot com
-Status: Feedback +Status: Open
 [2015-06-14 09:31 UTC] jiaxianglu at gmail dot com
Now I resolved.
First, I edit /etc/ld.so.conf.d/local.conf
content is:
/usr/local/lib64
/usr/local/lib
/usr/lib
/usr/lib64

So config is OK, but make is still failure !

Finally, I added /usr/local/gd2/lib
and replace config args `--with-gd=/usr/local/gd2` to `--with-gd`

then compile is success!

Thank you!

PS: new PHP compile is sososo long time. I buy a cup of starbucks and back to my computer. It is still compileing.
But I love it . It is so fast!
 [2015-06-14 10:25 UTC] laruence@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence
 [2015-06-14 10:25 UTC] laruence@php.net
did you try "make -j" ? :)
 [2015-06-14 10:31 UTC] jiaxianglu at gmail dot com
..No..
Thank you for your remind

return:
/bin/sh /home/jiaxiang/php-7.0.0alpha1/libtool --silent --preserve-dup-deps --mode=install cp ext/opcache/opcache.la /home/jiaxiang/php-7.0.0alpha1/modules

Build complete.
Don't forget to run 'make test'.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Dec 02 03:05:53 2022 UTC