Skip to content

Instantly share code, notes, and snippets.

@koriym
Created January 12, 2019 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koriym/a4e0921e69d874b3e374cfffce1a1a5d to your computer and use it in GitHub Desktop.
Save koriym/a4e0921e69d874b3e374cfffce1a1a5d to your computer and use it in GitHub Desktop.
V8JS compile error
sudo pecl install v8js
downloading v8js-2.1.0.tgz ...
Starting to download v8js-2.1.0.tgz (101,553 bytes)
.......................done: 101,553 bytes
28 source files, building
running: phpize
Configuring for:
PHP Api Version:         20170718
Zend Module Api No:      20170718
Zend Extension Api No:   320170718
Please provide the installation prefix of libv8 [autodetect] : 
building in /private/tmp/pear/temp/pear-build-rootAf9LfU/v8js-2.1.0
running: /private/tmp/pear/temp/v8js/configure --with-php-config=/usr/local/opt/php@7.2/bin/php-config --with-v8js
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-darwin18.2.0
checking host system type... x86_64-apple-darwin18.2.0
checking target system type... x86_64-apple-darwin18.2.0
checking for PHP prefix... /usr/local/Cellar/php@7.2/7.2.14
checking for PHP includes... -I/usr/local/Cellar/php@7.2/7.2.14/include/php -I/usr/local/Cellar/php@7.2/7.2.14/include/php/main -I/usr/local/Cellar/php@7.2/7.2.14/include/php/TSRM -I/usr/local/Cellar/php@7.2/7.2.14/include/php/Zend -I/usr/local/Cellar/php@7.2/7.2.14/include/php/ext -I/usr/local/Cellar/php@7.2/7.2.14/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/Cellar/php@7.2/7.2.14/pecl/20170718
checking for PHP installed headers prefix... /usr/local/Cellar/php@7.2/7.2.14/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 V8 Javascript Engine... yes, shared
checking for V8 files in default path... found in /usr/local
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for C standard version... c++11
checking how to allow c++11 narrowing... -Wno-c++11-narrowing
checking for libv8_libplatform... found
checking for V8 version... 7.1.302.28
checking for natives_blob.bin... not found
checking for snapshot_blob.bin... not found
checking for v8::ArrayBuffer::Allocator::NewDefaultAllocator... yes
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 how to run the C++ preprocessor... g++ -E
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... darwin18.2.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
checking for ld used by g++... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common
checking if g++ PIC flag -fno-common works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin18.2.0 dyld
(cached) (cached) checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/temp/pear-build-rootAf9LfU/v8js-2.1.0/libtool --mode=compile g++ -Wno-c++11-narrowing -std=c++11 -I. -I/private/tmp/pear/temp/v8js -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootAf9LfU/v8js-2.1.0/include -I/private/tmp/pear/temp/pear-build-rootAf9LfU/v8js-2.1.0/main -I/private/tmp/pear/temp/v8js -I/usr/local/Cellar/php@7.2/7.2.14/include/php -I/usr/local/Cellar/php@7.2/7.2.14/include/php/main -I/usr/local/Cellar/php@7.2/7.2.14/include/php/TSRM -I/usr/local/Cellar/php@7.2/7.2.14/include/php/Zend -I/usr/local/Cellar/php@7.2/7.2.14/include/php/ext -I/usr/local/Cellar/php@7.2/7.2.14/include/php/ext/date/lib -I/usr/local/include -I/usr/local  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/pear/temp/v8js/v8js_array_access.cc -o v8js_array_access.lo
mkdir .libs
 g++ -Wno-c++11-narrowing -std=c++11 -I. -I/private/tmp/pear/temp/v8js -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootAf9LfU/v8js-2.1.0/include -I/private/tmp/pear/temp/pear-build-rootAf9LfU/v8js-2.1.0/main -I/private/tmp/pear/temp/v8js -I/usr/local/Cellar/php@7.2/7.2.14/include/php -I/usr/local/Cellar/php@7.2/7.2.14/include/php/main -I/usr/local/Cellar/php@7.2/7.2.14/include/php/TSRM -I/usr/local/Cellar/php@7.2/7.2.14/include/php/Zend -I/usr/local/Cellar/php@7.2/7.2.14/include/php/ext -I/usr/local/Cellar/php@7.2/7.2.14/include/php/ext/date/lib -I/usr/local/include -I/usr/local -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/v8js/v8js_array_access.cc  -fno-common -DPIC -o .libs/v8js_array_access.o
In file included from /private/tmp/pear/temp/v8js/v8js_array_access.cc:17:
In file included from /private/tmp/pear/temp/v8js/php_v8js_macros.h:42:
In file included from /usr/local/Cellar/php@7.2/7.2.14/include/php/main/php.h:35:
In file included from /usr/local/Cellar/php@7.2/7.2.14/include/php/Zend/zend.h:328:
/usr/local/Cellar/php@7.2/7.2.14/include/php/Zend/zend_operators.h:114:18: warning: 'finite' is deprecated: first deprecated in macOS 10.9 - Use `isfinite((double)x)` instead. [-Wdeprecated-declarations]
        if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
                        ^
/usr/local/Cellar/php@7.2/7.2.14/include/php/main/php_config.h:2625:24: note: expanded from macro 'zend_finite'
#define zend_finite(a) finite(a)
                       ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated here
extern int finite(double)
           ^
In file included from /private/tmp/pear/temp/v8js/v8js_array_access.cc:17:
In file included from /private/tmp/pear/temp/v8js/php_v8js_macros.h:42:
In file included from /usr/local/Cellar/php@7.2/7.2.14/include/php/main/php.h:35:
In file included from /usr/local/Cellar/php@7.2/7.2.14/include/php/Zend/zend.h:328:
/usr/local/Cellar/php@7.2/7.2.14/include/php/Zend/zend_operators.h:125:18: warning: 'finite' is deprecated: first deprecated in macOS 10.9 - Use `isfinite((double)x)` instead. [-Wdeprecated-declarations]
        if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
                        ^
/usr/local/Cellar/php@7.2/7.2.14/include/php/main/php_config.h:2625:24: note: expanded from macro 'zend_finite'
#define zend_finite(a) finite(a)
                       ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated here
extern int finite(double)
           ^
/private/tmp/pear/temp/v8js/v8js_array_access.cc:226:24: error: no matching constructor for initialization of 'v8::String::Utf8Value'
        v8::String::Utf8Value cstr(property);
                              ^    ~~~~~~~~
/usr/local/include/v8.h:2890:5: note: candidate constructor not viable: no known conversion from 'v8::Local<v8::String>' to 'const v8::String::Utf8Value' for 1st argument
    Utf8Value(const Utf8Value&) = delete;
    ^
/usr/local/include/v8.h:2883:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    Utf8Value(Isolate* isolate, Local<v8::Value> obj);
    ^
/private/tmp/pear/temp/v8js/v8js_array_access.cc:246:26: error: no matching member function for call to 'ToObject'
                ret_value = prototype->ToObject()->Get(property);
                            ~~~~~~~~~~~^~~~~~~~
/usr/local/include/v8.h:2406:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
                                           ^
/usr/local/include/v8.h:2420:35: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                    Local<Object> ToObject(Isolate* isolate) const);
                                  ^
2 warnings and 2 errors generated.
make: *** [v8js_array_access.lo] Error 1
ERROR: `make' failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment