Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS build does not work #23785

Closed
ghost opened this issue Oct 21, 2021 · 6 comments
Closed

iOS build does not work #23785

ghost opened this issue Oct 21, 2021 · 6 comments
Assignees

Comments

@ghost
Copy link

ghost commented Oct 21, 2021

Missing MacOS Brew Formulae update for Geth v1.10.11 (Xatharron)
Formulae ethereum/ethereum/ethereum

@MariusVanDerWijden
Copy link
Member

Yep OSX build seemed to fail currently https://app.travis-ci.com/github/ethereum/go-ethereum/jobs/544252625

@ghost
Copy link
Author

ghost commented Oct 22, 2021

Yep, seems to be failing on building for iOS.

I do not know why it would even attempt to build with an iOS target as I do not imagine anyone is running Geth on a mobile phone, because it is not possible to keep up with the blockchain without very high IOPS, well beyond what any mobile phone is capable, perhaps in the distant future.

It maybe be an easy fix of just adding this switch "-scheme macOS" to xcodebuild arguments or changing the the build config in a similar way if a config file is being used instead of switches. I am guessing the "go run build/ci.go xcode -signer IOS_SIGNING_KEY -signify SIGNIFY_KEY -deploy trunk -upload gethstore/builds" command wraps xcodebuild.

@ghost
Copy link
Author

ghost commented Oct 22, 2021

[this needs the help of someone with editor rights to the build config]

I did some research on this error and it seems this issue started for many people after Go v1.16 was released. In many cases, some were able to workaround the issue by reverting to Go v1.15. The root cause of the issues is related to the passing of linker and/or complier flags (see reference links below).

The solution to the problem without reverting to prior versions of Go, is to change the Go install -mod flag to "-mod=mod". The settings for "osx" in the config file for the builder being discussed is currently (as of 2021/10/22 17:17UTC) setting the Go install -mod flag to "-mod=readonly" when it should be "-mod=mod".

I believe the first thing to try is change this -mod flag to "-mod=mod". This can be done by setting this ENV variable PRIOR to the osx Go install statement in the build config file on line 286. To something of the effect:

"export CGO_CFLAGS='-mod=mod'",

(Go experts please correct any syntax errors, although I believe the above is correct)

So just insert the above code line right before line 286 in the build config, save, and restart the pipeline.
It should resolve the issue.

Ref:
https://app.travis-ci.com/github/ethereum/go-ethereum/jobs/544252625/config (line 286)
golang/go#44129 (Lord-Y June 4th)
golang/go#23749 (general discussion)

@karalabe
Copy link
Member

The original issue of missing brew entry for v1.10.11 was fixed. I'll leave it open for the iOS issue.

@fjl fjl changed the title Missing MacOS Brew Formulae update for Geth v1.10.11 (Xatharron) iOS build does not work Oct 30, 2021
@fjl
Copy link
Contributor

fjl commented Oct 30, 2021

The iOS build is not related to homebrew at all. It is failing because there is a problem with go.mod & gomobile:

>>> /Users/travis/gopath/src/github.com/ethereum/go-ethereum/build/bin/gomobile bind -ldflags -s -w --target ios -v github.com/ethereum/go-ethereum/mobile

unable to import bind: [-: missing go.sum entry for module providing package golang.org/x/mobile/bind; to add:

	go mod download golang.org/x/mobile]

unable to import bind: [-: missing go.sum entry for module providing package golang.org/x/mobile/bind; to add:

	go mod download golang.org/x/mobile]

unable to import bind/objc: [-: missing go.sum entry for module providing package golang.org/x/mobile/bind/objc; to add:

	go mod download golang.org/x/mobile]

@karalabe
Copy link
Member

karalabe commented Feb 3, 2023

Android and iOS support dropped via #26599.

@karalabe karalabe closed this as completed Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants