kitech / php-go

Write PHP extension using go/golang. Zend API wrapper for go/golang.
882 stars 108 forks source link

Trying to build on Ubuntu 16.04 error #46

Open Crzech opened 5 years ago

Crzech commented 5 years ago

Hi, I've tried to build an extension on an ubuntu 16.04 server with go version go1.12.5 linux/amd64 and php version 5.6.40-6+ubuntu16.04.1+deb.sury.org+3 but got an error. With php 7 works perfectly (I've even tried on docker) but with php5.6 when I run APP=/path/to/app PHPCFG=/usr/bin/php-config make returns:

go install ./zend
# github.com/kitech/php-go/zend
zend/zend_ini.go:123:26: could not determine kind of name for C.uint32_t
Makefile:31: recipe for target 'all' failed
make: *** [all] Error 2

should I forgotten something?

uole commented 3 years ago

C.uint32_t -> C.uint

if ZEND_ENGINE == ZEND_ENGINE_3 { this.zie.name_length = C.uint(len(name)) this.zie.value_length = C.uint(len(value)) } else { // why need +1 for php5? // if not, zend_alter_ini_entry_ex:280行会出现zend_hash_find无结果失败 this.zie.name_length = C.uint(len(name) + 1) this.zie.value_length = C.uint(len(value) + 1) }