Valet-plus: Bug: valet use 7.3 apcu geoip error

Created on 5 Jul 2020  路  2Comments  路  Source: weprovide/valet-plus

  • [x] I've checked the issue queue and could not find anything similar to my bug.
  • [x] I'm on the latest version of valet-plus (valet --version): <Valet-Plus-Version>
  • [x] I've run valet fix and valet install after updating and before submitting my issue/feature.

What is the problem?

valet use 7.3

causes error

In Pecl.php line 146:

Could not find installation path for: geoip

PHP Warning: PHP Startup: Unable to load dynamic library 'apcu.so' (tried: /usr/local/lib/php/pecl/20160303/apcu.so (dlopen(/usr/local/lib/php/pecl/20160303/apcu.so, 9): Symbol not found: __zval_ptr
_dtor
Referenced from: /usr/local/lib/php/pecl/20160303/apcu.so
Expected in: flat namespace
in /usr/local/lib/php/pecl/20160303/apcu.so), /usr/local/lib/php/pecl/20160303/apcu.so.so (dlopen(/usr/local/lib/php/pecl/20160303/apcu.so.so, 9): image not found)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'apcu.so' (tried: /usr/local/lib/php/pecl/20160303/apcu.so (dlopen(/usr/local/lib/php/pecl/20160303/apcu.so, 9): Symbol not found: __zval_ptr_dtor
Referenced from: /usr/local/lib/php/pecl/20160303/apcu.so
Expected in: flat namespace
in /usr/local/lib/php/pecl/20160303/apcu.so), /usr/local/lib/php/pecl/20160303/apcu.so.so (dlopen(/usr/local/lib/php/pecl/20160303/apcu.so.so, 9): image not found)) in Unknown on line 0
downloading geoip-1.0.8.tgz ...
Starting to download geoip-1.0.8.tgz (10,061 bytes)
.....done: 10,061 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version: 20170718
Zend Module Api No: 20170718
Zend Extension Api No: 320170718
building in /private/tmp/pear/temp/pear-build-ravfNv8Zs/geoip-1.0.8
running: /private/tmp/pear/temp/geoip/configure --with-php-config=/usr/local/opt/[email protected]/bin/php-config
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
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... cc -E
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... x86_64-apple-darwin19.5.0
checking host system type... x86_64-apple-darwin19.5.0
checking target system type... x86_64-apple-darwin19.5.0
checking for PHP prefix... /usr/local/Cellar/[email protected]/7.2.31_1
checking for PHP includes... -I/usr/local/Cellar/[email protected]/7.2.31_1/include/php -I/usr/local/Cellar/[email protected]/7.2.31_1/include/php/main -I/usr/local/Cellar/[email protected]/7.2.31_1/include/php/
TSRM -I/usr/local/Cellar/[email protected]/7.2.31_1/include/php/Zend -I/usr/local/Cellar/[email protected]/7.2.31_1/include/php/ext -I/usr/local/Cellar/[email protected]/7.2.31_1/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/Cellar/[email protected]/7.2.31_1/pecl/20170718
checking for PHP installed headers prefix... /usr/local/Cellar/[email protected]/7.2.31_1/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for geoip support... yes, shared
checking for geoip files in default path... found in /usr/local
checking for GeoIP_open in -lGeoIP... yes
checking for GeoIP_setup_custom_directory in -lGeoIP... yes
checking for GeoIP_set_charset in -lGeoIP... yes
checking for GeoIP_continent_by_id in -lGeoIP... yes
checking for LGPL compatible GeoIP libs... expr: not a decimal number: 'dummy'
cannot detect
checking library features to determine version (not acurate)... found 1004005
checking for ld used by cc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for /Library/Developer/CommandLineTools/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 ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 196608
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 for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin19.5.0 dyld
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
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/temp/pear-build-ravfNv8Zs/geoip-1.0.8/libtool --mode=compile cc -I. -I/private/tmp/pear/temp/geoip -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-ravfNv8Zs/geoip-1.0.8/
include -I/private/tmp/pear/temp/pear-build-ravfNv8Zs/geoip-1.0.8/main -I/private/tmp/pear/temp/geoip -I/usr/local/Cellar/[email protected]/7.2.31_1/include/php -I/usr/local/Cellar/[email protected]/7.2.31_1
/include/php/main -I/usr/local/Cellar/[email protected]/7.2.31_1/include/php/TSRM -I/usr/local/Cellar/[email protected]/7.2.31_1/include/php/Zend -I/usr/local/Cellar/[email protected]/7.2.31_1/include/php/ext -I
/usr/local/Cellar/[email protected]/7.2.31_1/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/geoip/geoip.c -o geoip.lo
mkdir .libs
cc -I. -I/private/tmp/pear/temp/geoip -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-ravfNv8Zs/geoip-1.0.8/include -I/private/tmp/pear/temp/pear-build-ravfNv8Zs/geoip-1.0.8/main -I/private/tmp/p
ear/temp/geoip -I/usr/local/Cellar/[email protected]/7.2.31_1/include/php -I/usr/local/Cellar/[email protected]/7.2.31_1/include/php/main -I/usr/local/Cellar/[email protected]/7.2.31_1/include/php/TSRM -I/usr/lo
cal/Cellar/[email protected]/7.2.31_1/include/php/Zend -I/usr/local/Cellar/[email protected]/7.2.31_1/include/php/ext -I/usr/local/Cellar/[email protected]/7.2.31_1/include/php/ext/date/lib -I/usr/local/include
-DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/geoip/geoip.c -fno-common -DPIC -o .libs/geoip.o
/private/tmp/pear/temp/geoip/geoip.c:118:2: warning: implicit declaration of function '_GeoIP_setup_dbfilename' is invalid in C99 [-Wimplicit-function-declaration]
_GeoIP_setup_dbfilename();
^
/private/tmp/pear/temp/geoip/geoip.c:220:43: error: too many arguments provided to function-like macro invocation
RETURN_STRING(GeoIPDBFileName[edition], 1);
^
/usr/local/Cellar/[email protected]/7.2.31_1/include/php/Zend/zend_API.h:661:9: note: macro 'RETURN_STRING' defined here
#define RETURN_STRING(s) { RETVAL_STRING(s); return; }
^
/private/tmp/pear/temp/geoip/geoip.c:220:3: error: use of undeclared identifier 'RETURN_STRING'
RETURN_STRING(GeoIPDBFileName[edition], 1);
^
/private/tmp/pear/temp/geoip/geoip.c:236:4: warning: implicit declaration of function 'ALLOC_INIT_ZVAL' is invalid in C99 [-Wimplicit-function-declaration]
ALLOC_INIT_ZVAL(row);
^
/private/tmp/pear/temp/geoip/geoip.c:240:72: error: too many arguments provided to function-like macro invocation
add_assoc_string(row, "description", (char )GeoIPDBDescription[i], 1);
^
/usr/local/Cellar/[email protected]/7.2.31_1/include/php/Zend/zend_API.h:424:9: note: macro 'add_assoc_string' defined here
#define add_assoc_string(__arg, __key, __str) add_assoc_string_ex(__arg, __key, strlen(__key), __str)
^
/private/tmp/pear/temp/geoip/geoip.c:240:4: error: use of undeclared identifier 'add_assoc_string'
add_assoc_string(row, "description", (char *)GeoIPDBDescription[i], 1);
^
/private/tmp/pear/temp/geoip/geoip.c:242:59: error: too many arguments provided to function-like macro invocation
add_assoc_string(row, "filename", GeoIPDBFileName[i], 1);
^
/usr/local/Cellar/[email protected]/7.2.31_1/include/php/Zend/zend_API.h:424:9: note: macro 'add_assoc_string' defined here
#define add_assoc_string(__arg, __key, __str) add_assoc_string_ex(__arg, __key, strlen(__key), __str)
^
/private/tmp/pear/temp/geoip/geoip.c:242:5: error: use of undeclared identifier 'add_assoc_string'
add_assoc_string(row, "filename", GeoIPDBFileName[i], 1);
^
/private/tmp/pear/temp/geoip/geoip.c:282:25: error: too many arguments provided to function-like macro invocation
RETVAL_STRING(db_info, 1);
^
/usr/local/Cellar/[email protected]/7.2.31_1/include/php/Zend/zend_API.h:643:9: note: macro 'RETVAL_STRING' defined here
#define RETVAL_STRING(s) ZVAL_STRING(return_value, s)
^
/private/tmp/pear/temp/geoip/geoip.c:282:2: error: use of undeclared identifier 'RETVAL_STRING'
RETVAL_STRING(db_info, 1);
^
In file included from /private/tmp/pear/temp/geoip/geoip.c:316:
/private/tmp/pear/temp/geoip/geoip.def:20:1: error: too many arguments provided to function-like macro invocation
GEOIPDEF(geoip_country_code_by_name, GeoIP_country_code_by_name, GEOIP_COUNTRY_EDITION)
^
/private/tmp/pear/temp/geoip/geoip.c:313:37: note: expanded from macro 'GEOIPDEF'
RETURN_STRING((char
)return_code, 1); \
^
/usr/local/Cellar/[email protected]/7.2.31_1/include/php/Zend/zend_API.h:661:9: note: macro 'RETURN_STRING' defined here
#define RETURN_STRING(s) { RETVAL_STRING(s); return; }
^
In file included from /private/tmp/pear/temp/geoip/geoip.c:316:
/private/tmp/pear/temp/geoip/geoip.def:20:1: error: use of undeclared identifier 'RETURN_STRING'
GEOIPDEF(geoip_country_code_by_name, GeoIP_country_code_by_name, GEOIP_COUNTRY_EDITION)
^
/private/tmp/pear/temp/geoip/geoip.c:313:3: note: expanded from macro 'GEOIPDEF'
RETURN_STRING((char)return_code, 1); \
^
In file included from /private/tmp/pear/temp/geoip/geoip.c:316:
/private/tmp/pear/temp/geoip/geoip.def:21:1: error: too many arguments provided to function-like macro invocation
GEOIPDEF(geoip_country_code3_by_name, GeoIP_country_code3_by_name, GEOIP_COUNTRY_EDITION)
^
/private/tmp/pear/temp/geoip/geoip.c:313:37: note: expanded from macro 'GEOIPDEF'
RETURN_STRING((char
)return_code, 1); \
^
/usr/local/Cellar/[email protected]/7.2.31_1/include/php/Zend/zend_API.h:661:9: note: macro 'RETURN_STRING' defined here
#define RETURN_STRING(s) { RETVAL_STRING(s); return; }
^
In file included from /private/tmp/pear/temp/geoip/geoip.c:316:
/private/tmp/pear/temp/geoip/geoip.def:21:1: error: use of undeclared identifier 'RETURN_STRING'
GEOIPDEF(geoip_country_code3_by_name, GeoIP_country_code3_by_name, GEOIP_COUNTRY_EDITION)
^
/private/tmp/pear/temp/geoip/geoip.c:313:3: note: expanded from macro 'GEOIPDEF'
RETURN_STRING((char)return_code, 1); \
^
In file included from /private/tmp/pear/temp/geoip/geoip.c:316:
/private/tmp/pear/temp/geoip/geoip.def:22:1: error: too many arguments provided to function-like macro invocation
GEOIPDEF(geoip_country_name_by_name, GeoIP_country_name_by_name, GEOIP_COUNTRY_EDITION)
^
/private/tmp/pear/temp/geoip/geoip.c:313:37: note: expanded from macro 'GEOIPDEF'
RETURN_STRING((char
)return_code, 1); \
^
/usr/local/Cellar/[email protected]/7.2.31_1/include/php/Zend/zend_API.h:661:9: note: macro 'RETURN_STRING' defined here
#define RETURN_STRING(s) { RETVAL_STRING(s); return; }
^
In file included from /private/tmp/pear/temp/geoip/geoip.c:316:
/private/tmp/pear/temp/geoip/geoip.def:22:1: error: use of undeclared identifier 'RETURN_STRING'
GEOIPDEF(geoip_country_name_by_name, GeoIP_country_name_by_name, GEOIP_COUNTRY_EDITION)
^
/private/tmp/pear/temp/geoip/geoip.c:313:3: note: expanded from macro 'GEOIPDEF'
RETURN_STRING((char)return_code, 1); \
^
/private/tmp/pear/temp/geoip/geoip.c:346:53: error: too many arguments provided to function-like macro invocation
RETURN_STRING((char *)GeoIP_country_continent[id], 1);
^
/usr/local/Cellar/[email protected]/7.2.31_1/include/php/Zend/zend_API.h:661:9: note: macro 'RETURN_STRING' defined here
#define RETURN_STRING(s) { RETVAL_STRING(s); return; }
^
/private/tmp/pear/temp/geoip/geoip.c:346:2: error: use of undeclared identifier 'RETURN_STRING'
RETURN_STRING((char *)GeoIP_country_continent[id], 1);
^
/private/tmp/pear/temp/geoip/geoip.c:376:21: error: too many arguments provided to function-like macro invocation
RETVAL_STRING(org, 1);
^
/usr/local/Cellar/[email protected]/7.2.31_1/include/php/Zend/zend_API.h:643:9: note: macro 'RETVAL_STRING' defined here
#define RETVAL_STRING(s) ZVAL_STRING(return_value, s)
^
/private/tmp/pear/temp/geoip/geoip.c:376:2: error: use of undeclared identifier 'RETVAL_STRING'
RETVAL_STRING(org, 1);
^
/private/tmp/pear/temp/geoip/geoip.c:415:109: error: too many arguments provided to function-like macro invocation
add_assoc_string(return_value, "continent_code", (gir->continent_code == NULL) ? "" : gir->continent_code, 1);
^
/usr/local/Cellar/[email protected]/7.2.31_1/include/php/Zend/zend_API.h:424:9: note: macro 'add_assoc_string' defined here
#define add_assoc_string(__arg, __key, __str) add_assoc_string_ex(__arg, __key, strlen(__key), __str)
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
make: *
* [geoip.lo] Error 1
ERROR: `make' failed

Bug Needs review

Most helpful comment

@rav-redchamps I had the same issue, there was a couple of things wrong which needed correcting.

My php.ini file had a duplicate extension="apcu.so" which needed removing to prevent the initial PHP warnings.

For geoip I needed to install version 1.1.1 rather than 1.0.8 by running:

pecl config-set preferred_state beta
pecl install geoip

All 2 comments

@rav-redchamps I had the same issue, there was a couple of things wrong which needed correcting.

My php.ini file had a duplicate extension="apcu.so" which needed removing to prevent the initial PHP warnings.

For geoip I needed to install version 1.1.1 rather than 1.0.8 by running:

pecl config-set preferred_state beta
pecl install geoip

@adamj88 This works thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eclectic-coding picture eclectic-coding  路  31Comments

kupoback picture kupoback  路  22Comments

dwillitzer picture dwillitzer  路  18Comments

regularlabs picture regularlabs  路  19Comments

sirjonathan picture sirjonathan  路  14Comments