Error while configuring Qt for arm : bin/rcc: while loading shared libraries: /buildroot/build_arm/staging_dir/lib/libstdc++.so.6: ELF file OS ABI invalid



  • Hi there,

    I am trying to build qt v4.5.3 for embedded linux for arm based platoform using build root "uClibc" cross compiler.
    Following is the exact ./configure command line used:
    ./configure -embedded arm -xplatform mkspecs/qws/linux-arm-g++ -bindir /buildroot/build_arm/staging_dir/bin -libdir /buildroot/build_arm/staging_dir/lib -headerdir /buildroot/build_arm/staging_dir/include -little-endian

    However, while running ./configure .... command, I am getting a lot of errors (for cross compiled libstdc++.so):
    " bin/rcc: while loading shared libraries: /buildroot/build_arm/staging_dir/lib/libstdc++.so.6: ELF file OS ABI invalid".

    I think it has something to do with EABI "bin/rcc" trying to use OABI cross compiled libstdc++, library.
    I can not change the cross-compiler toolchain as the current rootfs on which I want to run the QT Webkit is built using the same compiler. However, I am ok moving back to any version of qt+webkit that supports/uses OABI.

    Any help/pointers will be much appreciated.

    Thanks,
    Monika.



  • @monika_7 Don't use QtWebKit that comes with Qt 4.5. It was still in early stage of development, so had lots of bugs and feature gaps. Not to mention that it's based on WebKit from 2008 or so, and it;s pretty much useless (and insecure) for current web.

    As fir OABI vs EABI, this is probably a matter of QMAKE_CFLAGS/QMAKE_CXXFLAGS. If you want non-default option, copy respective mkspec (something in mkspecs/qws/...arm...) and add your compiler flags there



  • Hi Konstantin and et al,

    As per your suggestion, I upgraded the qt version to v4.6.0.
    Following is the ./configure command used:
    ./configure -opensource -confirm-license -embedded arm -platform linux-g++-32 -xplatform /qt-everywhere-opensource-src-4.6.0/mkspecs/qws/linux-arm-g++ -depths all -prefix /usr/local/Trolltech/Qt-4.6_test-arm-cross -webkit -scripttools -no-rpath -script -javascript-jit

    It gets successfully executed (with no errors). However, while running make command, i am getting following error:
    "../JavaScriptCore/wtf/Platform.h:328:6: #error "Not supported ARM architecture"

    My kernel architecture is arch/arm/Kconfig (CONFIG_IWMMXT & CONFIG_CPU_PXA168) - Marvell Armada 166E (Compatible to ARMv5TE InstructionSet).
    However, I am not able to find this exact entry in ../JavaScriptCore/wtf/Platform.h file.
    Can you please suggest the correct arm configuration/switch (in ./configure) for my processor type.

    Thanks,
    Monika.



  • @monika_7

    • Don't use Qt 4.6, it's also long obsolete. AFAIK its QtWebKit is based on same WebKit branch as 4.5, just with bug fixes and new APIs. If you cannot upgrade to Qt 5, get Qt 4.8 and QtWebKit 2.3
    • You need to disable JIT, it is not supported for ARMv5


  • Thanks Konstantin for your time and inputs.

    When we use QT v4.6 and run ./configure with "-no-javascript-jit & -no-webkit" (configure successful), we are getting following error when we run make:
    "../JavaScriptCore/wtf/Platform.h:328:6: #error "Not supported ARM architecture"

    When we use Qtv4.8 and run ./configure with "-no-javascript-jit & -no-webkit" (configure successful), we are getting following error when we run make:
    thread/qmutex_unix.cpp: In member function bool QMutexPrivate::wait(int)': thread/qmutex_unix.cpp:113: error:FUTEX_WAIT' undeclared (first use this function)
    thread/qmutex_unix.cpp: In member function void QMutexPrivate::wakeUp()': thread/qmutex_unix.cpp:136: error:FUTEX_WAKE' undeclared (first use this function)
    make[1]: *** [.obj/release-shared-emb-arm/qmutex_unix.o] Error 1
    Can these error be due to older version of headers/libraries? I have to stick to my old version of headers & libraries as my rootfs & other applications are using older version of uClibc.

    Any help on selecting correct arm configuration/switch (in ./configure) for my processor to build Qt v4.6 will be highly helpful.

    Thanks,
    Monika.



  • @monika_7 -no-javascript-jit is not affecting qtwebkit. You need to pass DEFINES+=ENABLE_JIT=0 to qmake, probably by adding it to your mkspec (I don't know better way how to pass qmake arguments to configure, though maybe it exists)

    However, if you build QtWebKit separately from Qt (as you should, QtWebKit 2.3 is not a part of Qt release), yoiu can pass that argument to qmake without changing mkspec.

    As for FUTEX_WAIT compilation error: you may need to define some things yourself, because uclibc may be missing necessary definition (esp. if you use old version). This code may work: https://gist.github.com/EXL/9c0209f61b61a0b7a134#file-qt4-8-6_arm_linux_gnu_gcc_3_3_6_for_moto_ezx-patch-L266 (disregard __GNUC_PREREQ checking, and check SYS_futex value with your kernel headers)



  • Hi Konstantin and et al.,

    Thanks for your inputs/pointers, I have gone past the "Not supported ARM architecture" issue by selecting the exact option to select correct arm architecture "-iwmmxt" (in our case). This arm architecture option is available in qt v4.5.3 and not listed in any of the later QT releases.

    Following is the ./configure command used:
    ./configure -opensource -confirm-license -embedded arm -platform linux-g++-32 -xplatform /qt_4.5.3/qt-embedded-linux-opensource-src-4.5.3/mkspecs/qws/linux-arm-g++ -depths all -prefix /usr/local/Trolltech/Qt-4.5.3_test-arm-cross -no-webkit -scripttools -no-rpath -little-endian -iwmmxt

    This command gets successfully executed i.e. without any errors.
    However, I am getting following errors when I run "make":

    /qt_4.5.3/qt-embedded-linux-opensource-src-4.5.3/lib/libQtGui.so: undefined reference to `logf'

    /qt_4.5.3/qt-embedded-linux-opensource-src-4.5.3/lib/libQtGui.so: undefined reference to `cosf'

    /qt_4.5.3/qt-embedded-linux-opensource-src-4.5.3/lib/libQtGui.so: undefined reference to `sinf'

    The definitions of these functions is usually found in libc.so/libmath.so. We do not have pre-compiled libmath.so and our libc does not have these function definitions.
    Is there an option/way to work around these errors?Any help/pointers will be much appreciated.

    Thanks,
    Monika.



  • @monika_7 These functions must be defined in libc (in case of uclibc and other implementations) or libm (in case of glibc). If you don't have them, reconfigure your uclibc


Log in to reply
 

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