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

Bad linker string created, linker faults on bad flag not meant for it.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 1.16.0, 2.5.0
    • None
    • Linux 32bit, 5.15.160, slackware. Using GCC compiler suite. Attempting to compile Tiled program using slackbuilds scripts.
    • Linux/X11

    Description

      Addendum: Slackbuild has old version, so tried version 2.5.0, gotten from QBS source.
      It produces the SAME EXACT BUG. The linker string collects the -pthread switch which follows it in the command.

      Compiling project "Tiled" from slackbuilds.  This works for other users, but fails on 32bit Linux and the exact stimulus is unknown.

      Examination shows that a switch "-pthread" is being passed to the linker, and the linker rejects it.  Other user (64bit) does not get this switch passed at all.  This slackbuild has been used by other users, and supposedly the creator of it. so this issue is triggered by something that QBS detects, and there is no way for me to diagnose what that is.

      It is a bug because the QBS is trying to pass an empty string in the linker string ("-Wl ..."), and the empty string adds a comma.  There is no space before the next switch (-pthread), and so the "-pthread" switch gets sent to the linker too.  The linker does not want it.

      BUG1:  not handling an empty string correctly, and letting it add a comma and entry to linker string. The linker string is embedded in the g++ command line as things that are sent directly to the linker and not interpreted by g++, and starts with "-Wl".
      Irregardless of what is triggering the empty string, another problem in its own right, such a thing should not be allowed to generate a corrupted command line.

      "ERROR: /usr/bin/g++ Wl,-soname=libtiled.so,-as-needed,-m,elf_386,-pthread -shared -m32" (partial of 21 line command)
      Tests have shown that this will lead to a linker error (ld), until both the extraneous comma is removed and a space is inserted before "-pthread".

      BUG2: Not putting a space at the end of all linker strings.  That space is what the compiler is looking for to end that string, and to be robust, there should always be a space included, and not relying upon some other party to MAYBE have a space there.

      BUG3: The python detection is issuing bogus errors that must be bypassed in the slackbuilds script. The bogus python errors are causing the QBS slackbuild to fail too. This one was noticed by the 64bit user too.

      "Building qbs from the SlackBuild throws a bogus error about not being able to install $PKG/usr/share/qbs/python/dmgbuild/colors.py. Inspection shows the file was actually installed successfully,"

      The QBS was also compiled using a slackbuilds script. It has worked for other users.
      This user has compiled many slackbuilds, and also actively writes free software using such compiler.

      Reference :
      link LinuxQuestions QBS and compile of tiled editor fails on slackbuild

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            self_acct_qbs_1 W. D. Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes