golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.06k stars 17.68k forks source link

x/mobile: Multiple warnings when running "go get github.com/golang/mobile/..." #12457

Closed ip closed 9 years ago

ip commented 9 years ago
vanya@vanya-HP-Pavilion-dv6:~/prog/go$ go get github.com/golang/mobile/...
can't load package: package github.com/golang/mobile/app: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/app expects import "golang.org/x/mobile/app"
package github.com/golang/mobile/app/internal/testapp
    imports golang.org/x/mobile/app/internal/apptest: use of internal package not allowed
can't load package: package github.com/golang/mobile/bind: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/bind expects import "golang.org/x/mobile/bind"
can't load package: package github.com/golang/mobile/bind/seq: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/bind/seq expects import "golang.org/x/mobile/bind/seq"
can't load package: package github.com/golang/mobile/cmd/gobind: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/cmd/gobind expects import "golang.org/x/mobile/cmd/gobind"
package github.com/golang/mobile/cmd/gomobile
    imports golang.org/x/mobile/internal/loader: use of internal package not allowed
can't load package: package github.com/golang/mobile/event/lifecycle: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/event/lifecycle expects import "golang.org/x/mobile/event/lifecycle"
can't load package: package github.com/golang/mobile/event/mouse: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/event/mouse expects import "golang.org/x/mobile/event/mouse"
can't load package: package github.com/golang/mobile/event/paint: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/event/paint expects import "golang.org/x/mobile/event/paint"
can't load package: package github.com/golang/mobile/event/size: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/event/size expects import "golang.org/x/mobile/event/size"
can't load package: package github.com/golang/mobile/event/touch: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/event/touch expects import "golang.org/x/mobile/event/touch"
can't load package: package github.com/golang/mobile/exp/app/debug: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/exp/app/debug expects import "golang.org/x/mobile/exp/app/debug"
can't load package: package github.com/golang/mobile/exp/audio: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/exp/audio expects import "golang.org/x/mobile/exp/audio"
can't load package: package github.com/golang/mobile/exp/audio/al: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/exp/audio/al expects import "golang.org/x/mobile/exp/audio/al"
can't load package: package github.com/golang/mobile/exp/f32: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/exp/f32 expects import "golang.org/x/mobile/exp/f32"
can't load package: package github.com/golang/mobile/exp/font: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/exp/font expects import "golang.org/x/mobile/exp/font"
can't load package: package github.com/golang/mobile/exp/gl/glutil: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/exp/gl/glutil expects import "golang.org/x/mobile/exp/gl/glutil"
can't load package: package github.com/golang/mobile/exp/sensor: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/exp/sensor expects import "golang.org/x/mobile/exp/sensor"
can't load package: package github.com/golang/mobile/exp/sprite: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/exp/sprite expects import "golang.org/x/mobile/exp/sprite"
can't load package: package github.com/golang/mobile/exp/sprite/clock: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/exp/sprite/clock expects import "golang.org/x/mobile/exp/sprite/clock"
can't load package: package github.com/golang/mobile/exp/sprite/glsprite: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/exp/sprite/glsprite expects import "golang.org/x/mobile/exp/sprite/glsprite"
can't load package: package github.com/golang/mobile/exp/sprite/portable: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/exp/sprite/portable expects import "golang.org/x/mobile/exp/sprite/portable"
can't load package: package github.com/golang/mobile/geom: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/geom expects import "golang.org/x/mobile/geom"
can't load package: package github.com/golang/mobile/gl: code in directory /home/vanya/prog/go/src/github.com/golang/mobile/gl expects import "golang.org/x/mobile/gl"
ip commented 9 years ago

However, go get golang.org/x/mobile/... prints other errors:

vanya@vanya-HP-Pavilion-dv6:~/prog/go/src$ go get golang.org/x/mobile/...
# golang.org/x/mobile/gl
In file included from golang.org/x/mobile/gl/gl.go:17:0:
work.h:6:23: fatal error: GLES2/gl2.h: No such file or directory
 #include <GLES2/gl2.h>
                       ^
compilation terminated.
# golang.org/x/mobile/exp/audio/al
golang.org/x/mobile/exp/audio/al/al_notandroid.go:22:19: fatal error: AL/al.h: No such file or directory
 #include <AL/al.h>
                   ^
compilation terminated.
# golang.org/x/mobile/exp/sprite/portable
golang.org/x/mobile/exp/sprite/portable/portable.go:188: cannot use &m (type *f64.Aff3) as type f64.Aff3 in argument to "golang.org/x/image/draw".ApproxBiLinear.Transform
crawshaw commented 9 years ago

The first set of errors you are seeing are expected, the go tool is enforcing the custom import paths: https://golang.org/s/go14customimport Use go get golang.org/x/mobile instead.

The second GL-related errors are probably because your linux installation is missing the relevant GLES packages. See https://github.com/golang/mobile/blob/master/app/x11.go#L15

ip commented 9 years ago

Thanks.

degendra commented 9 years ago

@crawshaw I tried second suggestion but still getting same error.

hyangah commented 9 years ago

what command did you run? please use golang.org/x/mobile, not github.com/golang/mobile

On Thu, Sep 17, 2015 at 3:05 PM, Degendra Sivakoti <notifications@github.com

wrote:

@crawshaw https://github.com/crawshaw I tried second suggestion but still getting same error.

— Reply to this email directly or view it on GitHub https://github.com/golang/go/issues/12457#issuecomment-141190952.

__

degendra commented 9 years ago

@hyangah I was following https://github.com/golang/go/wiki/Mobile tutorial and executed gomobile install golang.org/x/mobile/example/basic. I was able to install apk in my device but when i run it, i only see black screen. Same thing for audio and network example. I was getting "work.h:6:23: fatal error: GLES2/gl2.h: No such file or directory" error when i was executing go install golang.org/x/mobile/example/basic

ip commented 9 years ago

@degendra See https://github.com/golang/mobile/blob/master/app/x11.go#L15

degendra commented 9 years ago

@ip I tried that option already and it was not working. Now it's working. Thank you.

I am still having problem with mobile. I am only getting black screen. It might be the problem with my device. Thank you @hyangah as well for your time.