Qt5 and qmake creates large makefiles



  • I've successfully cross-compiled Qt5 and deployed on my development host. When using the cross-compiled qmake on the host it creates makefiles that are very large and contain repeated entries of rpath and library paths. It also includes indexes to all the Qt5 header files so a single makefile can easily grow up to 11.000 lines.
    My configure line is like:
    @./configure -top-level -arch armhf -xplatform linux-arm-sl-gnueabi-g++ -opensource -eglfs -no-openvg -no-opengl -opengl es2 -no-xcb -no-pch -device linux-imx6-g++ -device-option CROSS_COMPILE=arm-linux-gnueabihf- -no-sse -no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -hostprefix /opt/pluto-targets/armhf-rootfs//usr -confirm-license -make tools -make examples -no-dbus -optimized-qmake -openssl -reduce-relocations -no-xvideo -no-cups -no-dbus -no-glib -qt-zlib -no-nis -no-cups -qt-libpng -qt-libjpeg -no-audio-backend -no-separate-debug-info -no-rpath -prefix /usr -sysroot /opt/pluto-targets/armhf-rootfs/ --fully-process -v
    @

    If I remove the -sysroot ... from the configure line it will create a qmake which will produce a smaller Makefile because it excludes all the Qt5 header file indexes. It still contains repeated entries of the rpath and library paths.

    Any idea what might cause qmake to behave this way ?

    my mkspec is like:
    @

    qmake configuration for building with g++

    MAKEFILE_GENERATOR = UNIX
    CONFIG += incremental gdb_dwarf_index
    QMAKE_INCREMENTAL_STYLE = sublib

    include(../common/linux.conf)
    include(../common/gcc-base-unix.conf)
    include(../common/g++-unix.conf)

    ROOTFS_PATH = /opt/pluto-targets/i386-rootfs
    QMAKE_INCDIR += $${ROOTFS_PATH}/usr/include $${ROOTFS_PATH}/usr/include/freetype2
    QMAKE_INCDIR += $${ROOTFS_PATH}/usr/local/include
    QMAKE_LIBDIR += $${ROOTFS_PATH}/usr/lib $${ROOTFS_PATH}/lib
    QMAKE_LIBDIR += $${ROOTFS_PATH}/usr/local/lib $${ROOTFS_PATH}/usr/lib/qt5-pluto

    modifications to g++.conf

    QMAKE_CC = i586-unknown-linux-gnu-gcc
    QMAKE_CXX = i586-unknown-linux-gnu-g++
    QMAKE_LINK = i586-unknown-linux-gnu-g++
    QMAKE_LINK_SHLIB = i586-unknown-linux-gnu-g++
    QMAKE_RCC += $${ROOTFS_PATH}/usr/bin/rcc
    QMAKE_RCC_DEP += $$QMAKE_RCC
    QMAKE_UIC += $${ROOTFS_PATH}/usr/bin/uic
    QMAKE_UIC_DEP += $$QMAKE_UIC

    # modifications to linux.conf

    QMAKE_AR = i586-unknown-linux-gnu-ar cqs
    QMAKE_OBJCOPY = i586-unknown-linux-gnu-objcopy
    QMAKE_STRIP = i586-unknown-linux-gnu-strip

    QMAKE_LIBS = -ldl -licui18n -licuuc -licudata -Wl,-rpath-link,$${ROOTFS_PATH}/usr/lib/qt5-pluto --sysroot=$${ROOTFS_PATH}

    QMAKE_CFLAGS += --sysroot=$${ROOTFS_PATH} -O2
    QMAKE_CXXFLAGS += --sysroot=$${ROOTFS_PATH}
    QMAKE_LFLAGS += --sysroot=$${ROOTFS_PATH}
    load(qt_config)
    @

    Could there be some problem with the definition of sysroot somewhere in the configuration or mkspecs that causes qmake to go crazy when creating its makefiles. It simply will recursively add those entries I mentioned above.

    regards
    Einar



  • Anybody experiencing this problem ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.