Comments (27)
This should fix it. Thanks for the heads up.
from qml.
It works! Thank you :)
from qml.
I have the same problem i am on debian 7 wheezy i have installed qt 5.2.1 but its in /opt/Qt5.2.1
What should i do to resolve this problem
from qml.
Here are general rules that I have sketched for separately installed Qt. Assume that it was installed in ~/Qt5.2.1/
- Add these lines in you ~/.profile
export PKG_CONFIG_PATH=$HOME/Qt5.2.1/5.2.1/gcc_64/lib/pkgconfig
export LD_LIBRARY_PATH=$HOME/Qt5.2.1/5.2.1/gcc_64/lib
and re-login.
2. Go to directory with qo-qml package
$ cd $GOPATH/src/gopkg.in/v0/qml
edit bridge.go
and add these lines
// #cgo CPPFLAGS: -I<path_to_your_Qt_directory>/Qt5.2.1/5.2.1/Src/qtbase/include/QtCore
// #cgo CPPFLAGS: -I<path_to_your_Qt_directory>/Qt5.2.1/5.2.1/Src/qtbase/include/QtCore/5.2.1/QtCore
// #cgo pkg-config: <path_to_your_Qt_directory>Qt5.2.1/5.2.1/gcc_64/lib/pkgconfig/Qt5Core.pc <path_to_your_Qt_directory>/Qt5.2.1/5.2.1/gcc_64/lib/pkgconfig/Qt5Widgets.pc <path_to_your_Qt_directory>/Qt5.2.1/5.2.1/gcc_64/lib/pkgconfig/Qt5Quick.pc
Don't forget to change path_to_your_Qt_directory. Then try to run
$ go install
from qml.
It works, thanks.
from qml.
@ZiDoMs @sshikaree I also have done that way just once upon a time, but I learned it was best to set CGO_CPPFLAGS
instead of patching, it worked the same. I suggested a pull-request with this more explicit and simpler explanation, the changeset can be checked here, please take a look.
These days I use an alias
trick in my ~/.bash_aliases
file for setting up my shell with my current Qt, e.g.:
alias setupqt53='export PKG_CONFIG_PATH=/opt/qt/5.3.0/linux/lib/pkgconfig; export CGO_CPPFLAGS="-I/opt/qt/5.3.0/linux/include/QtCore/5.3.0/QtCore"'
So I just have to "run" setupqt53
before doing go get
or go get -u
(I also have a setupclean
to clean up this setup).
from qml.
Another thing that I do for linking with Qt 5 for my apps is setting up ldconfig
, for example, I have the /etc/ld.so.conf.d/qt.conf
file which content is just the library path of my current Qt installation, e.g. /opt/qt/5.3.0/linux/lib
. After having set up or changed this file, I run sudo ldconfig
and re-login.
from qml.
@oblitum i agree with you setting the CGO_CPPFLAGS is much better
from qml.
@niemeyer Don't you think the README could deserve an improvement in the direction of that old PR/discussion? Maybe putting such instructions in another "general" subsection.
from qml.
Yep, it is better to put everything in environment variables.
from qml.
I just had the same issue again. #57 fixes that.
from qml.
@GeertJohan Have you tried to set the environment as everyone is stating here, it woudn't require a patch.
from qml.
Yes. export CGO_CPPFLAGS="-I/usr/include/qt5/QtCore/5.0.1/QtCore"
does work. But that's not very friendly for anyone else trying to build the pkg. I think adding the compatible versions to the CPPFLAGS in the go source would increase usability of this package.
from qml.
@GeertJohan I don't know... I concur it's not friendly but including every point release doesn't seems like a solution either. Personaly, I would just state what should be included, and the user would do so by setting the environment, this would work for everyone, let Qt be installed anywhere in the file system, and wouldn't require frequent patches.
from qml.
Don't you think the README could deserve an improvement in the direction of that old PR/discussion? Maybe putting such instructions in another "general" subsection.
@oblitum We already have an "Everywhere else" section, and we already have sections that mention how to tweak the environment variables. I've added a note there even then. Please feel free to submit an improvement, though.
I don't know... I concur it's not friendly but including every point release doesn't seems like a solution either. Personaly, I would just state what should be included, and the user would do so by setting the environment, this would work for everyone, let Qt be installed anywhere in the file system, and wouldn't require frequent patches.
We can have as many lines as needed to get environments people care about to build out of the box. For the time being, we only need to do this once per release, which will always be trivial on our side compared to the cost of doing the release. In the medium term, I hope to get a patch in the "go" tool that allow us to glob those paths, so we only need them once. #57 is in.
from qml.
ZiDoMs:
I have the same problem i am on debian 7 wheezy i have installed qt 5.2.1 but its in /opt/Qt5.2.1
What should i do to resolve this problem?
So, if @ZiDoMs's installation on Debian was a standard one, I mean, without changing installation path on purpose, all /usr/...
paths being listed now should be replicated as /opt/...
? I think it may be the case since /opt
vs /usr
for some stuff is a long time battle in *nix systems/users.
Also, I think the notice in the README is still at the same state as that of the time of that old PR. I think I have provided enough information in that discussion, from my point of view at last, on why a simpler and clearer explanation regarding the environment settings could help.
from qml.
So, if @ZiDoMs's installation on Debian was a standard one, I mean, without changing installation path on purpose, all /usr/... paths being listed now should be replicated as /opt/...? I think it may be the case since /opt vs /usr for some stuff is a long time battle in *nix systems/users.
There's no battle about this. /opt is part of well known standards.
That said, there's something not quite right. Debian would not install something on /opt out of the box, so how has Qt landed there? Is that where the upstream packages from the Qt project are being deployed? Can someone with these packages send us the output of these two commands:
find /opt -name qmetaobject_p.h
dpkg -S $(find /opt -name qmetaobject_p.h)
Also, I think the notice in the README is at the same state as that of the time of that old PR. I think have provided enough information in that discussion, from my point of view at last, on why a simpler and clearer explanation regarding the environment settings could help.
Can you please submit a pull request then?
from qml.
Can you please submit a pull request then?
What I have provided in that one, would be the same content of a new one... I don't know which section such information would fit better for you. As the owner I would just accept the PR, or use it as a basis for a commit, but editing and putting the info where I feel it fits better.
from qml.
So, if @ZiDoMs's installation on Debian was a standard one, I mean, without changing installation path on purpose, all /usr/... paths being listed now should be replicated as /opt/...? I think it may be the case since /opt vs /usr for some stuff is a long time battle in *nix systems/users.
By that time i was installing qt5 i didn't feel good about installing qt5 in /usr so i changed it to /opt but Maybe you're right i should have installed qt in default installation path
find /opt -name qmetaobject_p.h result:
/opt/Qt5.2.1/5.2.1/android_armv7/include/QtCore/5.2.1/QtCore/private/qmetaobject_p.h
/opt/Qt5.2.1/5.2.1/android_armv5/include/QtCore/5.2.1/QtCore/private/qmetaobject_p.h
/opt/Qt5.2.1/5.2.1/Src/qtbase/include/QtCore/5.2.1/QtCore/private/qmetaobject_p.h
/opt/Qt5.2.1/5.2.1/Src/qtbase/src/corelib/kernel/qmetaobject_p.h
/opt/Qt5.2.1/5.2.1/gcc_64/include/QtCore/5.2.1/QtCore/private/qmetaobject_p.h
/opt/Qt5.2.1/5.2.1/android_x86/include/QtCore/5.2.1/QtCore/private/qmetaobject_p.h
dpkg -S $(find /opt -name qmetaobject_p.h) result:
dpkg-query: no path found matching pattern /opt/Qt5.2.1/5.2.1/android_armv7/include/QtCore/5.2.1/QtCore/private/qmetaobject_p.h
dpkg-query: no path found matching pattern /opt/Qt5.2.1/5.2.1/android_armv5/include/QtCore/5.2.1/QtCore/private/qmetaobject_p.h
dpkg-query: no path found matching pattern /opt/Qt5.2.1/5.2.1/Src/qtbase/include/QtCore/5.2.1/QtCore/private/qmetaobject_p.h
dpkg-query: no path found matching pattern /opt/Qt5.2.1/5.2.1/Src/qtbase/src/corelib/kernel/qmetaobject_p.h
dpkg-query: no path found matching pattern /opt/Qt5.2.1/5.2.1/gcc_64/include/QtCore/5.2.1/QtCore/private/qmetaobject_p.h
dpkg-query: no path found matching pattern /opt/Qt5.2.1/5.2.1/android_x86/include/QtCore/5.2.1/QtCore/private/qmetaobject_p.h
from qml.
@ZiDoMs That doesn't come from Debian, so /opt is probably a good choice. Where did you get that content from?
from qml.
@ZiDoMs I still don't feel right about installing from sources straight to /usr/local
because I have done so already and installation spread some new files/directories right into /usr/local/
and I don't know where, I don't like this for "uninstallation". I prefer stick to putting versioned Qt's under /opt/...
from qml.
@niemeyer I run them in my terminal as you asked
Can someone with these packages send us the output of these two commands
from qml.
So, if @ZiDoMs's installation on Debian was a standard one, I mean, without changing
installation path on purpose, all /usr/... paths being listed now should be replicated as /opt/...?
I think it may be the case since /opt vs /usr for some stuff is a long time battle in *nix
systems/users.There's no battle about this. /opt is part of well known standards.
Ah, I think the battle I was recalling regards /usr/local
vs /opt
for non-system installs.
from qml.
@niemeyer I run them in my terminal as you asked
@ZiDoMs By content I meant the Qt files installed in /opt.
from qml.
Oh sorry from qt project Qt 5.2.1 for Android (Linux 64-bit, 846 MB)
from qml.
Alright, the change submitted with ef43d86 should sort out this issue definitively. We don't need to maintain the include paths for individual Qt releases anymore.
from qml.
Nice. My docs request is dropped for good.
from qml.
Related Issues (20)
- Can we use QT5 with Microsoft VS2015 Community?
- Statically compiling with qt/qml for a truly standalone app HOT 9
- Something wrong with WebView HOT 3
- Install on Mac without Homebrew
- cgo result has Go pointer
- go-qml is broken under Go 1.7 HOT 21
- Error Build a sample HOT 3
- How Build and Install QT on Go 1.8?
- Error Build
- Tray icon/menu support
- types foe model QML
- Error! HOT 1
- Error while building/testing on windows HOT 1
- How do I register a singleton qml file/component
- Qt 5.11 Support HOT 6
- Broken under Go 1.12 (relocation target runtime.acquirem not defined for ABI0 (but is defined for ABIInternal)) HOT 5
- build go-qml failure HOT 1
- How to connect Material?
- on Mac QT 5.13.0 + Go 1.12.7 installing error when did 'go get gopkg.in/qml.v1' HOT 1
- Installation on Ubuntu 19.10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qml.