Qt 4.8.5 ARM cross compile error (cannot find -lbootstrap)

  • Hi,
    I have been wrestling with this for two days, scouring internet, and so on. Not the first time I've cross compiled Qt for ARM either, but something is haywire with this release - before I file a bug report for the build system I want to see if anyone else has had this problem or can tell me where I am screwing up ..

    The configure looks like this:

    ./configure -prefix /usr/local/qt4.8.5 -embedded arm -xplatform qws/linux-arm-gnueabihf-g++ -no-glib -no-opengl -no-largefile -no-accessibility -no-openssl -no-gtkstyle -nomake examples -nomake tests -no-audio-backend -no-phonon -no-phonon-backend -no-svg -no-webkit -no-script -no-scripttools -no-javascript-jit -no-nis -no-webkit -no-qt3support -qt-sql-sqlite -qt-zlib -no-gif -no-libtiff -qt-libpng -no-libmng -qt-libjpeg -no-opengl -qt-freetype -nomake demos -opensource -confirm-license -no-multimedia -nomake doc -cups -sysroot /home/jp/targets/exports/debug -plugin-mouse-tslib -nomake tools

    The target is the same qmake.conf as for qws/linux-arm-gnueabi but for a linaro (4.7) hardfloat compiler.

    The sysroot is a stock Debian arm system I have already been working with (mounted root=nfs remotely).

    The error is as follows (snipped to the last for brevity):

    arm-linux-gnueabihf-g++ -Wl,-rpath-link,/home/jp/src/qt-everywhere-opensource-src-4.8.5/lib --sysroot=/home/jp/targets/exports/debug -Wl,-O1 -Wl,-rpath,/usr/local/qt4.8.5/lib -Wl,-rpath,/usr/local/qt4.8.5/lib -o ../../../bin/lrelease .obj/release-shared-emb-arm/main.o .obj/release-shared-emb-arm/numerus.o .obj/release-shared-emb-arm/translator.o .obj/release-shared-emb-arm/translatormessage.o .obj/release-shared-emb-arm/qm.o .obj/release-shared-emb-arm/qph.o .obj/release-shared-emb-arm/po.o .obj/release-shared-emb-arm/ts.o .obj/release-shared-emb-arm/xliff.o .obj/release-shared-emb-arm/ioutils.o .obj/release-shared-emb-arm/proitems.o .obj/release-shared-emb-arm/profileparser.o .obj/release-shared-emb-arm/profileevaluator.o -L/home/jp/src/qt-everywhere-opensource-src-4.8.5/src/tools/bootstrap -lbootstrap
    /opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lbootstrap
    collect2: error: ld returned 1 exit status

    This is quite reproducible - I have done confclean, removed and unpacked tar.gz again, even downloaded a new one .. no dice.

    So, I went into src/tools/bootstrap and ran qmake and make manually - which build libbootstrap, after which the build continued .. but, lrelease had been built as an ARM binary. Shortly later the build system attempts to run lrelease (on the host - x86_64), which, of course, fails. Stuck right there.

    I don't really use lrelease and it isn't clear to me
    A. why it was built at all when "-nomake tools" was specified
    B. why it is built for ARM
    C. why the make attempts to use it on the host?

    Anyone have any ideas how to fix this?

    Thanks in advance!

  • On further examination I noticed this message after running configure:
    Project MESSAGE: Unknown PROJECT: libss
    Project MESSAGE: Unknown PROJECT: libss

    Hmmm. Then tried disabling translations .. aha!

    Creating makefiles. Please wait...

    Qt is now configured for building. Just run 'make'.
    Once everything is built, you must run 'make install'.
    Qt will be installed into /usr/local/qt4.8.5

    To reconfigure, run 'make confclean' and 'configure'.

    jp@plato:~/src/qt-everywhere-opensource-src-4.8.5$ make
    make: Nothing to be done for `first'.

    ... so, a quick hack on configure shows me that the only thing in $CFG_BUILD_PARTS is "libss".

    I'll try to fix the configure ... brb.

  • SOLVED: "-nomake docs" instead of "-nomake doc"

    This is the one part that does not follow the pattern of the name for the "nomake" corresponding to the directory name .. <qt_srcdir>/doc - a little misleading when the rest are "tests", "examples", "tools" - etc. Since there was no [ahm] "docs" that said what the parts that -nomake removes may be I assumed the directory name (like the others ..).

    However, the little sed trick to remove a part from $CFG_BUILD_PARTS does not check to see if it is a valid part name - it simply removes the string given on the command line (with the proceeding space). Thus "libs docs" becomes "libss" when " doc" is removed ..

    Dunno if it is properly a bug or merely fragile code but its a gotcha - hopefully this post shows up in the engines for someone ... and maybe someone would add a check in the configure? Like, for example:

    *** configure 2013-09-10 15:17:27.598431913 -0600
    --- configure.orig 2013-09-10 14:57:13.458373739 -0600
    *************** while [ "$#" -gt 0 ]; do
    *** 1548,1568 ****
    ! nomake)
    ! #ensure this is a valid part to remove
    ! validpart=0
    ! checkparts="$QT_DEFAULT_BUILD_PARTS tests"
    ! for p in $checkparts;do
    ! if [ "$p" = "$VAL" ]; then
    ! validpart=1;
    ! fi
    ! done
    ! if [ $validpart -ne 0 ]; then
    ! else
    ! echo "-nomake: Invalid part name: $VAL"
    ! UNKNOWN_OPT=yes
    ! fi
    --- 1548,1555 ----
    ! nomake)


Log in to reply

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