Where does qmake look for pri files? - qt

I have the following setup (using qt 5.6.1-1):
qtbase/bin
...
qtbase/mkspecs
...
qtdeclarative/mkspecs
When trying to build qtquickcontrols I get the following error:
qmake
make
Some of the required modules (qtHaveModule(quick)) are not available.
Skipped.
I think it's because qmake is only looking for .pri files in qtbase/mkspecs. Is there an environment variable to set the mkspecs
search path?
I tried setting QMAKESPEC, QT_PLUGIN_PATH and INCLUDEPATH, but couldn't get past the error message.
Build process:
tar -xf qtbase-opensource-src-5.6.1.tar.xz && cd
./configure -prefix=qtbase/prefix
make
make install
tar -xf qtdeclarative-opensource-src-5.6.1.tar.xz && cd
qmake PREFIX=qtdeclarative/prefix
make install
fails with write error to qtbase/prefix (it's not writeable by the build user)
sed -i s#INSTALL_ROOT)/qtbase/prefix#INSTALL_ROOT)/qtdeclarative/prefix
make install
tar -xf qtquickcontrols-opensource-src-5.6.1.tar.xz && cd
qmake PREFIX=qtquickcontrols/prefix
make install
fails with
Some of the required modules (qtHaveModule(quick)) are not available.
Skipped.

If you have a properly set up Qt installation, it won't be a problem. Make sure that:
You've compiled all the modules.
You haven't moved your Qt build: it has hardcoded paths and can't be moved once built.
You should also prefer to build Qt in its own build folder, if you aren't doing it already.

Related

How to set DESTDIR for gmake in rpmbuild SPEC file

I'm trying to build a SPEC file to support a customized RPM for Qt. Because Qt's configure script doesn't recognize some of the options automatically included in the %configure scriptlet I have to call it explicitly in the SPEC file with
./configure --prefix=%{_qtdir} -confirm-license -opensource -system-sqlite -opengl desktop where _qtdir is /opt/custom/SENSOR.
My problem is that the %install step fails by trying to install directly to /opt/custom/SENSOR instead of under the BUILDROOT directory. I've tried setting DESTDIR and prefix with no luck, e.g.
%install
make install prefix=%{_buildrootdir}/%{sensor}.Qt-%{version}-1.el7_9.x86_64%{_qtdir}
How do I get make install to respect an installation directory other than what was given to the configure script?
It is supposed to work like
make install DESTDIR=%{_buildrootdir}
Distributions may have some macros defined to help you there, e.g. on Fedora
%build
%configure
%make_build
%install
%make_install

Manually Built Qt incorrect configuration Paths

My machine use Ubuntu OS.
I built Qt 5.5.1 manually against static linking. Configuring the built, specified a path to install to:
$ ./configure -static -prefix /home/myname/qt_src/installed/
Then I moved the built stuff to another Ubuntu machine and tried call qmake from a shell:
$ qmake CONFIG+=release CONFIG-=debug /home/othername/project/q_panorama.pro -r -spec linux-g++
But I stucked with error
Could not find qmake configuration file linux-g++
Trying to fix it, I discovered that qmake's QTDIR (is it?) is incorrect:
$ qmake -v
QMake version 3.0
Using Qt version 5.5.1 in /home/myname/qt_src/installed/
Okay. Try to change special var with qmake -set option (here consider only one of vars - QT_INSTALL_PREFIX, - for simplicity). First, check it's consistency:
$ qmake -query QT_INSTALL_PREFIX
/home/myname/qt_src/installed/
Perform:
$ qmake -set QT_INSTALL_PREFIX "/home/othername/qt_static/"
Check again:
$ qmake -query QT_INSTALL_PREFIX
/home/myname/qt_src/installed/
Why the variable does not modify?
How can I make Manually Built static version of Qt work? Please, help.
Did not find the way to resolve the issue, and thus decided to act with brute force:
Created a user othername in my machine;
Run full build cycle for the path desired (under the user created).
Copied the built stuff to the target machine
PROFIT.

qmake set install directory

I'm trying to build Qwt to a custom location. The obvious thing to try is a PREFIX option, but it had no effect and the make install still failed:
$ qmake qwt.pro PREFIX='/my/path'
$ make
$ make install
mkdir: cannot create directory `/usr/local/qwt-5.2.3': Permission denied
There seem to be numerous other questions and answers to this question, which also have no effect and fail:
How to change qmake PREFIX location: qmake -set prefix '/my/path'
How can the install path be set for a qt project: make; INSTALL_ROOT=/my/path; make install
Any other suggestions?
QMake version 2.01a
Using Qt version 4.5.3 in /opt/Qt4/4.5.2/qtsdk-2009.04/qt/lib
RHEL 5.10
Try to edit the qwtconfig.pri file in the source directory, it has the installation path hardcoded for different platforms, as well as many other options you might want to change.

qmake: could not find a Qt installation of '' - Setting up qmake?

qmake: could not find a Qt installation of ''
This thread was not of any help to me. qmake: could not find a Qt installation of ''.
How can I get qmake to recognize where the Qt folder is?
Right now it is installed in /opt/Qt5.1.0.
Have you installed the qt5-default ? You need to do this in addition to running the Qt supplier .run file.
sudo apt-get install qt5-default
This message shown by qtchooser app.
To setup it properly, you should make conf files in /etc/xdg/qtchooser/
for example:
$ ls -1 /etc/xdg/qtchooser/
default.conf
qt-4.8.5.conf
qt-5.1.0.conf
each file has two lines: path to bin, path to lib:
$ cat /etc/xdg/qtchooser/default.conf
/opt/Qt/4.8.5/bin
/opt/Qt/4.8.5/lib
additional info: man qtchooser
The solution for me on this problem was to specify the QT version, as this message was being generated by /usr/bin/qtchooser
So in my case, it was QT4 I was trying to use, and running:
qmake
generated the error (could not find a Qt installation of '')
qmake -qt=qt4
fixed that error though. In my case, it was a Ruby Gem trying to compile with qmake, so I couldn't get it to pass in that extra command line argument, so I instead added this to my profile
export QT_SELECT=qt4
And now QT4 runs just fine on my Ubuntu system.
For me the symlink to default.conf was missing in /usr/share/qtchooser. It wasn't enough to put it into /etc/xdg/qtchooser.

Install qwt library on OS X Lion

I've downloaded qwt-6.0.1 and then tried to install qwt
. First i try to generate MakeFile :
qmake -spec macx-g++
this is ok. When i try to compile sources with make i get after a while
/bin/sh: /Developer/Tools/Qt/moc: No such file or directory
make: *** [moc/moc_qwt_dyngrid_layout.cpp] Error 127
From last versions ,Xcode is installed in Applications folder not in Developer ,Apple deleted this folder it can not be founded. I think here is the issue, but i do not know how to configure this, to make compile process to be successful
Can someone provide a way to install qwt on Mac ?
The commands should be run from the qwt directory where project.pro is in, not in src.
stephen-mac:qwt-6.0.1 stephenc$ qmake -spec macx-g++
stephen-mac:qwt-6.0.1 stephenc$ make
...

Resources