Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Something is adding a "-L/usr/local/lib" to the directfb test for cross compiling.
Forum Update on Tuesday, May 27th 2025

Something is adding a "-L/usr/local/lib" to the directfb test for cross compiling.

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 2 Posters 6.8k 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.
  • K Offline
    K Offline
    KennethR
    wrote on 19 Nov 2010, 20:12 last edited by
    #1

    Hi,

    I'm trying to build an embedded Qt with this command,
    ./configure -platform linux-g++-64 -xplatform qws/linux-x86-intelce-g++ -embedded x86 -qt-gfx-directfb -v -opensource -confirm-license

    I'm using Ubuntu 64 bit but building for intelce which is 32bit x86. The test for direc fb is failing because "-L/usr/local/lib" is being added to the makery for the test, and it's finding the 64 bit libpthread and failing.

    my qmake.conf for the qws/linux-x86-intelce-g++ target is defining as
    QT_LIBS_DIRECTFB = -L/usr/local/cross/staging/current/lib -L/usr/local/cross/staging/current/usr/lib -L/usr/local/cross/staging/current/usr/local/lib -ldirectfb -lfusion -ldirect -lpthread -Wl,-rpath-link,/usr/local/cross/staging/current/lib

    The verbose and error output of configure is:
    i686-cm-linux-g++ -m32 -L/usr/local/cross/staging/current/lib -L/usr/local/cross/staging/current/usr/lib -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.7.1-i386/lib -o directfb directfb.o -L/usr/local/lib -L/usr/local/cross/staging/current/lib -L/usr/local/cross/staging/current/usr/lib -L/usr/local/cross/staging/current/usr/local/lib -ldirectfb -lfusion -ldirect -lpthread -Wl,-rpath-link,/usr/local/cross/staging/current/lib
    /lib/libpthread.so.0: file not recognized: File format not recognized
    collect2: ld returned 1 exit status
    make: *** [directfb] Error 1
    DirectFB disabled.
    The DirectFB screen driver functionality test failed!

    Any idea where the LIBDIR for /usr/local/lib is added and how I can remove it? I tried just removing it from the makefile, but the makefile is generated every time configure is run, I haven't been able to find out what it is being created from.

    Thanks,
    Ken R

    1 Reply Last reply
    0
    • A Offline
      A Offline
      anselmolsm
      wrote on 19 Nov 2010, 20:56 last edited by
      #2

      The linker error itself is:

      @
      /lib/libpthread.so.0: file not recognized: File format not recognized
      @

      The error happens because the linker is trying to use the wrong libpthread for cross compilation.

      Anselmo L. S. Melo (anselmolsm)

      1 Reply Last reply
      0
      • K Offline
        K Offline
        KennethR
        wrote on 19 Nov 2010, 21:08 last edited by
        #3

        @anselmolsm Any idea what I'm doing wrong that's causing it to use the wrong lib?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          anselmolsm
          wrote on 19 Nov 2010, 21:40 last edited by
          #4

          @KennethR, do you have a libpthread built for the target platform? It seems it is not in any of the directories informed to the linker with -L, so it tries to find in the default paths (e.g. /lib). Check that, your cross compilation environment probably has this library.

          Anselmo L. S. Melo (anselmolsm)

          1 Reply Last reply
          0
          • K Offline
            K Offline
            KennethR
            wrote on 22 Nov 2010, 16:49 last edited by
            #5

            I did have a libpthread built for the target, I was able to get Qt to build correctly by adding a --sysroot=/usr/local/cross/staging/current to the QT_LIBS_DIRECTFB variable in my qmake.conf.

            1 Reply Last reply
            0

            1/5

            19 Nov 2010, 20:12

            • Login

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