Cross compiling library not found

  • Dear all,

    I am getting an error (probably a beginner error), however I can't resolve it on my own. I looked online for similar problems and their solutions and tried to incorporate them into the qmake file but it didn't work, I get always the same error.

    So, what is my problem about. I am trying to cross compile Qt libraries 4.7.4 for embedded Linux on Ubuntu 11.04 (I also tried on 11.10 in a virtual machine but I got the same error), I tried to cross compile it using the arm-linux-gnueabi-gcc-4.4 and arm-linux-gnueabi-g++-4.4. My qmake configuration file looks like this:


    qmake configuration for building with arm-none-linux-gnueabi-g++


    modifications to g++.conf


    #Compiler Flags to take advantage of the ARM architecture
    QMAKE_CFLAGS_RELEASE = -O3 -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -march=armv7-a -marm
    QMAKE_CXXFLAGS_RELEASE = -O3 -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -march=armv7-a -marm

    QMAKE_INCDIR = /usr/arm-linux-gnueabi/include # path to compiled includes
    QMAKE_LIBDIR = /usr/arm-linux-gnueabi/lib # path to compiled libs
    QMAKE_LFLAGS += -Wl,-rpath-link=/usr/arm-linux-gnueabi/lib,-rpath=/usr/arm-linux-gnueabi/lib
    QMAKE_RPATHDIR += /usr/arm-linux-gnueabi/lib

    modifications to g++.conf

    QMAKE_CC = arm-linux-gnueabi-gcc-4.4
    QMAKE_CXX = arm-linux-gnueabi-g++-4.4
    QMAKE_LINK = arm-linux-gnueabi-g++-4.4
    QMAKE_LINK_SHLIB = arm-linux-gnueabi-g++-4.4

    modifications to linux.conf

    QMAKE_AR = arm-linux-gnueabi-ar cqs
    QMAKE_OBJCOPY = arm-linux-gnueabi-objcopy
    QMAKE_STRIP = arm-linux-gnueabi-strip


    My configuration which I run:

    ./configure -opensource -confirm-license -prefix /opt/qt-arm -no-qt3support -embedded arm -little-endian -xplatform qws/linux-DM3730-g++ -platform qws/linux-x86-g++ -release -qtlibinfix E
    (I have also tried without the "-platform qws/linux-x86-g++" )

    And the error I get after I type in "make" (maybe after 30-45 minutes of time):

    arm-linux-gnueabi-g++-4.4 -Wl,-rpath-link,/home/refik/qtEmb/qt-everywhere-opensource-src-4.7.4/lib -Wl,-rpath-link=/usr/arm-linux-gnueabi/lib,-rpath=/usr/arm-linux-gnueabi/lib -fno-exceptions -Wl,-O1 -Wl,-rpath,/usr/arm-linux-gnueabi/lib -Wl,-rpath,/opt/qt-arm/lib -Wl,-rpath,/opt/qt-arm/lib -o ../spectrum .obj/release-shared-emb-arm/main.o .obj/release-shared-emb-arm/engine.o .obj/release-shared-emb-arm/frequencyspectrum.o .obj/release-shared-emb-arm/levelmeter.o .obj/release-shared-emb-arm/mainwidget.o .obj/release-shared-emb-arm/progressbar.o .obj/release-shared-emb-arm/settingsdialog.o .obj/release-shared-emb-arm/spectrograph.o .obj/release-shared-emb-arm/spectrumanalyser.o .obj/release-shared-emb-arm/tonegenerator.o .obj/release-shared-emb-arm/tonegeneratordialog.o .obj/release-shared-emb-arm/utils.o .obj/release-shared-emb-arm/waveform.o .obj/release-shared-emb-arm/wavfile.o .obj/release-shared-emb-arm/moc_engine.o .obj/release-shared-emb-arm/moc_levelmeter.o .obj/release-shared-emb-arm/moc_mainwidget.o .obj/release-shared-emb-arm/moc_progressbar.o .obj/release-shared-emb-arm/moc_settingsdialog.o .obj/release-shared-emb-arm/moc_spectrograph.o .obj/release-shared-emb-arm/moc_spectrumanalyser.o .obj/release-shared-emb-arm/moc_tonegeneratordialog.o .obj/release-shared-emb-arm/moc_waveform.o .obj/release-shared-emb-arm/qrc_spectrum.o -L/home/refik/qtEmb/qt-everywhere-opensource-src-4.7.4/lib -L/usr/arm-linux-gnueabi/lib -L.. -lfftreal -lQtMultimediaE -L/home/refik/qtEmb/qt-everywhere-opensource-src-4.7.4/lib -L/usr/arm-linux-gnueabi/lib -lQtGuiE -lQtNetworkE -lQtCoreE -lpthread
    /usr/lib/gcc/arm-linux-gnueabi/4.4.5/../../../../arm-linux-gnueabi/bin/ld: warning:, needed by /usr/arm-linux-gnueabi/lib/, not found (try using -rpath or -rpath-link)
    make[3]: Leaving directory /home/refik/qtEmb/qt-everywhere-opensource-src-4.7.4/demos/spectrum/app' make[2]: Leaving directory/home/refik/qtEmb/qt-everywhere-opensource-src-4.7.4/demos/spectrum'
    make[1]: Leaving directory `/home/refik/qtEmb/qt-everywhere-opensource-src-4.7.4/demos'

    If I understood the error message correctly, the library "" is missing, however I can find it in "/usr/arm-linux-gnueabi/lib". So I created a file "sudo vim /etc/" and added the following:

    Lib for ARM

    And then I typed in: sudo ldconfig -v
    And tried with make confclean and same configuration as above, however I got the same error. So I assume it is something I am doing wrong of which I am not even aware of?

    Did anyone have a similar error, and if how did he solve it?

    Thank you all. I am looking forward for you help.

    Best regards,

Log in to reply

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