therecipe / qt

Qt binding for Go (Golang) with support for Windows / macOS / Linux / FreeBSD / Android / iOS / Sailfish OS / Raspberry Pi / AsteroidOS / Ubuntu Touch / JavaScript / WebAssembly
GNU Lesser General Public License v3.0
10.33k stars 738 forks source link

how to build and deploy sailfish os app? #478

Open soson opened 6 years ago

soson commented 6 years ago

i successfuly build example from docs https://github.com/therecipe/qt/wiki/Getting-Started using

qtdeploy -docker test desktop

then i tried to build sailfish os example https://github.com/therecipe/qt/tree/master/internal/examples/quick/sailfish

qtdeploy -docker -debug test sailfish-emulator

which failed with this

DEBU[0000] running Deploy                                docker=true fast=false ldFlags= mode=test path=/home/soni/go/src/github.com/therecipe/qt target=sailfish-emulator
DEBU[0000] Execute                                       cmd="docker run --rm -e IDUG=1000:100 -v /home/soni/go:/media/sf_GOPATH0 -e GOPATH=/home/user/work:/media/sf_GOPATH0 -i therecipe/qt: qtdeploy -debug -ldflags= -tags= build sailfish-emulator /media/sf_GOPATH0/src/github.com/therecipe/qt" env= func=RunCmd name="deploy binary for sailfish-emulator on linux with docker"
ERRO[0000] failed to run command                         cmd="docker run --rm -e IDUG=1000:100 -v /home/soni/go:/media/sf_GOPATH0 -e GOPATH=/home/user/work:/media/sf_GOPATH0 -i therecipe/qt: qtdeploy -debug -ldflags= -tags= build sailfish-emulator /media/sf_GOPATH0/src/github.com/therecipe/qt" env= error="exit status 125" func=RunCmd name="deploy binary for sailfish-emulator on linux with docker"
docker: invalid reference format.
See 'docker run --help'.

go: 1.8.4 Docker version 17.06.2-ce, build cec0b7 Sailfish OS SDK 1701-1

are there some other prerequisites, which i need to fullfill to successfully build the example?

thanks

soson commented 6 years ago

from debug message i can see, that docker command generated by qtdeploy is malformed (missing TAG after image name):

docker run --rm -e IDUG=1000:100 -v /home/soni/go:/media/sf_GOPATH0 -e GOPATH=/home/user/work:/media/sf_GOPATH0 -i therecipe/qt: qtdeploy -debug -ldflags= -tags= build sailfish-emulator /media/sf_GOPATH0/src/github.com/therecipe/qt

after manually fixing it:

docker run --rm -e IDUG=1000:100 -v /home/soni/go:/media/sf_GOPATH0 -e GOPATH=/home/user/work:/media/sf_GOPATH0 -i therecipe/qt:linux qtdeploy -debug -ldflags= -tags= build sailfish-emulator /media/sf_GOPATH0/src/github.com/therecipe/qt/internal/examples/quick/sailfish

i got this:

time="2017-10-14T21:34:12Z" level=panic msg="Project needs to be inside GOPATH; have: /media/sf_GOPATH0/src/github.com/therecipe/qt/internal/examples/quick/sailfish want: /home/user/work"

panic: (*logrus.Entry) (0x7e9320,0xc4250746e0)

tough the GOPATH environment variable is set.

ghost commented 6 years ago

Have you tried building the project using the regular installation? I can't speak for Sailfish OS specifically but I didn't have any luck with the docker deployments for desktop, Android while developing on Linux.