ipfs-shipyard / gomobile-ipfs

IPFS and libp2p on Mobile, with Gomobile
Other
319 stars 62 forks source link

I can't make build_core.android on apple M1 #91

Closed beilvla closed 2 years ago

beilvla commented 2 years ago

M1Pro export GOROOT=/usr/local/go export GOPATH=/Users/ym/gopath export PATH=$PATH:$GOROOT/bin:$GOPATH/bin export ANDROID_HOME=/Users/ym/Library/Android/sdk export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle export PATH=$PATH:$ANDROID_NDK_HOME

ym@ymdeMacBook-Pro ~ % go version go version go1.17.6 darwin/arm64 ym@ymdeMacBook-Pro ~ % gomobile Gomobile is a tool for building and running mobile apps written in Go.

To install:

$ go get golang.org/x/mobile/cmd/gomobile
$ gomobile init

At least Go 1.10 is required. For detailed instructions, see https://golang.org/wiki/Mobile.

Usage:

gomobile command [arguments]

Commands:

bind        build a library for Android and iOS
build       compile android APK and iOS app
clean       remove object files and cached gomobile files
init        build OpenAL for Android
install     compile android APK and install on device
version     print version

Use 'gomobile help [command]' for more information about that command.

ym@ymdeMacBook-Pro ~ % cd /Users/ym/Desktop/gomobile-ipfs-master/packages ym@ymdeMacBook-Pro packages % make build_core.android fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git

  Go: installing modules        

go mod download go install golang.org/x/mobile/cmd/gomobile go install golang.org/x/mobile/cmd/gobind go run golang.org/x/mobile/cmd/gomobile init -v panic: unsupported GOARCH: arm64

goroutine 1 [running]: main.archNDK(...) /Users/ym/go/pkg/mod/github.com/aeddi/mobile@v0.0.3-silicon/cmd/gomobile/env.go:339 main.(*ndkToolchain).Path(0x14000199c90, {0x140000262d0, 0x28}, {0x103050931, 0x5}) /Users/ym/go/pkg/mod/github.com/aeddi/mobile@v0.0.3-silicon/cmd/gomobile/env.go:368 +0x78 main.envInit() /Users/ym/go/pkg/mod/github.com/aeddi/mobile@v0.0.3-silicon/cmd/gomobile/env.go:142 +0x2f0 main.runInit(0x10336c480) /Users/ym/go/pkg/mod/github.com/aeddi/mobile@v0.0.3-silicon/cmd/gomobile/init.go:95 +0x558 main.main() /Users/ym/go/pkg/mod/github.com/aeddi/mobile@v0.0.3-silicon/cmd/gomobile/main.go:73 +0x4b0 exit status 2 make: *** [go] Error 1 ym@ymdeMacBook-Pro packages %

Can the writer help me to have a look

ScienceNoBorders commented 2 years ago

How do I use core to create IPFS nodes

q-Mony commented 2 years ago

How do I use core to create IPFS nodes

不清楚

ScienceNoBorders commented 2 years ago

@qm921 你也在搞这个吗,我已经把Android的aar包编译好了,但是不知道怎么创建移动端的IPFS节点

q-Mony commented 2 years ago

@qm921 你也在搞这个吗,我已经把Android的aar包编译好了,但是不知道怎么创建移动端的IPFS节点

你的也是m1的macbook么? 我不清楚怎么创建节点

ScienceNoBorders commented 2 years ago

你的也是m1的macbook么? 我不清楚怎么创建节点

我不是m1的,不过有了gomobile后还需要一个gobind才行

q-Mony commented 2 years ago

你的也是m1的macbook么? 我不清楚怎么创建节点

我不是m1的,不过有了gomobile后还需要一个gobind才行

不清楚

n0izn0iz commented 2 years ago

if you use this branch of gomobile: https://github.com/aeddi/mobile/tree/v0.0.3-silicon it might build go mod edit -replace golang.org/x/mobile=github.com/aeddi/mobile@v0.0.3-silicon

also I don't think any maintainers of this repo speak chinese so, I think, if you include an english translation (google trad seems fine for basic stuff) you might get better support

如果您使用 gomobile 的这个分支:https://github.com/aeddi/mobile/tree/v0.0.3-silicon 它可能会构建

我也不认为这个存储库的任何维护者会说中文,所以我认为,如果你包含英文翻译(谷歌繁体似乎适合基本的东西)你可能会得到更好的支持

q-Mony commented 2 years ago

if you use this branch of gomobile: https://github.com/aeddi/mobile/tree/v0.0.3-silicon it might build go mod edit -replace golang.org/x/mobile=github.com/aeddi/mobile@v0.0.3-silicon

also I don't think any maintainers of this repo speak chinese so, I think, if you include an english translation (google trad seems fine for basic stuff) you might get better support

如果您使用 gomobile 的这个分支:https://github.com/aeddi/mobile/tree/v0.0.3-silicon 它可能会构建

我也不认为这个存储库的任何维护者会说中文,所以我认为,如果你包含英文翻译(谷歌繁体似乎适合基本的东西)你可能会得到更好的支持

好的 谢谢