Quantcast
Channel: Qt DevNet forums: Installation and Deployment
Viewing all articles
Browse latest Browse all 2113

[Howto] Building Qt 5.2.1 (including Webkit) on RHEL5 (Linux CentOS 5.7)

$
0
0
Hi folks! Just few notes on how to build Qt (+Webkit) on Red Hat Linux 5 flavors (tested on an up-to-date CentOS 5.7) This message might be useful for folks who want to build a recent Qt version on older architectures without too much troubles – the problem being that many required packages are often out-of-date (such as binutils, flex, etc.) Diagnostic messages are sometimes a bit hard to track when a dependency is missing (such as “Project ERROR: Unknown module(s) in QT: quick”), and sometimes Webkit build will just be skipped, too. You’ll have to adapt the given information to your needs (especially the patches provided below), but it may help people who are stuck on a build :) Remarks, improvements and (un)successful builds reports are welcome! Link to the correct compiler (ie. not GCC 4.1.*) There is probably a much cleaner way to do this, by the way – but it will do the trick for now: if gcc --version | grep -q 4\.1 ; then mkdir /tmp/gcc ln -s /usr/bin/gcc44 /tmp/gcc/gcc ln -s /usr/bin/g++44 /tmp/gcc/g++ export PATH=/tmp/gcc:$PATH hash -r fi Assuming GCC 4.4 has been installed, of course Download dependencies Some of them might be unneeded (especially certain XCB components) through… # Download packages (versions may vary) for i in \   http://sqlite.org/2014/sqlite-autoconf-3080300.tar.gz \   http://download.icu-project.org/files/icu4c/50.1.2/icu4c-50_1_2-src.tgz \   http://heanet.dl.sourceforge.net/project/flex/flex-2.5.37.tar.gz \   http://ftp.gnu.org/gnu/gperf/gperf-3.0.4.tar.gz \   http://xmlsoft.org/sources/libxml2-2.9.1.tar.gz \   http://xcb.freedesktop.org/dist/xcb-proto-1.10.tar.gz \   http://xcb.freedesktop.org/dist/libpthread-stubs-0.1.tar.gz \   http://xorg.freedesktop.org/archive/individual/proto/xproto-7.0.25.tar.gz \   http://xcb.freedesktop.org/dist/libxcb-1.10.tar.gz \   http://xcb.freedesktop.org/dist/xcb-util-0.3.9.tar.gz \   http://xcb.freedesktop.org/dist/xcb-util-image-0.3.9.tar.gz \   http://xcb.freedesktop.org/dist/xcb-util-keysyms-0.3.9.tar.gz \   http://xcb.freedesktop.org/dist/xcb-util-wm-0.4.0.tar.gz \   http://xcb.freedesktop.org/dist/xcb-util-renderutil-0.3.8.tar.gz \   http://xcb.freedesktop.org/dist/xcb-util-cursor-0.1.1.tar.gz \   ; do   test -f ${i##*/} || wget $i done Dependencies build: gperf, icu … # Prepare target TARGET=$PWD/qt5-install export PATH=${TARGET}/usr/local/bin:$PATH export LD_LIBRARY_PATH=${TARGET}/usr/local/lib # Build ICU tar xvf icu4c-50_1_2-src.tgz cd icu/source ./configure && make -j16 && make install DESTDIR=${TARGET} cd ../.. # Build the rest configopt=() configopt['libxml2']="--without-python" for i in \   sqlite-autoconf-3080300.tar.gz \   flex-2.5.37.tar.gz \   gperf-3.0.4.tar.gz  \   libxml2-2.9.1.tar.gz \   xcb-proto-1.10.tar.gz \   libpthread-stubs-0.1.tar.gz \   xproto-7.0.25.tar.gz \   libxcb-1.10.tar.gz \   xcb-util-0.3.9.tar.gz \   xcb-util-image-0.3.9.tar.gz \   xcb-util-keysyms-0.3.9.tar.gz \   xcb-util-wm-0.4.0.tar.gz \   xcb-util-renderutil-0.3.8.tar.gz \   xcb-util-cursor-0.1.1.tar.gz \   ; do test -d ${i%.*.*} && continue log=${i%.*.*}.log printf "*** Building $i ... " >&2 if ( \ tar xvf $i \   && cd ${i%.*.*} \   && PKG_CONFIG_PATH="${TARGET}/usr/local/lib/pkgconfig" \     ./configure -prefix ${TARGET}/usr/local ${configopt[${i%%-*}]} \   && make \   && make install \   && cd .. \   || exit 1 ) >${log} 2>&1 ; then   echo "OK" >&2 else   echo "ERROR" >&2   cat ${log}   exit 1 fi done echo "All done" >&2

Viewing all articles
Browse latest Browse all 2113

Trending Articles