I was not going to write again, here.
Some note are written at the top. main part is written inline or at the
bottom.
However, yesterday night, almost couldn't sleep, thinking a lot about
this issue.
I was wrong. Bruce was wrong. It is possible to have simple instructions
and the alternatives being:
One qta at /usr/ other at /opt/qtb (a-4, b=5, or a=5, b=4)
Both at /opt/qt4,5
I was wrong, because I wanted at /usr/qt4,5, not simply /usr
Bruce was wrong, because the extra switches are really completely
unnecessary.
Em 20-06-2015 16:54, Bruce Dubbs escreveu:
Fernando de Oliveira wrote:
Minor point, I see
-bindir $QT4BINDIR \
-bindir $QT5BINDIR \
but no definition of the variables.
Good catch. That should be $QT4PREFIX/bin. The $QT4BINDIR came from
the systemd book and I intended to change it and indeed, that is what I
have in my scripts.
Also, all the ones having qt5 or qt4 could be avoided, just using:
QT5PREFIX=/{opt,usr}/qt{4,5}
So, the configure would be simply:
./configure -prefix $QT5PREFIX \
-confirm-license \
-opensource \
-dbus-linked \
-openssl-linked \
-journald \
-system-harfbuzz \
-system-sqlite \
-nomake examples \
-no-rpath \
-optimized-qmake \
-skip qtwebengine &&
lines
First one, below, after you told that it is default
-sysconfdir /etc/xdg \
-bindir $QT5BINDIR \
-headerdir $QT5PREFIX/include/qt5 \
-archdatadir $QT5PREFIX/lib/qt5 \
-datadir $QT5PREFIX/share/qt5 \
-docdir $QT5PREFIX/share/doc/qt5 \
-translationdir $QT5PREFIX/share/qt5/translations \
-examplesdir $QT5PREFIX/share/doc/qt5/examples \
or
-sysconfdir /etc/xdg \
-bindir $QT4BINDIR \
-plugindir $QT4PREFIX/lib/qt4/plugins \
-importdir $QT4PREFIX/lib/qt4/imports \
-headerdir $QT4PREFIX/include/qt4 \
-datadir $QT4PREFIX/share/qt4 \
-docdir $QT4PREFIX/share/doc/qt4 \
-translationdir $QT4PREFIX/share/qt4/translations \
-demosdir $QT4PREFIX/share/doc/qt4/demos \
-examplesdir $QT4PREFIX/share/doc/qt4/examples \
being completely surpefluous.
I'm pretty sure all those are defaults, but I don't think it hurts to
leave them in this case. It's such a complex package when you consider
both qt4 and qt5, that specificity provides the user some valuable
information.
No, they are not defaults. They are there only for the systems which do
the trick of trying to install both qt's at /usr. As you wrote in the
page, this is impossible. Then the trick is to displace everything
(including /usr/bin) but /usr/lib to /default/qt4,5. Then they use
qtchooser to do the "magic" of having the system and applications being
fooled that the chosen system qt4 or 5 is at /usr. Notice that at
/usr/bin you only have qtchooser, no qmake, assistant, ..., those are
symlinks to qtchooser, the actual ones are under /usr/bin/qt4,5.
If there were *only one qt*, no need for those switches.
But this is exactly the case of BLFS: "Both packages cannot be installed
in the same directory". Notice that the libraries are the exception,
they can be installed at the same directory, but not the plugins,
translations...
Therefore, we need to think that there is *only one qt*, when installing
at user. Because the other qt will not be there, we do not need to do
the separation, e.g.
/usr/include/qt4
/usr/include/qt5
We only need the default, /usr/include.
Those lines should be removed from the book. They are *not default*.
They are intended to be used when trying
*qt4, qt5 and qtchooser at /usr*.
But I would recommend to comment them out and include a note that they
are intended for use if qtchooser any time is included in the book.
The other fix I found at the pages are for the removal of references to
the build directory.
Fixes:
1. remove unneeded non-default paths (this will take care also of
QT4BINDIR and QT5BINDIR
2. Fix "removal of references to the build directory"
Result:
./configure -prefix $QT5PREFIX \
-confirm-license \
-opensource \
-dbus-linked \
-openssl-linked \
-journald \
-system-harfbuzz \
-system-sqlite \
-nomake examples \
-no-rpath \
-optimized-qmake \
-skip qtwebengine &&
and
./configure -prefix $QT4PREFIX \
-confirm-license \
-opensource \
-release \
-dbus-linked \
-openssl-linked \
-system-sqlite \
-no-phonon \
-no-phonon-backend \
-no-openvg \
-nomake demos \
-nomake examples \
-optimized-qmake &&
Not 100% sure about point 2:
sed -e "s:$PWD/qtbase:$QT5PREFIX/lib/qt5:g" \
-i $QT5PREFIX/lib/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri &&
find $QT5PREFIX/lib/lib{qgsttools_p,Qt5*}.prl -exec sed -i -r \
'/^QMAKE_PRL_BUILD_DIR/d;s/(QMAKE_PRL_LIBS =).*/\1/' {} \;
and
for file in 3Support CLucene Core DBus Declarative DesignerComponents \
Designer Gui Help Multimedia Network OpenGL Script \
ScriptTools Sql Svg Test UiTools WebKit XmlPatterns Xml
phonon; do
[ -e $QT4PREFIX/lib/libQt${file}.prl ] &&
sed -r '/^QMAKE_PRL_BUILD_DIR/d;s/(QMAKE_PRL_LIBS =).*/\1/' \
-i $QT4PREFIX/lib/libQt${file}.prl
done
unset file
Unfortunately, we still have left in each page different instructions
for /usr or /opt/qt4.5 regarding the files:
/etc/profile.d/qt{4,5}.sh
/etc/ld.so.conf
********************************************************************************
Just for the sake of comparison, at Ubuntu:
$ for file in assistant designer lconvert linguist lrelease lupdate
moc pixeltool qcollectiongenerator qdbus qdbuscpp2xml
qdbusviewer qdbusxml2cpp qdoc3 qhelpconverter
qhelpgenerator qmake qmlplugindump qmlviewer qt3to4
qtconfig qttracereplay rcc uic uic3 xmlpatterns
xmlpatternsvalidator; do ls -l /usr/bin/$file; done; unset
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/assistant -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/designer -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/lconvert -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/linguist -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/lrelease -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/lupdate -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/moc -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/pixeltool -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/qcollectiongenerator ->
qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/qdbus -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/qdbuscpp2xml -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/qdbusviewer -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/qdbusxml2cpp -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/qdoc3 -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/qhelpconverter -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/qhelpgenerator -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/qmake -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/qmlplugindump -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/qmlviewer -> qtchooser
ls: não é possível acessar /usr/bin/qt3to4: Arquivo ou diretório não
encontrado
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/qtconfig -> qtchooser
ls: não é possível acessar /usr/bin/qttracereplay: Arquivo ou diretório
não encontrado
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/rcc -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/uic -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/uic3 -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/xmlpatterns -> qtchooser
lrwxrwxrwx 1 root root 9 Out 6 2014 /usr/bin/xmlpatternsvalidator ->
qtchooser
--
[]s,
Fernando
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page