php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65423 Configure error with opcache and mcrypt
Submitted: 2013-08-09 07:06 UTC Modified: 2020-10-28 14:44 UTC
Votes:8
Avg. Score:3.9 ± 0.9
Reproduced:6 of 7 (85.7%)
Same Version:0 (0.0%)
Same OS:2 (33.3%)
From: vasilis at vatsos dot gr Assigned: nikic (profile)
Status: Closed Package: Compile Failure
PHP Version: 5.5.1 OS: CentOS release 6.2 (Final)
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: vasilis at vatsos dot gr
New email:
PHP Version: OS:

 

 [2013-08-09 07:06 UTC] vasilis at vatsos dot gr
Description:
------------
When you try to configure php with mcrypt, i get the "Don't know how to define 
struct flock on this system". If i remove it, if finishes ok

Test script:
---------------
./configure '--with-libdir=lib64' '--cache-file=../config.cache' '--prefix=/usr/local/php551' '--with-config-file-path=/usr/local/php551/etc' '--disable-debug' '--with-pic' '--disable-rpath' '--enable-fastcgi' '--with-bz2' '--with-curl' '--with-freetype-dir=/usr/local/php551' '--with-png-dir=/usr/local/php551' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr/local/php551' '--with-openssl' '--with-pspell' '--with-pcre-regex' '--with-zlib' '--enable-exif' '--enable-ftp' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-wddx' '--with-kerberos' '--with-unixODBC=/usr' '--enable-shmop' '--enable-calendar' '--without-sqlite3' '--with-libxml-dir=/usr/local/php551' '--enable-pcntl' '--with-imap' '--with-imap-ssl' '--enable-mbstring' '--enable-mbregex' '--with-gd' '--enable-bcmath' '--with-xmlrpc' '--with-ldap' '--with-ldap-sasl' '--with-mysql=/usr' '--with-mysqli' '--with-snmp' '--enable-soap' '--with-xsl' '--enable-xmlreader' '--enable-xmlwriter' '--enable-pdo' '--with-pdo-mysql' '--with-pdo-pgsql' '--with-pear=/usr/local/php551/pear' '--with-mcrypt' '--enable-intl' '--without-pdo-sqlite' '--with-config-file-scan-dir=/usr/local/php551/php.d'

Expected result:
----------------
To finish configure

Actual result:
--------------
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 for known struct flock definition... configure: error: Don't know how to 
define struct flock on this system, set --enable-opcache=no

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-08-09 15:32 UTC] johannes@php.net
-Status: Open +Status: Feedback
 [2013-08-09 15:32 UTC] johannes@php.net
I can't reproduce locally. Please check your config.log file. Somewhere towards the end (above the loooong list of variable declarations) there should be a some line with "checking for known struct flock definition" and then a small C program, the way it was compiled and a more verbose error message. Please provide this.
 [2013-08-11 19:18 UTC] vasilis at vatsos dot gr
-Status: Feedback +Status: Open
 [2013-08-11 19:18 UTC] vasilis at vatsos dot gr
hmmm and to think it crossed my mind there would be a log file :) i feel just a 
fool.

/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status

i installed libtool-ltdl-devel and it configured successfully

wouldn't be better if config checked for ltdl?
 [2014-05-02 08:03 UTC] leehanxue at gmail dot com
I got a similar error when compiling PHP 5.6 on OS X Mavericks 9.2 , and with the same fix: install GNU Libtool to provide the libtdl library. 

Specifically these libraries

/usr/local/lib/libltdl.dylib
/usr/local/lib/libltdl.a
/usr/local/lib/libltdl.7.dylib


Are there any plans to check for libtool dependency when the Opscache extension is enabled?
 [2016-01-05 13:59 UTC] leonvosmeijer at gmail dot com
Im actually getting the same results when compiling PHP7 on CentOS 6.7. Resolving the issue by installing the libtool-ltdl-devel package solves the issue.
 [2020-10-28 14:44 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2020-10-28 14:44 UTC] nikic@php.net
The flock check has been dropped in PHP 7.2, so at least this particular error case shouldn't be a problem anymore. Maybe there are other manifestations of the root cause.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Apr 14 08:01:29 2025 UTC