[Interest] question about relocating Qt library installation

Darren Dale dsdale24 at gmail.com
Mon Aug 4 15:47:55 CEST 2014


Hello,

I'm working on project to provide a Qt5 conda package. Briefly, conda is an
open source package manager developed by Continuum Analytics (with whom I
am not affiliated) that deals with conflicting software stacks by creating
isolated environments (especially good for scientific software). In
practice, one writes a recipe like https://github.com/ddale/qt5-conda-recipe
for conda to build a platform-specific binary, and then anyone can use
conda to install that binary into some arbitrary environment for example
~/envs/qt5. So its a little different from the standard linux package
manager, where the installation point is known at build time, but very
similar to what Qt package installers have to do on Windows. Conda takes
care of things like patchelf, and my recipe takes care of creating the
appropriate qt.conf files.

If I configure qt5 with the assumption that I don't have to worry about
conflicts with qt4 in the same environment, which I did in
https://github.com/ddale/qt5-conda-recipe/tree/8f88a7657f5a5c84383d0238605c30a3d81494b6
, then I can successfully build qt5 in one environment, install it in
another, and I can also build and install a PyQt5 conda package against
that library, and run the PyQt5 examples.

So far, so good, but the next step was to configure the qt5 package for
installation alongside qt4, based on the strategy at
http://www.linuxfromscratch.org/blfs/view/7.4/x/qt5.html . The conda recipe
at
https://github.com/ddale/qt5-conda-recipe/tree/32fe321c58bdbbed3a50e227fd519c46a96314b9
does this. I am testing in an environment without qt4 installed. It is
partially working, in that I can build the binary, install it in
~/envs/qt5, and run designer. The recipe installs qt.conf files such that
qmake -query yields expected results:

$ ~/envs/qt5/lib/qt5/bin/qmake -query
QT_SYSROOT:
QT_INSTALL_PREFIX:/home/darren/envs/qt5
QT_INSTALL_ARCHDATA:/home/darren/envs/qt5/lib/qt5/mkspecs
QT_INSTALL_DATA:/home/darren/envs/qt5/share/qt5
QT_INSTALL_DOCS:/home/darren/envs/qt5/doc
QT_INSTALL_HEADERS:/home/darren/envs/qt5/include/qt5
QT_INSTALL_LIBS:/home/darren/envs/qt5/lib
QT_INSTALL_LIBEXECS:/home/darren/envs/qt5/libexec
QT_INSTALL_BINS:/home/darren/envs/qt5/lib/qt5/bin
QT_INSTALL_TESTS:/home/darren/envs/qt5/tests
QT_INSTALL_PLUGINS:/home/darren/envs/qt5/lib/qt5/plugins
QT_INSTALL_IMPORTS:/home/darren/envs/qt5/lib/qt5/imports
QT_INSTALL_QML:/home/darren/envs/qt5/qml
QT_INSTALL_TRANSLATIONS:/home/darren/envs/qt5/translations
QT_INSTALL_CONFIGURATION:
QT_INSTALL_EXAMPLES:/home/darren/envs/qt5/examples
QT_INSTALL_DEMOS:/home/darren/envs/qt5/examples
QT_HOST_PREFIX:/home/darren/envs/qt5
QT_HOST_DATA:/home/darren/envs/qt5
QT_HOST_BINS:/home/darren/envs/qt5/bin
QT_HOST_LIBS:/home/darren/envs/qt5/lib
QMAKE_SPEC:linux-g++
QMAKE_XSPEC:linux-g++
QMAKE_VERSION:3.0
QT_VERSION:5.3.1

However,  when I try to build PyQt5, qmake reports errors like "Could not
find qmake configuration file linux-g++". If I define QMAKESPEC (which I
don't think that should be necessary, since my qt.conf file defines
ArchData), I get errors like "Cannot find feature spec_pre.prf", or
"Project ERROR: Unknown module(s) in QT: core".

I spent a good part of the weekend looking for information on the web. I'm
not certain I understand the problem, but am certain there must be a
solution, since the Qt installer for windows can install to an arbitrary
location. I found a short discussion at http://stackoverflow.com/a/17640221
, talking about how qmake, Qt5Core, and a few other files need to be
patched, but did not understand exactly what needs to be patched, and how.
(Please excuse me for not understanding the c++ code that was posted.) Is
there any documentation on how to do this?

Thanks,
Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140804/eb0486c0/attachment.html>


More information about the Interest mailing list