go-sdk icon indicating copy to clipboard operation
go-sdk copied to clipboard

go mobile 编译 iOS 报错

Open 88250 opened this issue 1 year ago • 5 comments

v7.23.0

启用了 cgo,编译命令:

go build -tags fts5 -v -ldflags -s -w -buildmode=c-archive -o

报错:

/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/elastic/[email protected]/providers/darwin/machineid_darwin.go:43:14: could not determine kind of name for C.gethostuuid

88250 avatar Sep 29 '24 03:09 88250

@88250 可能是头文件没有被正确声明?

bachue avatar Sep 30 '24 07:09 bachue

你好,我这边需要编译 iOS 应用,但是依赖库的这个文件代码里面命中的是 darwin,之前用旧版本可以正常编译的。

---原始邮件--- 发件人: "Bachue @.> 发送时间: 2024年9月30日(周一) 下午3:28 收件人: @.>; 抄送: @.@.>; 主题: Re: [qiniu/go-sdk] go mobile 编译 iOS 报错 (Issue #147)

@88250 可能是头文件没有被正确声明?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

88250 avatar Sep 30 '24 08:09 88250

@88250 看起来是新引入的库对 gomobile 不支持,后续我们考虑下处理方式

github.com/elastic/go-sysinfo

YangSen-qn avatar Oct 09 '24 08:10 YangSen-qn

收到,谢谢。

88250 avatar Oct 09 '24 08:10 88250

Fixed in PR #156

miclle avatar Dec 27 '24 08:12 miclle