Pierre Labastie wrote:
Hi,
The aim of this mail is to share some frustration about Qt4 and Qtwebkit. This
is a big package, so that faillures always happen tens of minute after the
beginning of the build. And I keep getting failures!
Let's try to summarize:
- First, as already noted in another thread, /opt/qt4/bin has to be in $PATH
for building qtwebkit.
I can agree. My systems inherit that from previous builds, but I
suspect you are right for a virgin install.
- Then, one script in qtwebkit (Tools/qmake/syncqt-4.8) needs QTDIR to be
defined in the environment.
Same thing; the issue is a virgin build. We have the
/etc/profile.d/qt4.sh script at the end.
For me, the whole thing takes 12.6 SBU (about 20 minutes), but I do use
-j10. However see my attached scripts. Note that stats must be in
/usr/src and the make script must be run from the same directory as the
qt sources. The actual build is done in /tmp/qt4.
---------------
So that it seems that QTDIR should point to the top of the QT4 source.
Alas, when setting QTDIR to that, qtwebkit does not build.
No, it needs to be the top of the installed base qt directory:
QT4DIR=/opt/qt4
QTDIR=/opt/qt4
- In desperation, I just defined QTDIR to /opt/qt4/bin, and the build of
qtwebkit succeeded, but I got an error in the remaining part of the page: the
instructions after Qtwebkit installation assume that the working directory is
the top of the qt4 source directory, while it is actually the top of the
qtwebkit source.
- I then put the qtwebkit instructions between pushd and popd. But then,
qtwebkit build failed again! I guessed it was because qtwebkit had been
installed in /opt/qt4 at the previous step, and indeed, removing completely
/opt/qt4 allowed (at last) the build to pass.
For now, I'll put the PATH and QTDIR definition before the qtwebkit
instructions, and add pushd/popd to the instructions.
But still, the use of QTdir in qtwebkit build is a mystery. I think this
should be given some care after the release...
We need to get it right before release. It sounds like we just need to add
export QTDIR=$QT4PREFIX
just before the `Tools/Scripts/build-webkit` line.
-- Bruce
#!/bin/bash
function stats()
{
log=$1
tarball=$2
b4=$3
base_sbu=93
free_now=`df -k /tmp | grep / | sed -e "s/ \{2,\}/ /g" | cut -d" " -f3`
buildtime=`tail -n1 $log|cut -f1 -d" "`
sbu=`echo "scale=3; $buildtime / $base_sbu" | bc`
psizeK=`du -k $tarball | cut -f1`
psizeM=`echo "scale=3; $psizeK / 1024" | bc`
bsizeK=`echo "$free_now - $b4" | bc`
bsizeM=`echo "scale=3; $bsizeK / 1024" | bc`
echo "SBU=$sbu" | tee -a $log
echo "$psizeK $tarball size ($psizeM MB)" | tee -a $log
echo "$bsizeK kilobytes build size ($bsizeM MB)" | tee -a $log
(echo -n "md5sum : "; md5sum $tarball) | tee -a $log
(echo -n "sha1sum: "; sha1sum $tarball) | tee -a $log
echo "`date` $tarball" >> /usr/src/packages-$(lsb_release -r|cut -f2).log
}
TIMEFMT='%1R Elapsed Time - '
if [ $UID -ne 0 ]; then SUDO='sudo -E'; fi
#!/bin/bash
source /usr/src/stats
#######################
# Installing qt
DIR=`pwd`
VERSION=4.8.7
PROGRAM=qt-everywhere-opensource-src-$VERSION
LOG=$DIR/$PROGRAM.log
TITLE=$PROGRAM
TIMEFORMAT="$TIMEFMT $TITLE"
BUILDDIR=/tmp/qt4
rm -f $LOG
sudo rm -rf $BUILDDIR
mkdir $BUILDDIR
cd $BUILDDIR
sudo rm -rf /opt/qt-$VERSION
before1=`df -k /opt | grep / | sed -e "s/ \{2,\}/ /g" | cut -d' ' -f3`
before2=`df -k /tmp | grep / | sed -e "s/ \{2,\}/ /g" | cut -d' ' -f3`
tar -xf $DIR/$PROGRAM.tar.?z* || exit 1
cd $PROGRAM
{ time \
{
echo Making $TITLE
date
export QT4PREFIX=/opt/qt4 &&
$SUDO mkdir /opt/qt-$VERSION &&
$SUDO ln -sfnv qt-$VERSION $QT4PREFIX &&
./configure -prefix $QT4PREFIX \
-sysconfdir /etc/xdg \
-confirm-license \
-opensource \
-release \
-dbus-linked \
-openssl-linked \
-system-sqlite \
-plugin-sql-sqlite \
-no-phonon \
-no-phonon-backend \
-no-nis \
-no-webkit \
-no-openvg \
-nomake demos \
-nomake examples \
-optimized-qmake &&
#-qt-sql-sqlite \
#-qt-sql-mysql \
make -j10 &&
$SUDO make install &&
$SUDO rm -rf $QT4PREFIX/tests &&
$SUDO find $QT4PREFIX/lib/pkgconfig \
-name "*.pc" -exec perl -pi -e "s, -L$PWD/?\S+,,g" {} \; &&
for file in $QT4PREFIX/lib/libQt*.prl; do
$SUDO sed -r -e '/^QMAKE_PRL_BUILD_DIR/d' \
-e 's/(QMAKE_PRL_LIBS =).*/\1/' \
-i $file
done &&
mkdir qtwebkit-2.3.4 &&
pushd qtwebkit-2.3.4 &&
tar -xf $DIR/qtwebkit-2.3.4.tar.gz &&
patch -Np1 -i $DIR/qtwebkit-2.3.4-gcc5-1.patch &&
Tools/Scripts/build-webkit --qt --no-webkit2 --prefix=$QT4PREFIX
--makeargs=-j10 &&
$SUDO make -C WebKitBuild/Release install &&
popd &&
$SUDO install -v -dm755 /usr/share/pixmaps &&
$SUDO install -v -Dm644 src/gui/dialogs/images/qtlogo-64.png \
/usr/share/pixmaps/qt4logo.png &&
$SUDO install -v -Dm644
tools/assistant/tools/assistant/images/assistant-128.png \
/usr/share/pixmaps/assistant-qt4.png &&
$SUDO install -v -Dm644 tools/designer/src/designer/images/designer.png \
/usr/share/pixmaps/designer-qt4.png &&
$SUDO install -v -Dm644
tools/linguist/linguist/images/icons/linguist-128-32.png \
/usr/share/pixmaps/linguist-qt4.png &&
$SUDO install -v -Dm644 tools/qdbus/qdbusviewer/images/qdbusviewer-128.png \
/usr/share/pixmaps/qdbusviewer-qt4.png &&
$SUDO install -dm755 /usr/share/applications
}
} 2>&1 | tee -a $LOG
if [ $PIPESTATUS -ne 0 ]; then exit 1; fi;
stats $LOG $DIR/$PROGRAM.tar.?z* $before2
echo "`du -k $DIR/$PROGRAM.tar.?z*` size" | tee -a $LOG
after1=`df -k /opt | grep / | sed -e "s/ \{2,\}/ /g" | cut -d' ' -f3`
after2=`df -k /tmp | grep / | sed -e "s/ \{2,\}/ /g" | cut -d" " -f3`
echo "$(($after1-$before1)) kilobytes / install size - $PROGRAM" | tee -a $LOG
echo "$(($after2-$before2)) kilobytes / build size - $PROGRAM" | tee -a $LOG
exit 0
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page