deuill / go-php

PHP bindings for the Go programming language (Golang)
MIT License
925 stars 105 forks source link

error: unknown type name 'zend_string' #40

Closed vus520 closed 7 years ago

vus520 commented 7 years ago
$ go get github.com/deuill/go-php
# github.com/deuill/go-php
In file included from ../../../deuill/go-php/engine.go:14:
In file included from include/receiver.h:15:
include/php7/_receiver.h:12:34: error: unknown type name 'zend_string'; did you mean 'zend_stream'?
static int _receiver_method_call(zend_string *method, zend_object *object, INTERNAL_FUNCTION_PARAMETERS);
                                 ^~~~~~~~~~~
                                 zend_stream
/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here
} zend_stream;
  ^
In file included from ../../../deuill/go-php/engine.go:14:
In file included from include/receiver.h:15:
include/php7/_receiver.h:13:66: error: unknown type name 'zend_string'; did you mean 'zend_stream'?
static zend_function *_receiver_method_get(zend_object **object, zend_string *name, const zval *key);
                                                                 ^~~~~~~~~~~
                                                                 zend_stream
/usr/include/php/Zend/zend_stream.h:60:3: note: 'zend_stream' declared here
} zend_stream;
  ^
2 errors generated.
$ which php
/usr/local/bin/php

$ which phpize
/usr/bin/phpize

$ which php-config
/usr/local/bin/php-config

$ uname -a
Darwin bogon 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar  3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64
deuill commented 7 years ago

Hi, thanks for the report. Could you add your PHP version here? There may be issues against newer versions of PHP.

Also, there are possibly unresolved issues with building on Mac OS X (mainly due to PHP not having pre-built packages for php-enbed), look here.

vus520 commented 7 years ago
$ php -v
PHP 7.1.4 (cli) (built: Apr 14 2017 15:02:16) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
deuill commented 7 years ago

It's possible that this is related to issues with building against Mac OS X, please take a look at the link posted above and add any information there. If this appears to be a different issue, ping this ticket and I'll reopen in.