Open sergeycherepanov opened 6 years ago
I think maybe you should use php 5.6 for developing
Hi @php-cpm
I tried with 5.6 but receive same error
PHPCFG=/usr/local/bin/php-config make
go install ./zend
go build github.com/kitech/php-go/zend: invalid flag in #cgo LDFLAGS: -undefined
make: *** [all] Error 1
php version
PHP 5.6.33 (cli) (built: Apr 23 2018 16:17:10)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans
@SergeyCherepanov How do you make out? Did you ever come up with a solution? @php-cpm are you suggesting that building with php 5.6 will also work for a php7 codebase?
same question mac php7.2
PHPCFG=/usr/local/bin/php-config make go install ./zend go build github.com/kitech/php-go/zend: invalid flag in #cgo LDFLAGS: -undefined make: *** [all] Error 1
@beatscode It works under linux, currently it's enough for me.
go install ./zend go build github.com/kitech/php-go/zend: invalid flag in #cgo LDFLAGS: -undefined make: *** [all] Error 1
go高版本cgo编译问题:
go 1.8.7, 1.9.4, and 1.10以上版本需要在Makefile加上export CGO_LDFLAGS_ALLOW=.
`
export CGO_LDFLAGS_ALLOW=.
export CGO_LDFLAGS := $(LDFLAGS) $(CGO_LDFLAGS)
`
export CGO_LDFLAGS_ALLOW=.* export CGO_LDFLAGS := $(LDFLAGS) $(CGO_LDFLAGS)
CGO_LDFLAGS_ALLOW=.* go buildgithub.com/kitech/php-go/zend
In file included from ./goapi.go:5: ./array.h:1:10: fatal error: 'zend_API.h' file not found
include
^
~~~ 1 error generated.
Hi, I can't build it on my mac (10.13.4)
make failed with:
go version
php version
What I do wrong?