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.39k stars 736 forks source link

How to deploy to raspberry pi 4 #955

Open toplinuxsir opened 5 years ago

toplinuxsir commented 5 years ago

How to deploy to raspberry pi 4

amlwwalker commented 5 years ago

It's generally a good idea to give as much information as you can, for instance what operating system you are on. I'm on Mac so my first attempt at this would be to follow the instructions here https://github.com/therecipe/qt/wiki/Deploying-macOS-to-Raspberry-Pi and report back what happened if I ran this on an RPi 4. I would also probably try to see what happened if I compiled for Linux and ran that in the Rpi 4 aswell. Give us a bit more info about the steps you have tried.

toplinuxsir commented 5 years ago

@amlwwalker Thanks for your kind help I want to deploy to raspberry pi 4, But no rpi4 image , I use rpi3 instead:

docker pull therecipe/qt:rpi3

Ok after pull the image and build :+1:

qtdeploy -docker build rpi3

Error prone

cd /media/sf_GOPATH0/src/goui/ui
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/b068/_pkg_.a -trimpath $WORK/b068 -p goui/ui -complete -buildid EpXuMBq_UBMA3gvoHZKx/EpXuMBq_UBMA3gvoHZKx -goversion go1.12.9 -D "" -importcfg $WORK/b068/importcfg -pack -c=4 ./uic_window.go
# goui/ui
ui/uic_window.go:54:19: undefined: QStringLiteral
ui/uic_window.go:58:33: undefined: QStringLiteral
ui/uic_window.go:60:37: undefined: QStringLiteral
ui/uic_window.go:62:37: undefined: QStringLiteral
ui/uic_window.go:64:24: undefined: QStringLiteral
ui/uic_window.go:65:24: undefined: QLatin1String
ui/uic_window.go:68:27: undefined: QStringLiteral
ui/uic_window.go:69:27: undefined: QLatin1String
ui/uic_window.go:73:35: undefined: QStringLiteral
ui/uic_window.go:75:26: undefined: QStringLiteral
ui/uic_window.go:75:26: too many errors


I guess:
 go qt library only support qt 5.12 and qt 5.13, 
But rpi3 qt version is 5.6 and rpi4 qt verison is 5.11, 
Is that the problem  ?
Thanks 
therecipe commented 5 years ago

@toplinuxsir Sorry, there is no docker image for the raspberry pi 4 yet. And the other raspberry images are still only on Qt 5.7 I plan to update the images to Qt 5.13 in the future, but I haven't had time to look into this since the last time https://github.com/therecipe/qt/issues/831#issuecomment-483468005

But you can try to directly build on the raspberry instead. To do so, you will only need to follow these instructions on the device: https://github.com/therecipe/qt/wiki/Installation-on-Linux#your-system-package-managers-version-without-android-support You can also skip the qtsetup step and instead directly deploy with qtdeploy, if you don't want to run the "full" setup.