Bug #65207 [Com]: OPCache can't be compiled with SolarisStudio
Edit report at https://bugs.php.net/bug.php?id=65207&edit=1 ID: 65207 Comment by: skrueger at europe dot com Reported by:reh at hebis dot uni-frankfurt dot de Summary:OPCache can't be compiled with SolarisStudio Status: Open Type: Bug Package:Compile Failure Operating System: Solaris / Illumos PHP Version:5.5.0 Block user comment: N Private report: N New Comment: Guys, since you already got it working, how about providing a patch? Previous Comments: [2013-07-20 10:29:12] reh at hebis dot uni-frankfurt dot de For me it looks like two probs. 1. Lineterminators 2. Flock library Both seems to be tested only with GCC (1) and GLIBC (2) which is likely standard on most linux systems. It is just a question of the portability of the code. [2013-07-20 03:11:25] lj2007331 at gmail dot com I tested many times. Influence and Linux OS version. CentOS 5 32/64bit and CentOS 6 64bit has been passed, but CentOS 6 32bit ./configure error: checking for known struct flock definition... configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no [2013-07-20 00:00:55] yohg...@php.net > checking for known struct flock definition... configure: error: Don't know > how to define struct flock on this system, I don't have this problem with my Scientific Linux 6.4. [2013-07-19 05:20:51] lj2007331 at gmail dot com PHP Version:5.5.0 and 5.5.1 OS:CentOS release 6.4 (Final) Kernel: 2.6.32-358.6.2.el6.i686 Error: 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 make: *** No targets specified and no makefile found. Stop. make: *** No rule to make target `install'. Stop. [2013-07-14 14:25:27] tgburrin at yahoo dot com reh's solution seems to work for me. After converting the \r\n's to \n and fixing the three spots (configure, ext/opcache/ZendAccelerator.h, and ext/opcache/config.m4) where the flock test is done, I was able to configure and build successfully. I haven't seen any issues so far. using Solaris Studio 12.3 on: # cc -V cc: Sun C 5.12 SunOS_i386 2011/11/16 # uname -a SunOS Heimdall 5.10 Generic_147148-26 i86pc i386 i86pc The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=65207 -- Edit this bug report at https://bugs.php.net/bug.php?id=65207&edit=1
Bug #65207 [Com]: OPCache can't be compiled with SolarisStudio
Edit report at https://bugs.php.net/bug.php?id=65207&edit=1 ID: 65207 Comment by: lj2007331 at gmail dot com Reported by:reh at hebis dot uni-frankfurt dot de Summary:OPCache can't be compiled with SolarisStudio Status: Open Type: Bug Package:Compile Failure Operating System: Solaris / Illumos PHP Version:5.5.0 Block user comment: N Private report: N New Comment: I tested many times. Influence and Linux OS version. CentOS 5 32/64bit and CentOS 6 64bit has been passed, but CentOS 6 32bit ./configure error: checking for known struct flock definition... configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no Previous Comments: [2013-07-20 00:00:55] yohg...@php.net > checking for known struct flock definition... configure: error: Don't know > how to define struct flock on this system, I don't have this problem with my Scientific Linux 6.4. [2013-07-19 05:20:51] lj2007331 at gmail dot com PHP Version:5.5.0 and 5.5.1 OS:CentOS release 6.4 (Final) Kernel: 2.6.32-358.6.2.el6.i686 Error: 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 make: *** No targets specified and no makefile found. Stop. make: *** No rule to make target `install'. Stop. [2013-07-14 14:25:27] tgburrin at yahoo dot com reh's solution seems to work for me. After converting the \r\n's to \n and fixing the three spots (configure, ext/opcache/ZendAccelerator.h, and ext/opcache/config.m4) where the flock test is done, I was able to configure and build successfully. I haven't seen any issues so far. using Solaris Studio 12.3 on: # cc -V cc: Sun C 5.12 SunOS_i386 2011/11/16 # uname -a SunOS Heimdall 5.10 Generic_147148-26 i86pc i386 i86pc [2013-07-05 19:31:36] reh at hebis dot uni-frankfurt dot de Last info before resigning. :-( Configure can't link to flock() > configure:19164: checking for flock > "conftest.c", line 161: warning: statement not reached > Undefined symbol first referenced in file > flockconftest.o Maybe someone smarter than me, may use the informations on http://www.perkin.org.uk/posts/solaris-portability-flock.html [2013-07-05 14:41:41] reh at hebis dot uni-frankfurt dot de FAILED TEST SUMMARY ... Test flock() function: Basic functionality [ext/standard/tests/file/flock_basic.phpt] Test flock() function: Variations [ext/standard/tests/file/flock_variation.phpt] ... The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=65207 -- Edit this bug report at https://bugs.php.net/bug.php?id=65207&edit=1
Bug #65207 [Com]: OPCache can't be compiled with SolarisStudio
Edit report at https://bugs.php.net/bug.php?id=65207&edit=1 ID: 65207 Comment by: lj2007331 at gmail dot com Reported by:reh at hebis dot uni-frankfurt dot de Summary:OPCache can't be compiled with SolarisStudio Status: Open Type: Bug Package:Compile Failure Operating System: Solaris / Illumos PHP Version:5.5.0 Block user comment: N Private report: N New Comment: PHP Version:5.5.0 and 5.5.1 OS:CentOS release 6.4 (Final) Kernel: 2.6.32-358.6.2.el6.i686 Error: 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 make: *** No targets specified and no makefile found. Stop. make: *** No rule to make target `install'. Stop. Previous Comments: [2013-07-14 14:25:27] tgburrin at yahoo dot com reh's solution seems to work for me. After converting the \r\n's to \n and fixing the three spots (configure, ext/opcache/ZendAccelerator.h, and ext/opcache/config.m4) where the flock test is done, I was able to configure and build successfully. I haven't seen any issues so far. using Solaris Studio 12.3 on: # cc -V cc: Sun C 5.12 SunOS_i386 2011/11/16 # uname -a SunOS Heimdall 5.10 Generic_147148-26 i86pc i386 i86pc [2013-07-05 19:31:36] reh at hebis dot uni-frankfurt dot de Last info before resigning. :-( Configure can't link to flock() > configure:19164: checking for flock > "conftest.c", line 161: warning: statement not reached > Undefined symbol first referenced in file > flockconftest.o Maybe someone smarter than me, may use the informations on http://www.perkin.org.uk/posts/solaris-portability-flock.html [2013-07-05 14:41:41] reh at hebis dot uni-frankfurt dot de FAILED TEST SUMMARY ... Test flock() function: Basic functionality [ext/standard/tests/file/flock_basic.phpt] Test flock() function: Variations [ext/standard/tests/file/flock_variation.phpt] ... [2013-07-05 14:17:13] reh at hebis dot uni-frankfurt dot de Today I was able too complete the build. I had to add some Lines in configure and ZendAccelerator.h. (corresponding to ) > # elif defined(__SVR4) > # define FLOCK_STRUCTURE(name, type, whence, start, len) \ > struct flock name = {type, whence, start, len, 0, 0, 0 } Also it was necessary to translate some files of ext/opcache/ with dos2unix. Maybe the problem has been long lines concatunated whith "\CRNL" instead of "\NL" Still it's a hack, not a tested solution. ;-) [2013-07-05 02:07:48] reh at hebis dot uni-frankfurt dot de Description: Configure tries to define a macro for the os dependent structure of flock. (lines 64988 to 65007) Using solarisstudio 12.3 as compiler, non of the pattern matches and configure suggests to disable OPCache Not really knowing what I'm doing, I tried to patch the line 64991 >From "# elif defined(__svr4__)" to "# elif defined(__svr4__) || defined(__SVR4)" This workaround is poor I know, but it seems to work, configure generates the Makefiles. The same construct can be found in ext/opcache/ZendAccelerator.h and for me it looks like that there were some other smells in the opcache package. Make still fails. Test script: --- Configure itself Actual result: -- Configure: checking for known struct flock definition... configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no -- Edit this bug report at https://bugs.php.net/bug.php?id=65207&edit=1
Bug #65207 [Com]: OPCache can't be compiled with SolarisStudio
Edit report at https://bugs.php.net/bug.php?id=65207&edit=1 ID: 65207 Comment by: tgburrin at yahoo dot com Reported by:reh at hebis dot uni-frankfurt dot de Summary:OPCache can't be compiled with SolarisStudio Status: Open Type: Bug Package:Compile Failure Operating System: Solaris / Illumos PHP Version:5.5.0 Block user comment: N Private report: N New Comment: reh's solution seems to work for me. After converting the \r\n's to \n and fixing the three spots (configure, ext/opcache/ZendAccelerator.h, and ext/opcache/config.m4) where the flock test is done, I was able to configure and build successfully. I haven't seen any issues so far. using Solaris Studio 12.3 on: # cc -V cc: Sun C 5.12 SunOS_i386 2011/11/16 # uname -a SunOS Heimdall 5.10 Generic_147148-26 i86pc i386 i86pc Previous Comments: [2013-07-05 19:31:36] reh at hebis dot uni-frankfurt dot de Last info before resigning. :-( Configure can't link to flock() > configure:19164: checking for flock > "conftest.c", line 161: warning: statement not reached > Undefined symbol first referenced in file > flockconftest.o Maybe someone smarter than me, may use the informations on http://www.perkin.org.uk/posts/solaris-portability-flock.html [2013-07-05 14:41:41] reh at hebis dot uni-frankfurt dot de FAILED TEST SUMMARY ... Test flock() function: Basic functionality [ext/standard/tests/file/flock_basic.phpt] Test flock() function: Variations [ext/standard/tests/file/flock_variation.phpt] ... [2013-07-05 14:17:13] reh at hebis dot uni-frankfurt dot de Today I was able too complete the build. I had to add some Lines in configure and ZendAccelerator.h. (corresponding to ) > # elif defined(__SVR4) > # define FLOCK_STRUCTURE(name, type, whence, start, len) \ > struct flock name = {type, whence, start, len, 0, 0, 0 } Also it was necessary to translate some files of ext/opcache/ with dos2unix. Maybe the problem has been long lines concatunated whith "\CRNL" instead of "\NL" Still it's a hack, not a tested solution. ;-) [2013-07-05 02:07:48] reh at hebis dot uni-frankfurt dot de Description: Configure tries to define a macro for the os dependent structure of flock. (lines 64988 to 65007) Using solarisstudio 12.3 as compiler, non of the pattern matches and configure suggests to disable OPCache Not really knowing what I'm doing, I tried to patch the line 64991 >From "# elif defined(__svr4__)" to "# elif defined(__svr4__) || defined(__SVR4)" This workaround is poor I know, but it seems to work, configure generates the Makefiles. The same construct can be found in ext/opcache/ZendAccelerator.h and for me it looks like that there were some other smells in the opcache package. Make still fails. Test script: --- Configure itself Actual result: -- Configure: checking for known struct flock definition... configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no -- Edit this bug report at https://bugs.php.net/bug.php?id=65207&edit=1