Unable to create kit for go-qml project

Bug #1398202 reported by Niklas Wenzel
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
qtcreator-plugin-ubuntu (Ubuntu)
Triaged
Medium
Benjamin Zeller

Bug Description

Desktop version of Ubuntu: 14.10
QtCreator plugin version: 3.1.1

How to reproduce:

Create a Go Qml project in the Ubuntu SDK. There is no way to set up a go-qml kit for armhf.
Qt Creator doesn't even recognize manual golang installations in chroots and therefore doesn't let us change the Go compiler path for existing kits. I don't know how to build my app for actual phones now.

Are there any known workarounds?

Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

There is currently no way to create go enabled Kits for chroots.

The reason for that is that the go-qml bridge requires the cgo tool to compile.
This tool however does not support cross compiling:

https://code.google.com/p/go/issues/detail?id=4714

That means the only way to compiler a go app for the phone is atm to compile it
on the device. You have to set up your device manually for building the application.
Then you can try to use the scripts in the Build->Ubuntu menu from qtcreator to build
on the device. Make sure to build on the Desktop first, so all dependencies are available.

Revision history for this message
Niklas Wenzel (nikwen) wrote :

Thank you very much for your reply.

I did know about the bug report and it says that it is something they have already fixed. The bad thing is that Ubuntu ships an old version of Go instead of the current 1.3.3 release which seems to cross-compile fine for me.
Shouldn't it be possible to set up the chroots with a newer release of Go? It's just about downloading and extracting a tar archive.

The only issue I am facing with that manually installed golang version is that I have to access (manually) cross-compiled system libraries. That's why I'm asking for the chroot.

Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

Yeah you probably could install it manually in the chroot, but that can not really be the supported way for us.
As soon as the Archive switches to the new go compiler version, it will also be available to the chroots.

When that has happend we can reevaluate if it does what we need and enable proper Kit support
for that,

Revision history for this message
Niklas Wenzel (nikwen) wrote :

Ok, that's indeed understandable. I'm going to try creating some build scripts for my project now.
Thanks again. :)

no longer affects: qtcreator-plugin-go (Ubuntu)
Changed in qtcreator-plugin-ubuntu (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Benjamin Zeller (zeller-benjamin)
Revision history for this message
Niklas Wenzel (nikwen) wrote :

Ok, I went ahead and created a project template which can be used to base cross-compilable Go QML projects on.
It comes with chroot setup and build scripts. You can find it here: https://github.com/nikwen/ubuntu-go-qml-template

Revision history for this message
vayan (va+notifications) wrote :

It looks like it was fixed in go1.3 : https://github.com/golang/go/issues/4714

Ubuntu has newer versions now. but there's still no way to set up a go-qml kit for armhf.

Or maybe I can't find it ?

Revision history for this message
Niklas Wenzel (nikwen) wrote :

Check out the template I posted above. That should get you started for now. :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.