Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Cross compiling library not found
Forum Updated to NodeBB v4.3 + New Features

Cross compiling library not found

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 3.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    refik
    wrote on 23 Nov 2011, 21:59 last edited by
    #1

    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++

    include(../../common/g++.conf)
    include(../../common/linux.conf)
    include(../../common/qws.conf)

    modifications to g++.conf

    #Toolchain

    #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

    load(qt_config)
    @

    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: libc.so, needed by /usr/arm-linux-gnueabi/lib/libgcc_s.so.1, 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 "libc.so" is missing, however I can find it in "/usr/arm-linux-gnueabi/lib". So I created a file "sudo vim /etc/ld.so.conf.d/my.conf" and added the following:
    @

    Lib for ARM

    /usr/arm-linux-gnueabi/lib
    /usr/arm-linux-gnueabi/include
    @
    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,
    Refik

    1 Reply Last reply
    0

    1/1

    23 Nov 2011, 21:59

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved