Congratulations to our 2022 Qt Champions!

How to build Qt 5.1.1 with Webkit on Ubuntu 12.04?

  • Does someone have detailed instructions?

    I built and installed icu from icu4c-51_2-src.tgz,
    but configure does not find it because it does not see my include and lib locations:

    ICU auto-detection... ()
    g++ -c -pipe -O2 -Wall -W -fPIE -I../../../mkspecs/linux-g++ -I. -o icu.o icu.cpp
    g++ -Wl,-O1 -o icu icu.o -licuuc -licui18n
    /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/bin/ld: cannot find -licuuc
    /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/bin/ld: cannot find -licui18n
    collect2: ld returned 1 exit status
    make: *** [icu] Error 1
    ICU disabled.

    Is there a way to pass my lib and include locations? Should I untar icu somewhere into qt-everywhere-opensource-src-5.1.1 directory tree and build it together with Qt?

    So I use configure with -icu and -continue options.

    The build stops at:

    g++ -L/AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib64 -L/AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib -Wl,-O1 -Wl,-rpath,/AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/stow/qt-everywhere-opensource-src-5.1.1/lib -o ../../../bin/uic .obj/release-shared/customwidgetsinfo.o .obj/release-shared/databaseinfo.o .obj/release-shared/driver.o .obj/release-shared/treewalker.o .obj/release-shared/ui4.o .obj/release-shared/validator.o .obj/release-shared/cppextractimages.o .obj/release-shared/cppwritedeclaration.o .obj/release-shared/cppwriteicondata.o .obj/release-shared/cppwriteicondeclaration.o .obj/release-shared/cppwriteiconinitialization.o .obj/release-shared/cppwriteincludes.o .obj/release-shared/cppwriteinitialization.o .obj/release-shared/main.o .obj/release-shared/uic.o -L/home/zach/ZZ/qt-everywhere-opensource-src-5.1.1/qtbase/lib -lQt5Core -lpthread
    /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/bin/ld: warning:, needed by /home/zach/ZZ/qt-everywhere-opensource-src-5.1.1/qtbase/lib/, not found (try using -rpath or -rpath-link)
    /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/bin/ld: warning:, needed by /home/zach/ZZ/qt-everywhere-opensource-src-5.1.1/qtbase/lib/, not found (try using -rpath or -rpath-link)

    The libraries are available in the place specifies by the -L flag: -L/AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib

    Should I supply -rpath and -rpath-link to the configure options?
    How to do this?

    Help appreciated, Zach.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    To pass additional include path use the -I option when configuring and for libraries path -L.

    But since you're on Ubuntu, why not just install the dev package for icu (libicu-dev) ?

  • Moderators

    Please see the "official guide": You do not need to compile ICU yourself at all.

  • SGalst and slerdzlo, thank you.
    I am creating/maintaining a tool chain, which contains everything our software needs for building an linking, except the most basic and common libs of Ubuntu. Our software runs on the Amazon cloud and on local computers and we rsync the tool chain. I managed to build Qt 5.1.1 by first compiling icu4c-51_2-src.tgz and gperf-3.0.4.tar.gz. My configure call is (I run it from a Perl script):

    ./configure -prefix $dict{prefix_path} -opensource -confirm-license -qt-libjpeg -qt-libpng -qt-zlib -qt-xcb -xrender -xrandr -xcursor -xfixes -fontconfig -xinput -sm -v -icu -continue -R $dict{install_path}/lib

    I ported all our code from Qt 4 to Qt 5.1.1, it compiles, but crashes on opening the GUI. I will post another question shortly after running the debug version.
    Regards, Zach.

Log in to reply