Compilation error on FreeBSD 10.3
OS : FreeBSD 10.3-RELEASE-p11 PHP Version : PHP 7.1.1 (cli) (built: Feb 15 2017 21:59:54) ( ZTS DEBUG ) APCu Version : 5.1.8 And github ( 4affa2c )
Error msg:
===> License PHP301 accepted by the user ===> pecl-APCu-5.1.8 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by pecl-APCu-5.1.8 for building ===> Extracting for pecl-APCu-5.1.8 => SHA256 Checksum OK for PECL/apcu-5.1.8.tgz. ===> Patching for pecl-APCu-5.1.8 ===> pecl-APCu-5.1.8 depends on file: /usr/local/bin/phpize - found ===> pecl-APCu-5.1.8 depends on file: /usr/local/bin/autoconf-2.69 - found ===> PHPizing for pecl-APCu-5.1.8 Configuring for: PHP Api Version: 20160303 Zend Module Api No: 20160303 Zend Extension Api No: 320160303 ===> Configuring for pecl-APCu-5.1.8 configure: loading site script /usr/ports/Templates/config.site checking for grep that handles long lines and -e... (cached) /usr/bin/grep checking for egrep... (cached) /usr/bin/egrep checking for a sed that does not truncate output... /usr/bin/sed checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cpp checking for icc... no checking for suncc... no checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... amd64-portbld-freebsd10.3 checking host system type... amd64-portbld-freebsd10.3 checking target system type... amd64-portbld-freebsd10.3 checking for PHP prefix... /usr/local checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib checking for PHP extension directory... /usr/local/lib/php/20160303-zts checking for PHP installed headers prefix... /usr/local/include/php checking if debug is enabled... no checking if zts is enabled... yes checking for re2c... no checking for gawk... (cached) /usr/bin/awk checking if /usr/bin/awk is broken... no checking whether to enable APCu support... yes, shared checking if APCu should be allowed to use rwlocks... yes checking if APCu should be built in debug mode... no checking if APCu should clear on SIGUSR1... no checking if APCu will use mmap or shm... mmap checking if APCu should utilize spinlocks before flocks... no Unable to set PTHREAD_PROCESS_SHARED (pthread_rwlockattr_setpshared), your system may not support shared rwlock's. Unable to set PTHREAD_PROCESS_SHARED (pthread_mutexattr_setpshared), your system may not support shared mutex's. checking for sigaction... (cached) yes checking for union semun... yes checking for ANSI C header files... (cached) yes checking for sys/types.h... (cached) yes checking for sys/stat.h... (cached) yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for memory.h... (cached) yes checking for strings.h... (cached) yes checking for inttypes.h... (cached) yes checking for stdint.h... (cached) yes checking for unistd.h... (cached) yes checking valgrind/memcheck.h usability... no checking valgrind/memcheck.h presence... no checking for valgrind/memcheck.h... no checking for shm_open in -lrt... yes checking whether to include code coverage symbols... no checking for ld used by cc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognize dependent libraries... pass_all checking for dlfcn.h... (cached) yes checking the maximum length of command line arguments... (cached) 262144 checking command to parse /usr/bin/nm -B output from cc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if cc supports -fno-rtti -fno-exceptions... yes checking for cc option to produce PIC... -fPIC checking if cc PIC flag -fPIC works... yes checking if cc static flag -static works... yes checking if cc supports -c -o file.o... yes checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... freebsd10.3 ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
checking whether the c++ linker (/usr/bin/ld) supports shared libraries... yes
checking for c++ option to produce PIC...
checking if c++ static flag works... yes
checking if c++ supports -c -o file.o... yes
checking whether the c++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... freebsd10.3 ld.so
(cached) (cached) checking how to hardcode library paths into programs... unsupported
configure: creating ./config.status
config.status: creating config.h
===> Building for pecl-APCu-5.1.8
--- apc.lo ---
--- apc_lock.lo ---
--- php_apc.lo ---
--- apc_cache.lo ---
--- apc.lo ---
/bin/sh /usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/libtool --mode=compile cc -I. -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -DPHP_ATOM_INC -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/include -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/main -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -pipe -I/usr/local/include -fstack-protector -fno-strict-aliasing -c /usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/apc.c -o apc.lo
--- apc_lock.lo ---
/bin/sh /usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/libtool --mode=compile cc -I. -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -DPHP_ATOM_INC -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/include -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/main -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -pipe -I/usr/local/include -fstack-protector -fno-strict-aliasing -c /usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/apc_lock.c -o apc_lock.lo
--- php_apc.lo ---
/bin/sh /usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/libtool --mode=compile cc -I. -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -DPHP_ATOM_INC -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/include -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/main -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -pipe -I/usr/local/include -fstack-protector -fno-strict-aliasing -c /usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/php_apc.c -o php_apc.lo
--- apc_cache.lo ---
/bin/sh /usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/libtool --mode=compile cc -I. -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -DPHP_ATOM_INC -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/include -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/main -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -pipe -I/usr/local/include -fstack-protector -fno-strict-aliasing -c /usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/apc_cache.c -o apc_cache.lo
--- apc.lo ---
mkdir .libs
cc -I. -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -DPHP_ATOM_INC -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/include -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/main -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -pipe -I/usr/local/include -fstack-protector -fno-strict-aliasing -c /usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/apc.c -fPIC -DPIC -o .libs/apc.o
--- apc_cache.lo ---
cc -I. -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -DPHP_ATOM_INC -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/include -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/main -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -pipe -I/usr/local/include -fstack-protector -fno-strict-aliasing -c /usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/apc_cache.c -fPIC -DPIC -o .libs/apc_cache.o
--- apc_lock.lo ---
cc -I. -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -DPHP_ATOM_INC -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/include -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/main -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -pipe -I/usr/local/include -fstack-protector -fno-strict-aliasing -c /usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/apc_lock.c -fPIC -DPIC -o .libs/apc_lock.o
--- php_apc.lo ---
cc -I. -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -DPHP_ATOM_INC -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/include -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/main -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -pipe -I/usr/local/include -fstack-protector -fno-strict-aliasing -c /usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/php_apc.c -fPIC -DPIC -o .libs/php_apc.o
--- apc_mmap.lo ---
/bin/sh /usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/libtool --mode=compile cc -I. -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -DPHP_ATOM_INC -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/include -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/main -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -pipe -I/usr/local/include -fstack-protector -fno-strict-aliasing -c /usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/apc_mmap.c -o apc_mmap.lo
--- apc_cache.lo ---
/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/apc_cache.c:1851:36: error: use of undeclared identifier '_tsrm_ls_cache'
if(last->mtime == key->mtime && FROM_DIFFERENT_THREAD(last)) {
^
/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/apc_cache.c:1833:50: note: expanded from macro 'FROM_DIFFERENT_THREAD'
# define FROM_DIFFERENT_THREAD(k) ((key->owner = TSRMLS_CACHE) != (k)->owner)
^
/usr/local/include/php/Zend/../TSRM/TSRM.h:180:22: note: expanded from macro 'TSRMLS_CACHE'
#define TSRMLS_CACHE _tsrm_ls_cache
^
/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/apc_cache.c:1863:19: error: use of undeclared identifier '_tsrm_ls_cache'
last->owner = TSRMLS_CACHE;
^
/usr/local/include/php/Zend/../TSRM/TSRM.h:180:22: note: expanded from macro 'TSRMLS_CACHE'
#define TSRMLS_CACHE _tsrm_ls_cache
^
2 errors generated.
*** [apc_cache.lo] Error code 1
make[1]: stopped in /usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 --- apc_mmap.lo --- cc -I. -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -DPHP_ATOM_INC -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/include -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/main -I/usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -pipe -I/usr/local/include -fstack-protector -fno-strict-aliasing -c /usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8/apc_mmap.c -fPIC -DPIC -o .libs/apc_mmap.o
make[1]: stopped in /usr/work/usr/ports/devel/pecl-APCu/work/apcu-5.1.8 ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1
Stop. make: stopped in /usr/ports/devel/pecl-APCu
@johnpupu did you ever resolve this? - I'm facing the same error
@kaybie3
- get latest apcu code from github.
- build your local ports.
- done.
Will the port be updated to fix? - I just ran into this (new dependency with nextcloud update).