Skip to content

Instantly share code, notes, and snippets.

@5outh
Created April 10, 2016 21:55
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 5outh/5b8ebca6857602015ad9a795e7602940 to your computer and use it in GitHub Desktop.
Save 5outh/5b8ebca6857602015ad9a795e7602940 to your computer and use it in GitHub Desktop.
# Note: This is after the lines restricting php 7 have been commented out in `configure`. My PHP Version output:
$ php --version
PHP 7.0.5 (cli) (built: Mar 31 2016 06:38:23) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans
$ export LIBFFI_PATH=$(brew --prefix libffi)
$ LDFLAGS=" -L${LIBFFI_PATH}/lib" PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${LIBFFI_PATH}/lib/pkgconfig" ./configure
./configure: line 624: test: /Applications/Sublime: binary operator expected
./configure: line 624: test: /Applications/Sublime: binary operator expected
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-darwin14.5.0
checking host system type... x86_64-apple-darwin14.5.0
checking target system type... x86_64-apple-darwin14.5.0
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/extensions/no-debug-non-zts-20121212
checking for PHP installed headers prefix... /usr/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... gawk
checking for mffi support... yes, shared
checking PHP version... ok
checking for pkg-config... found
checking for libffi... found 3.0.13
checking for ld used by cc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm
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 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 (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin14.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
$ make
/bin/sh /Users/Ben/MFFI/libtool --mode=compile cc -I. -I/Users/Ben/MFFI -DPHP_ATOM_INC -I/Users/Ben/MFFI/include -I/Users/Ben/MFFI/main -I/Users/Ben/MFFI -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/Cellar/libffi/3.0.13/lib/libffi-3.0.13/include -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /Users/Ben/MFFI/mffi.c -o mffi.lo
mkdir .libs
cc -I. -I/Users/Ben/MFFI -DPHP_ATOM_INC -I/Users/Ben/MFFI/include -I/Users/Ben/MFFI/main -I/Users/Ben/MFFI -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/Cellar/libffi/3.0.13/lib/libffi-3.0.13/include -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /Users/Ben/MFFI/mffi.c -fno-common -DPIC -o .libs/mffi.o
/Users/Ben/MFFI/mffi.c:109:40: error: too few arguments provided to function-like macro invocation
ZVAL_STRING(return_value, result->s);
^
/usr/include/php/Zend/zend_API.h:574:9: note: macro 'ZVAL_STRING' defined here
#define ZVAL_STRING(z, s, duplicate) do { \
^
/Users/Ben/MFFI/mffi.c:109:5: error: use of undeclared identifier 'ZVAL_STRING'
ZVAL_STRING(return_value, result->s);
^
/Users/Ben/MFFI/mffi.c:118:61: error: too few arguments provided to function-like macro invocation
ZVAL_STRINGL(return_value, "Hello!", sizeof("Hello!") - 1);
^
/usr/include/php/Zend/zend_API.h:582:9: note: macro 'ZVAL_STRINGL' defined here
#define ZVAL_STRINGL(z, s, l, duplicate) do { \
^
/Users/Ben/MFFI/mffi.c:118:4: error: use of undeclared identifier 'ZVAL_STRINGL'
ZVAL_STRINGL(return_value, "Hello!", sizeof("Hello!") - 1);
^
/Users/Ben/MFFI/mffi.c:188:39: warning: implicit declaration of function 'Z_OBJ_P' is invalid in C99 [-Wimplicit-function-declaration]
obj = php_mffi_struct_fetch_object(Z_OBJ_P(arg));
^
/Users/Ben/MFFI/mffi.c:188:39: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'zend_object *' (aka 'struct _zend_object *') [-Wint-conversion]
obj = php_mffi_struct_fetch_object(Z_OBJ_P(arg));
^~~~~~~~~~~~
./mffi_internal.h:19:67: note: passing argument to parameter 'obj' here
php_mffi_struct_object *php_mffi_struct_fetch_object(zend_object *obj);
^
/Users/Ben/MFFI/mffi.c:210:34: error: too few arguments to function call, expected 3, have 2
tmp = zend_hash_index_find(ht, 0);
~~~~~~~~~~~~~~~~~~~~ ^
/usr/include/php/Zend/zend_hash.h:166:1: note: 'zend_hash_index_find' declared here
ZEND_API int zend_hash_index_find(const HashTable *ht, ulong h, void **pData);
^
/usr/include/php/main/php_config.h:6:19: note: expanded from macro 'ZEND_API'
# define ZEND_API __attribute__ ((visibility("default")))
^
/Users/Ben/MFFI/mffi.c:216:8: warning: implicit declaration of function 'zend_hash_find_ptr' is invalid in C99 [-Wimplicit-function-declaration]
def = zend_hash_find_ptr(MFFI_G(struct_definitions), Z_STR_P(tmp));
^
/Users/Ben/MFFI/mffi.c:216:55: warning: implicit declaration of function 'Z_STR_P' is invalid in C99 [-Wimplicit-function-declaration]
def = zend_hash_find_ptr(MFFI_G(struct_definitions), Z_STR_P(tmp));
^
/Users/Ben/MFFI/mffi.c:216:6: warning: incompatible integer to pointer conversion assigning to 'php_mffi_struct_definition *' (aka 'struct _php_mffi_struct_definition *') from 'int' [-Wint-conversion]
def = zend_hash_find_ptr(MFFI_G(struct_definitions), Z_STR_P(tmp));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Ben/MFFI/mffi.c:222:34: error: too few arguments to function call, expected 3, have 2
tmp = zend_hash_index_find(ht, 1);
~~~~~~~~~~~~~~~~~~~~ ^
/usr/include/php/Zend/zend_hash.h:166:1: note: 'zend_hash_index_find' declared here
ZEND_API int zend_hash_index_find(const HashTable *ht, ulong h, void **pData);
^
/usr/include/php/main/php_config.h:6:19: note: expanded from macro 'ZEND_API'
# define ZEND_API __attribute__ ((visibility("default")))
^
/Users/Ben/MFFI/mffi.c:245:97: error: too few arguments to function call, expected 3, have 2
mffi_ce_exception = zend_register_internal_class_ex(&exception_ce, zend_exception_get_default());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/include/php/Zend/zend_API.h:277:1: note: 'zend_register_internal_class_ex' declared here
ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name TSRMLS_DC);
^
/usr/include/php/main/php_config.h:6:19: note: expanded from macro 'ZEND_API'
# define ZEND_API __attribute__ ((visibility("default")))
^
/Users/Ben/MFFI/mffi.c:318:2: warning: implicit declaration of function 'ZEND_HASH_FOREACH_PTR' is invalid in C99 [-Wimplicit-function-declaration]
ZEND_HASH_FOREACH_PTR(MFFI_G(struct_definitions), def) {
^
/Users/Ben/MFFI/mffi.c:318:56: error: expected ';' after expression
ZEND_HASH_FOREACH_PTR(MFFI_G(struct_definitions), def) {
^
;
/Users/Ben/MFFI/mffi.c:324:4: warning: implicit declaration of function 'ZEND_HASH_FOREACH_END' is invalid in C99 [-Wimplicit-function-declaration]
} ZEND_HASH_FOREACH_END();
^
7 warnings and 8 errors generated.
make: *** [mffi.lo] Error 1
Ben  MFFI   master ✔  make install  17:49:54
/bin/sh /Users/Ben/MFFI/libtool --mode=compile cc -I. -I/Users/Ben/MFFI -DPHP_ATOM_INC -I/Users/Ben/MFFI/include -I/Users/Ben/MFFI/main -I/Users/Ben/MFFI -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/Cellar/libffi/3.0.13/lib/libffi-3.0.13/include -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /Users/Ben/MFFI/mffi.c -o mffi.lo
cc -I. -I/Users/Ben/MFFI -DPHP_ATOM_INC -I/Users/Ben/MFFI/include -I/Users/Ben/MFFI/main -I/Users/Ben/MFFI -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/Cellar/libffi/3.0.13/lib/libffi-3.0.13/include -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /Users/Ben/MFFI/mffi.c -fno-common -DPIC -o .libs/mffi.o
/Users/Ben/MFFI/mffi.c:109:40: error: too few arguments provided to function-like macro invocation
ZVAL_STRING(return_value, result->s);
^
/usr/include/php/Zend/zend_API.h:574:9: note: macro 'ZVAL_STRING' defined here
#define ZVAL_STRING(z, s, duplicate) do { \
^
/Users/Ben/MFFI/mffi.c:109:5: error: use of undeclared identifier 'ZVAL_STRING'
ZVAL_STRING(return_value, result->s);
^
/Users/Ben/MFFI/mffi.c:118:61: error: too few arguments provided to function-like macro invocation
ZVAL_STRINGL(return_value, "Hello!", sizeof("Hello!") - 1);
^
/usr/include/php/Zend/zend_API.h:582:9: note: macro 'ZVAL_STRINGL' defined here
#define ZVAL_STRINGL(z, s, l, duplicate) do { \
^
/Users/Ben/MFFI/mffi.c:118:4: error: use of undeclared identifier 'ZVAL_STRINGL'
ZVAL_STRINGL(return_value, "Hello!", sizeof("Hello!") - 1);
^
/Users/Ben/MFFI/mffi.c:188:39: warning: implicit declaration of function 'Z_OBJ_P' is invalid in C99 [-Wimplicit-function-declaration]
obj = php_mffi_struct_fetch_object(Z_OBJ_P(arg));
^
/Users/Ben/MFFI/mffi.c:188:39: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'zend_object *' (aka 'struct _zend_object *') [-Wint-conversion]
obj = php_mffi_struct_fetch_object(Z_OBJ_P(arg));
^~~~~~~~~~~~
./mffi_internal.h:19:67: note: passing argument to parameter 'obj' here
php_mffi_struct_object *php_mffi_struct_fetch_object(zend_object *obj);
^
/Users/Ben/MFFI/mffi.c:210:34: error: too few arguments to function call, expected 3, have 2
tmp = zend_hash_index_find(ht, 0);
~~~~~~~~~~~~~~~~~~~~ ^
/usr/include/php/Zend/zend_hash.h:166:1: note: 'zend_hash_index_find' declared here
ZEND_API int zend_hash_index_find(const HashTable *ht, ulong h, void **pData);
^
/usr/include/php/main/php_config.h:6:19: note: expanded from macro 'ZEND_API'
# define ZEND_API __attribute__ ((visibility("default")))
^
/Users/Ben/MFFI/mffi.c:216:8: warning: implicit declaration of function 'zend_hash_find_ptr' is invalid in C99 [-Wimplicit-function-declaration]
def = zend_hash_find_ptr(MFFI_G(struct_definitions), Z_STR_P(tmp));
^
/Users/Ben/MFFI/mffi.c:216:55: warning: implicit declaration of function 'Z_STR_P' is invalid in C99 [-Wimplicit-function-declaration]
def = zend_hash_find_ptr(MFFI_G(struct_definitions), Z_STR_P(tmp));
^
/Users/Ben/MFFI/mffi.c:216:6: warning: incompatible integer to pointer conversion assigning to 'php_mffi_struct_definition *' (aka 'struct _php_mffi_struct_definition *') from 'int' [-Wint-conversion]
def = zend_hash_find_ptr(MFFI_G(struct_definitions), Z_STR_P(tmp));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Ben/MFFI/mffi.c:222:34: error: too few arguments to function call, expected 3, have 2
tmp = zend_hash_index_find(ht, 1);
~~~~~~~~~~~~~~~~~~~~ ^
/usr/include/php/Zend/zend_hash.h:166:1: note: 'zend_hash_index_find' declared here
ZEND_API int zend_hash_index_find(const HashTable *ht, ulong h, void **pData);
^
/usr/include/php/main/php_config.h:6:19: note: expanded from macro 'ZEND_API'
# define ZEND_API __attribute__ ((visibility("default")))
^
/Users/Ben/MFFI/mffi.c:245:97: error: too few arguments to function call, expected 3, have 2
mffi_ce_exception = zend_register_internal_class_ex(&exception_ce, zend_exception_get_default());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/include/php/Zend/zend_API.h:277:1: note: 'zend_register_internal_class_ex' declared here
ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name TSRMLS_DC);
^
/usr/include/php/main/php_config.h:6:19: note: expanded from macro 'ZEND_API'
# define ZEND_API __attribute__ ((visibility("default")))
^
/Users/Ben/MFFI/mffi.c:318:2: warning: implicit declaration of function 'ZEND_HASH_FOREACH_PTR' is invalid in C99 [-Wimplicit-function-declaration]
ZEND_HASH_FOREACH_PTR(MFFI_G(struct_definitions), def) {
^
/Users/Ben/MFFI/mffi.c:318:56: error: expected ';' after expression
ZEND_HASH_FOREACH_PTR(MFFI_G(struct_definitions), def) {
^
;
/Users/Ben/MFFI/mffi.c:324:4: warning: implicit declaration of function 'ZEND_HASH_FOREACH_END' is invalid in C99 [-Wimplicit-function-declaration]
} ZEND_HASH_FOREACH_END();
^
7 warnings and 8 errors generated.
make: *** [mffi.lo] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment