go-qml / qml

QML support for the Go language
Other
1.96k stars 187 forks source link

ubuntu-sdk doesn't take care of all Qt dependencies #143

Closed elimisteve closed 9 years ago

elimisteve commented 9 years ago

In README.md it says,

If you are using Ubuntu, the Ubuntu SDK will take care of the Qt dependencies

This appears to no longer be the cause, because I first tried just installing dependencies with

sudo apt-get install ubuntu-sdk

but ran into this error when running go get --

$ go get gopkg.in/qml.v1
# gopkg.in/qml.v1
In file included from gocode/src/gopkg.in/qml.v1/cpp/govalue.h:7:0,
                 from gocode/src/gopkg.in/qml.v1/cpp/capi.cpp:10,
                 from gocode/src/gopkg.in/qml.v1/all.cpp:2:
./cpp/private/qmetaobject_p.h:2:51: fatal error: QtCore/5.2.1/QtCore/private/qmetaobject_p.h: No such file or directory
 #include QT_PRIVATE_HEADER(QtCore,qmetaobject_p.h)
                                                   ^
compilation terminated.

So then I ran apt-get install, but with the dependencies listed in the README. The additional required dependencies not currently met -- as of 2015.02.08 on Ubuntu 14.04.1 LTS and go version go1.4 linux/amd64 -- are these:

qtbase5-private-dev qtdeclarative5-private-dev

Therefore, all dependencies will be met by running

sudo apt-get install ubuntu-sdk qtbase5-private-dev qtdeclarative5-private-dev

So you may want to rephrase the quoted line above from the README, or change the dependency list to line just stated :-).

niemeyer commented 9 years ago

The README actually says:

If you are using Ubuntu, the [Ubuntu SDK](http://developer.ubuntu.com/get-started/) will take care of the Qt dependencies:

    $ sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
    $ sudo apt-get update
    $ sudo apt-get install qtdeclarative5-dev qtbase5-private-dev qtdeclarative5-private-dev libqt5opengl5-dev qtdeclarative5-qtquick2-plugin

These commands are relevant. I can drop the reference to the SDK altogether if that's useful.