Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1028

Cross compiling from x86_64 to x86 fails to link

    XMLWordPrintable

Details

    • 9260c1ccbe40f67e92204d35f781cd4167084753

    Description

      Any project should be able to demonstrate this. Use 32bit Qt version and try to build. Looks like -m32 flag is not passed to g++ when linking which leads to output like this:

      linking qbs_32bit
      /usr/bin/g++ -Wl,--unresolved-symbols=ignore-in-shared-libs -Wl,-rpath,/home/jopoikel/work/qt/32bit/qtbase/lib '-Wl,-rpath,$ORIGIN' -L/home/jopoikel/work/qt/32bit/qtbase/lib -o /home/jopoikel/work/by_name/build-qbs_32bit-32bit-Debug/qtc_32bit_0c622edd-debug/qbs-32bit.qtc-32bit-0c622edd.228a1124/qbs_32bit /home/jopoikel/work/by_name/build-qbs_32bit-32bit-Debug/qtc_32bit_0c622edd-debug/qbs-32bit.qtc-32bit-0c622edd.228a1124/.obj/3a52ce780950d4d9/main.cpp.o /home/jopoikel/work/qt/32bit/qtbase/lib/libQt5Core.so.5.7.0 -lpthread
      /home/jopoikel/work/qt/32bit/qtbase/lib/libQt5Core.so.5.7.0: error adding symbols: File in wrong format
      collect2: error: ld returned 1 exit status
      Process failed with exit code 1.
      

      Setting cpp.platformLinkerFlags to -m32 fixes the issue.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jakepetroules Jake Petroules (DO NOT ASSIGN ISSUES)
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes