Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75261

Build fails with parentheses in DESTDIR

    XMLWordPrintable

Details

    • macOS
    • 99b1719c1eb96e71894068f60eacf4ef261ca0e5 (qt/qtbase/5.12)

    Description

      If DESTDIR has parentheses in it, the build fails.

      • create a new lib with the wizard
      • add the following to the .pro:
        DESTDIR = "$$shadowed($$PWD)/../foo (bar)"
        

      Trying to build it fails:

      /bin/sh: -c: line 0: syntax error near unexpected token `('
      /bin/sh: -c: line 0: `test -d ../foo\ (bar)/ || mkdir -p ../foo\ (bar)/'
      make: *** [../foo (bar)/libtestlib.1.0.0.dylib] Error 2
      

      This is because the generated makefile rules aren't quoted/escaped properly:

      ../foo\ (bar)/libtestlib.1.0.0.dylib:  $(OBJECTS) $(SUBLIBS) $(OBJCOMP)  
      	@test -d ../foo\ (bar)/ || mkdir -p ../foo\ (bar)/
      

      Workaround is obviously to take out the parens, but it should work with them.

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            asm Andy M
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes