gomobile: target=ios, getting incompatible pointer types assigning to 'GoUniverseerror *' from 'goSeqErrorWrapper *' [-Wincompatible-pointer-types]

63 views
Skip to first unread message

Joe Blue

unread,
Sep 28, 2016, 8:14:30 AM9/28/16
to golang-nuts

Hey all,

i am compiling code across to IOS & Android.

On Android things are working ok it seems.

But i get this on ios with: gomobile bind --target=ios -v


_/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/gomobile-work-821936368/src/gomobile_bind

# _/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/gomobile-work-821936368/src/gomobile_bind

/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/gomobile-work-821936368/src/gomobile_bind/GoCli.m:156:11: warning: incompatible pointer types assigning to 'GoUniverseerror *' from 'goSeqErrorWrapper *' [-Wincompatible-pointer-types]

/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/gomobile-work-821936368/src/gomobile_bind/seq.h:32:1: note: instance method 'initWithError:' is assumed to return an instance of its receiver type ('goSeqErrorWrapper *')

/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/gomobile-work-821936368/src/gomobile_bind/GoCli.m:178:11: warning: incompatible pointer types assigning to 'GoUniverseerror *' from 'goSeqErrorWrapper *' [-Wincompatible-pointer-types]

/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/gomobile-work-821936368/src/gomobile_bind/seq.h:32:1: note: instance method 'initWithError:' is assumed to return an instance of its receiver type ('goSeqErrorWrapper *')

/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/gomobile-work-821936368/src/gomobile_bind/GoCli.m:202:11: warning: incompatible pointer types assigning to 'GoUniverseerror *' from 'goSeqErrorWrapper *' [-Wincompatible-pointer-types]

/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/gomobile-work-821936368/src/gomobile_bind/seq.h:32:1: note: instance method 'initWithError:' is assumed to return an instance of its receiver type ('goSeqErrorWrapper *')

/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/gomobile-work-821936368/src/gomobile_bind/GoCli.m:228:11: warning: incompatible pointer types assigning to 'GoUniverseerror *' from 'goSeqErrorWrapper *' [-Wincompatible-pointer-types]

/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/gomobile-work-821936368/src/gomobile_bind/seq.h:32:1: note: instance method 'initWithError:' is assumed to return an instance of its receiver type ('goSeqErrorWrapper *')

/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/gomobile-work-821936368/src/gomobile_bind/GoCli.m:253:11: warning: incompatible pointer types assigning to 'GoUniverseerror *' from 'goSeqErrorWrapper *' [-Wincompatible-pointer-types]

/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/gomobile-work-821936368/src/gomobile_bind/seq.h:32:1: note: instance method 'initWithError:' is assumed to return an instance of its receiver type ('goSeqErrorWrapper *')

/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/gomobile-work-821936368/src/gomobile_bind/GoCli.m:279:11: warning: incompatible pointer types assigning to 'GoUniverseerror *' from 'goSeqErrorWrapper *' [-Wincompatible-pointer-types]

/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/gomobile-work-821936368/src/gomobile_bind/seq.h:32:1: note: instance method 'initWithError:' is assumed to return an instance of its receiver type ('goSeqErrorWrapper *')

command-line-arguments

write Cli.framework/Versions/A/Headers/GoCli.h

write Cli.framework/Versions/A/Headers/GoUniverse.h

write Cli.framework/Versions/A/Headers/Cli.h

write Cli.framework/Versions/A/Modules/module.modulemap



1. Is there a way to tell the compiler to leave the files in the /var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/ location so i can see them. At the moment it deletes them.


Regards


Joe

Elias Naur

unread,
Sep 28, 2016, 11:06:07 AM9/28/16
to golang-nuts
Hi,

Use the -work flag to gomobile to output working directory and to preserve the generated files.

What revision are your gomobile tool compiled at? CL 29052 should have fixed that error.

 - elias

Joe Blue

unread,
Sep 29, 2016, 3:14:31 AM9/29/16
to Elias Naur, golang-nuts
thank Elias. Nice

I am on this version:

x-MacBook-Pro:rpc apple$ gomobile version

gomobile version +7573efa Wed Aug 24 22:21:38 2016 +0000 (android,ios); androidSDK=/Users/apple/Library/Android/sdk/platforms/android-24

I will upgrade now and see if i get the same errors. thanks



--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/vTdAjZk1W64/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joe Blue

unread,
Sep 29, 2016, 3:21:52 AM9/29/16
to Elias Naur, golang-nuts
i upgraded:
gomobile version +9640137 Tue Sep 27 16:37:51 2016 +0000 (android,ios); androidSDK=/Users/apple/Library/Android/sdk/platforms/android-24

It fixed all the errors:)

thankyou



Joe Blue

unread,
Sep 29, 2016, 3:50:17 AM9/29/16
to Elias Naur, golang-nuts
upgrading caused a new problem on the android side.

```

Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]
Error:Execution failed for task ':app:prepareMd01CliUnspecifiedLibrary'.
> Could not expand ZIP '/Users/apple/workspace/go/src/github.com/asdine/brazier/_android/md01/cli/cli.aar'.
Information:BUILD FAILED
Information:Total time: 3.155 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

```

its nuts because when i rename the cli.aar to .zip, i can open it on my osx laptop.
but android studio seems to not think its NOT a zip.

So i changed the gradle to to this:
configurations.maybeCreate("default")
artifacts.add("default", file('/Users/apple/workspace/go/src/github.com/asdine/brazier/cli/cli.aar'))
that fixed it.
It seems that when you use Android Studio > New > New Module > Import .Jar / -aar package it does not put the path in the gradle file above.

little things i know..






Elias Naur

unread,
Sep 29, 2016, 7:25:53 AM9/29/16
to golang-nuts, elias...@gmail.com
Is there a reason you're not using the gobind gradle plugin? If you need an example, the "bind" app from gomobile uses it to automatically generate the aar-file during builds.

 - elias

Joe Blue

unread,
Sep 29, 2016, 7:59:52 AM9/29/16
to Elias Naur, golang-nuts
Yeah i saw thats the way the team were doing it in the example.

I tried it, and sure it works. And it also adds the path.
But there was also lots of mis information about how to use it. gopaths being hard coded in it etc etc etc.
I saw your comment recently about how to correctly use it.
But i decided to give it a miss because i wanted to have control. I need to do some crazy stuff with webviews and gomobile you see.

Once i got used to Android Studio and the way it loads the aar packages etc, i liked it because i had control.
A tiny bit slower at dev time, but at least i see all of Android Studios crumpiness, and can learn how to tame it.

I think we can definitely CLOSE this. Thanks for the follow up and tips.
Your new Cl's did the trick :)

---
Today, I have hit a new regression for gomobile that is pretty nasty and i expect will break allot of people.
I will raise it on the offical github issues.
Link to complete code is there !! 
Easy to reproduce 

Reply all
Reply to author
Forward
0 new messages