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?
to your account
$ go version
go version go1.18.2 darwin/amd64
This bug is in cmd/gomobile, and is reproducible with the latest commit on that.
$ go env
I was trying to build an ios framework with gomobile that also includes C dependencies. I need to set CGO_CXXFLAGS and CGO_LDFLAGS to get the build working.
CGO_ENABLED=1 CGO_LDFLAGS="<flags>" CGO_CXXFLAGS="<flags>" gomobile bind -target ios/arm64,iossimulator/amd64 -iosversion 9.3.0 ./cmd/app
gomobile should forward the values of CGO_CXXFLAGS and CGO_LDFLAGS to rest of the build process (gobind, go build, etc.) This does happen when building for Android, but not when targeting ios.
The CGO_CXXFLAGS, CGO_LDFLAGS, etc. variables get overwritten by values that are required to introduce system dependencies for ios.
This was causing my build to break.
Ideally, these new values introduced by gomobile should be appended to values already in the environment. I tried out this change that resolves this issue.
The text was updated successfully, but these errors were encountered:
Can you please add more details to the bug and use the bug format. If this is not a bug, please see below.
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
For asking questions, see:
The official Q&A channel for Google's Go Programming Language on Stack Overflow
Stack Overflow with questions tagged "go" or "golang" (complementing the Go Collective mentioned before)
The Go Forum, a web-based forum
Gophers Slack, use the invite app for access. The #general channel is a good starting point.
Go Community on Hashnode with questions and posts tagged with "go"
The golang-nuts mailing list
Subreddit for Go
IRC channel #go-nuts on Libera
Sorry, something went wrong.
Sorry, I was not aware of the bug template. Updated my post above with more details.
@hyangah can you give this a look?
No branches or pull requests