Important: Please read the Qt Code of Conduct -

Getting an issue when compiling Qt source code (5.15.1) for 32 bit on Ubuntu 18.04 (64 bit).

  • I am new to Qt platform.
    I have followed below steps for compiling Qt source code (Qt 5.15.1) for 32 bit on Ubuntu 18.04 virtual machine.

    1. ./configure -platform linux-g++-32 -prefix /usr/local/Qt5.15.1_32bit
    2. make -j4
    3. make install

    I am getting below error after "make install" is executed

    make[3]: Entering directory '/home/Qt_5.15/qt-everywhere-src-5.15.1/qtlocation/src/positioning'
    rm -f
    g++ -m32 -Wl,--no-undefined -Wl,--version-script,QtPositioning.version -Wl,-O1 -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,$ORIGIN -shared -Wl,-Bsymbolic-functions -Wl,-soname, -o .obj/qgeoaddress.o .obj/qgeoareamonitorsource.o .obj/qgeoareamonitorinfo.o .obj/qgeoshape.o .obj/qgeorectangle.o .obj/qgeocircle.o .obj/qgeocoordinate.o .obj/qgeolocation.o .obj/qgeopositioninfo.o .obj/qgeopositioninfosource.o .obj/qgeosatelliteinfo.o .obj/qgeosatelliteinfosource.o .obj/qlocationutils.o .obj/qnmeapositioninfosource.o .obj/qgeopositioninfosourcefactory.o .obj/qdoublevector2d.o .obj/qdoublevector3d.o .obj/qgeopath.o .obj/qgeopolygon.o .obj/qlocationdata_simulator.o .obj/qwebmercator.o .obj/qdoublematrix4x4.o .obj/qclipperutils.o .obj/qgeocoordinateobject.o .obj/moc_qgeoareamonitorsource.o .obj/moc_qgeorectangle.o .obj/moc_qgeocircle.o .obj/moc_qgeocoordinate.o .obj/moc_qgeopositioninfosource.o .obj/moc_qgeosatelliteinfosource.o .obj/moc_qnmeapositioninfosource.o .obj/moc_qgeopolygon.o .obj/moc_qgeopath.o .obj/moc_qnmeapositioninfosource_p.o .obj/moc_qgeopath_p.o .obj/moc_qgeopolygon_p.o .obj/moc_qgeocoordinateobject_p.o /home/Qt_5.15/qt-everywhere-src-5.15.1/qtbase/lib/ -lpthread -L/home/Qt_5.15/qt-everywhere-src-5.15.1/qtlocation/lib -lclip2tri -lpoly2tri -lclipper
    /usr/bin/ld: cannot find -lclip2tri
    /usr/bin/ld: cannot find -lpoly2tri
    /usr/bin/ld: cannot find -lclipper
    collect2: error: ld returned 1 exit status
    Makefile:213: recipe for target '../../lib/' failed
    make[3]: *** [../../lib/] Error 1
    make[3]: Leaving directory '/home/Qt_5.15/qt-everywhere-src-5.15.1/qtlocation/src/positioning'
    Makefile:141: recipe for target 'sub-positioning-install_subtargets' failed
    make[2]: *** [sub-positioning-install_subtargets] Error 2
    make[2]: Leaving directory '/home/Qt_5.15/qt-everywhere-src-5.15.1/qtlocation/src'
    Makefile:60: recipe for target 'sub-src-install_subtargets' failed
    make[1]: *** [sub-src-install_subtargets] Error 2
    make[1]: Leaving directory '/home/Qt_5.15/qt-everywhere-src-5.15.1/qtlocation'
    Makefile:827: recipe for target 'module-qtlocation-install_subtargets' failed
    make: *** [module-qtlocation-install_subtargets] Error 2

    Can anyone suggest what I am missing or any libraries is required ?

  • Lifetime Qt Champion

    @Praveen-Illa You need to install x86 compiler and libs. Search with apt for i386. Compiler would be gcc-8-base:i386

  • @jsulm Thanks for your response.
    I have installed i386 libraries and the gcc compiler versions installed are gcc-multilib and g++-multilib.
    After running conguration command, am getting below errors.

    WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.

    Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation.
    On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution.
    On macOS, you can use Homebrew's llvm package.
    On Windows, you must set LLVM_INSTALL_DIR to the installation path.

    ERROR: Feature 'system-pcre2' was enabled, but the pre-condition 'libs.pcre2' failed.

    ERROR: Feature 'ssl' was enabled, but the pre-condition 'config.winrt || features.securetransport || features.openssl || features.schannel' failed.

    ERROR: Feature 'system-jpeg' was enabled, but the pre-condition 'features.jpeg && libs.libjpeg' failed.

  • Lifetime Qt Champion


    Did you install the corresponding development packages ?

    Note that your build is likely failing during the make step. There's no reason for make install to build or link anything if make was successful.

  • @SGaist said in Getting an issue when compiling Qt source code (5.15.1) for 32 bit on Ubuntu 18.04 (64 bit).:

    ur build is likely failing during the make step

    Yes, I have installed the libraries for i386. Below is the list of the libraries installed

    • sudo apt-get install -y libgl1-mesa-dev:i386 libglu1-mesa-dev:i386 pkg-config:i386 linux-libc-dev:i386 lib32ncurses5 lib32z1 libssl-dev:i386 libdbus-1-dev:i386 libxslt-dev:i386 libsqlite3-dev:i386 libjpeg-dev:i386 libpng-dev:i386 libasound2-dev:i386 libglib2.0-dev:i386 ninja-build:i386 cmake libxcursor-dev:i386 libxtst-dev:i386 libxcomposite-dev:i386 libxdamage-dev:i386 libxrandr-dev:i386 bison:i386 gperf:i386 flex:i386 ruby libbz2-dev:i386 libcap-dev:i386 libcups2-dev:i386 libdrm-dev:i386 libegl1-mesa-dev:i386 libpci-dev:i386 libudev-dev:i386 libxss-dev:i386 libsrtp0-dev:i386 libwebp-dev:i386 libjsoncpp-dev:i386 libopus-dev:i386 libminizip-dev:i386 libavutil-dev:i386 libavformat-dev:i386 libavcodec-dev:i386 libevent-dev:i386 libicu-dev:i386 libxml2-dev:i386 gir1.2-atspi-2.0:i386 libncurses5:i386 lib32ncurses5 lib32z1 libnspr4-dev:i386 libnss3-dev:i386

     sudo apt-get install libfontconfig1-dev:i386 libfreetype6-dev:i386 libx11-dev:i386 libx11-xcb-dev:i386 libxext-dev:i386 libxfixes-dev:i386 libxi-dev:i386 libxrender-dev:i386 libxcb1-dev:i386 libxcb-glx0-dev:i386 libxcb-keysyms1-dev:i386 libxcb-image0-dev:i386 libxcb-shm0-dev:i386 libxcb-icccm4-dev:i386 libxcb-sync0-dev:i386 libxcb-xfixes0-dev:i386 libxcb-shape0-dev:i386 libxcb-randr0-dev:i386 libxcb-render-util0-dev:i386 libxcb-xinerama0-dev:i386 libxkbcommon-dev:i386 libxkbcommon-x11-dev:i386 libatspi2.0-dev:i386

     sudo apt-get install libgstreamer1.0-0:i386 gstreamer1.0-plugins-base:i386 gstreamer1.0-plugins-good:i386 gstreamer1.0-plugins-bad:i386 gstreamer1.0-plugins-ugly:i386 gstreamer1.0-libav:i386 gstreamer1.0-doc:i386 gstreamer1.0-tools:i386 gstreamer1.0-x:i386 gstreamer1.0-alsa:i386 gstreamer1.0-gl:i386 gstreamer1.0-gtk3:i386 gstreamer1.0-qt5:i386 gstreamer1.0-pulseaudio:i386 libclang-dev:i386

     sudo apt-get install libcurl3:i386 libcurl-openssl1.0-dev:i386
     sudo apt-get install -y gcc-multilib g++-multilib

  • Lifetime Qt Champion

    Then call make without the j argument to see where exactly it dials.

    One thing, you should disable the build of tests and examples. That will save you a lot of time and space.

  • @SGaist
    I havent executed make command. The errors are getting after executing the configure line command

  • Lifetime Qt Champion

    I would do a fresh out of source build using the additional options I suggested and then start a single threaded build to see what exactly is happening.

  • Lifetime Qt Champion

    @Praveen-Illa You can probably save time installing a virtual machine with 32bit Linux in it and build there instead of trying to do cross-compilation which can be cumbersome :-)

  • @jsulm As you suggested, i have successfully compiled Qt 5.15.1 sources on 32 bit machine (Ubuntu 16.04).
    How do I install the latest version of qt creator (4.11.x) which are 64 bits on 32 bit machine ? Can you please suggest ?

  • Lifetime Qt Champion

    Hi @Praveen-Illa,

    there are no 32 bit builds of Creator anymore.

    You can either use the Creator shipped with Ubuntu (which will be rather old) or compile it yourself from source, as described here:

    I just have the feeling, that Ubuntu 16.04 is too old, as nowadays Creator requires gcc-7.

    Best regards

  • @SGaist, @jsulm, @aha_1980

    Thanks for your support.
    The issue is resolved now and captured in below forum

Log in to reply