-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
compile error, gomobile bind hello example with -target=ios #31015
Comments
I also came here to report |
Seeing this as well with yesterday's release of Xcode 10.2. For now I have just disabled the warning: diff --git a/cmd/gomobile/env.go b/cmd/gomobile/env.go
index 31878bb..6a8c32c 100644
--- a/cmd/gomobile/env.go
+++ b/cmd/gomobile/env.go
@@ -129,6 +129,7 @@ func envInit() (err error) {
panic(fmt.Errorf("unknown GOARCH: %q", arch))
}
cflags += " -fembed-bitcode"
+ cflags += " -Wno-nullability-completeness"
if err != nil {
return err
} |
@DavidCorsha |
@ReboundKay @DavidCorsha |
I'm also seeing this after upgrading to Xcode 10.2. @ReboundKay Maybe keep the issue open until it is fixed in |
I did as @DavidCorsha said. The Api.framework has been built successfully with gomobile and I put it in the xcode project. But, xcode compilation has failed with following error:
I suspect it could be because I am using go minor version 1.12.1 instead of building go from source code from master branch. https://golang.org/doc/install/source |
Different issue but you can disable bitcode in your project settings as well. |
As I supposed the error was because the non latest version of go language.
After that, the xcode project is properly built with enabled bitcode |
I re-opened this here, as I'm still seeing it: #31284 |
Hw do you use the --HEAD version when you |
@prcela Thanks for your help. Unfortunately I'm unable to find any information on which version of go is required to enable bitcode support. Can anybody elaborate why this is dependent on the go version? |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes, i've updated gomobile to the newest version
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
gomobile bind -target=ios golang.org/x/mobile/example/bind/hello
gobind
In file included from _cgo_export.c:4:
In file included from go_hellomain.go:10:
In file included from /var/folders/hz/vk6pt2sd58z8hnj41p9wntrw0000gn/T/gomobile-work-881160448/src/gobind/seq.h:7:
In file included from /var/folders/hz/vk6pt2sd58z8hnj41p9wntrw0000gn/T/gomobile-work-881160448/src/gobind/seq_darwin.h:10:
/var/folders/hz/vk6pt2sd58z8hnj41p9wntrw0000gn/T/gomobile-work-881160448/src/gobind/Universe.objc.h:23:29: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
/var/folders/hz/vk6pt2sd58z8hnj41p9wntrw0000gn/T/gomobile-work-881160448/src/gobind/Universe.objc.h:23:29: note: insert '_Nullable' if the pointer may be null
/var/folders/hz/vk6pt2sd58z8hnj41p9wntrw0000gn/T/gomobile-work-881160448/src/gobind/Universe.objc.h:23:29: note: insert '_Nonnull' if the pointer should never be null
/var/folders/hz/vk6pt2sd58z8hnj41p9wntrw0000gn/T/gomobile-work-881160448/src/gobind/Universe.objc.h:25:4: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
/var/folders/hz/vk6pt2sd58z8hnj41p9wntrw0000gn/T/gomobile-work-881160448/src/gobind/Universe.objc.h:25:4: note: insert '_Nullable' if the pointer may be null
/var/folders/hz/vk6pt2sd58z8hnj41p9wntrw0000gn/T/gomobile-work-881160448/src/gobind/Universe.objc.h:25:4: note: insert '_Nonnull' if the pointer should never be null
/var/folders/hz/vk6pt2sd58z8hnj41p9wntrw0000gn/T/gomobile-work-881160448/src/gobind/Universe.objc.h:25:30: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
/var/folders/hz/vk6pt2sd58z8hnj41p9wntrw0000gn/T/gomobile-work-881160448/src/gobind/Universe.objc.h:25:30: note: insert '_Nullable' if the pointer may be null
/var/folders/hz/vk6pt2sd58z8hnj41p9wntrw0000gn/T/gomobile-work-881160448/src/gobind/Universe.objc.h:25:30: note: insert '_Nonnull' if the pointer should never be null
What did you expect to see?
I would like to see the lib file could be made successfully.
What did you see instead?
the errors above
I wonder if my xcode is not a suitable version for this version of gomobile/gobind .(my xcode version: Version 9.2 (9C40b))
and I want to ask if I can set some build flag to ignore this kind of errors, and how. Thanks.
The text was updated successfully, but these errors were encountered: