Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. /bin/sh: 1: Syntax error: "(" unexpected ??
Forum Update on Monday, May 27th 2025

/bin/sh: 1: Syntax error: "(" unexpected ??

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 3.6k Views
  • 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    My buggy OS is "at work" .
    Periodically it get an entry in Qt editor which I did not make , especially when doing "cut and paste". My build process usually finds the extras, but this time it is in make somewhere...

    I do not know how to access the make file.

    I can successfully build and run a project .
    After few simple edit another build gets me this :

    :-1: error: [ui_mainwindow.h] Error 2
    

    I need a SUGGESTION to find and correct this error.
    Can I access makefilke "/bin/sh " using QtCreator IDE ?

    I prefer not to monkey with anything attached to "make / qmake" - when things works Qt tIDE DOES THE job (for me ) just fine.

    or when I "Run qmake " get this OK output

    09:26:57: Running steps for project TEST_PROJECT...
    09:26:57: Starting: "/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" '/media/d/QT/CAT_MDI_24 (copy)/CAT_V1 11_1_2021 (copy)_WORKS/TEST_PROJECT.pro' -r -spec linux-g++-64 CONFIG+=debug
    09:26:57: The process "/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" exited normally.
    09:26:57: Elapsed time: 00:00.
    

    I honestly do not know how I got this output :

    09:16:09: Running steps for project TEST_PROJECT...
    09:16:09: Configuration unchanged, skipping qmake step.
    09:16:09: Starting: "/usr/bin/make" -j4
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../../CAT_MDI_24\ (copy)/CAT_V1\ 11_1_2021\ (copy)_WORKS/mainwindow.ui -o ui_mainwindow.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../../CAT_MDI_24\ (copy)/CAT_V1\ 11_1_2021\ (copy)_WORKS/mainwindow_cat_tab.ui -o ui_mainwindow_cat_tab.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../../CAT_MDI_24\ (copy)/CAT_V1\ 11_1_2021\ (copy)_WORKS/dialogtest.ui -o ui_dialogtest.h
    Makefile:571: recipe for target 'ui_mainwindow.h' failed
    Makefile:574: recipe for target 'ui_mainwindow_cat_tab.h' failed
    Makefile:577: recipe for target 'ui_dialogtest.h' failed
    **/bin/sh: 1: Syntax error: "(" unexpected
    /bin/sh: 1: Syntax error: "(" unexpected**
    /bin/sh: 1: make: *** [ui_mainwindow.h] Error 2
    Syntax error: "(" unexpected
    make: *** Waiting for unfinished jobs....
    make: *** [ui_mainwindow_cat_tab.h] Error 2
    make: *** [ui_dialogtest.h] Error 2
    09:16:09: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project TEST_PROJECT (kit: Desktop)
    When executing step "Make"
    09:16:09: Elapsed time: 00:00.
    

    PS
    I try to exit and reload the project and SAME error persist.
    Once the "(" unexpected is there it won't go away - it needs to be manually deleted is my best guess.

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Don't use ( and ) in your path (but a proper VCS instead hundreds of copies of your source code in different folders)

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      A 1 Reply Last reply
      2
      • Christian EhrlicherC Christian Ehrlicher

        Don't use ( and ) in your path (but a proper VCS instead hundreds of copies of your source code in different folders)

        A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by
        #3

        @Christian-Ehrlicher said in /bin/sh: 1: Syntax error: "(" unexpected ??:

        Don't use ( and ) in your path (but a proper VCS instead hundreds of copies of your source code in different folders)

        SOLVED

        That did it, thanks.
        I have been making OS copies and rename them , thus "loosing" the () generated by OS "copy" .
        Still like to know how did you figure this out.
        The extended error was pointing to the make(file) , like to know how to actually access the file... but can work on that.

        JonBJ 1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @AnneRanch said in /bin/sh: 1: Syntax error: "(" unexpected ??:

          know how to actually access the file

          Use an editor...

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0
          • A Anonymous_Banned275

            @Christian-Ehrlicher said in /bin/sh: 1: Syntax error: "(" unexpected ??:

            Don't use ( and ) in your path (but a proper VCS instead hundreds of copies of your source code in different folders)

            SOLVED

            That did it, thanks.
            I have been making OS copies and rename them , thus "loosing" the () generated by OS "copy" .
            Still like to know how did you figure this out.
            The extended error was pointing to the make(file) , like to know how to actually access the file... but can work on that.

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #5

            @AnneRanch
            I would suggest you do not try to edit the Makefile. It is generated via qmake from Creator, you're not supposed to alter it.

            In addition to having followed @Christian-Ehrlicher's advice not to have ( or ) in your path names, under Linux at least you might like not to put spaces into file/directory names, as you have done. Up to you, yes you can do, but it can potentially lead to complications/errors that you just do not need to fight with....

            A 1 Reply Last reply
            2
            • JonBJ JonB

              @AnneRanch
              I would suggest you do not try to edit the Makefile. It is generated via qmake from Creator, you're not supposed to alter it.

              In addition to having followed @Christian-Ehrlicher's advice not to have ( or ) in your path names, under Linux at least you might like not to put spaces into file/directory names, as you have done. Up to you, yes you can do, but it can potentially lead to complications/errors that you just do not need to fight with....

              A Offline
              A Offline
              Anonymous_Banned275
              wrote on last edited by
              #6

              @JonB
              Would you kindly suggest how to veryfy, further analyze this error?
              There is a difference between modifying the file and trying to find out more about error. Your reply is somewhat superfluous - it does no address the issue at all.

              JonBJ 1 Reply Last reply
              0
              • A Anonymous_Banned275

                @JonB
                Would you kindly suggest how to veryfy, further analyze this error?
                There is a difference between modifying the file and trying to find out more about error. Your reply is somewhat superfluous - it does no address the issue at all.

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by JonB
                #7

                @AnneRanch

                Your reply is somewhat superfluous - it does no address the issue at all.

                Thanks as usual for your response, you have a nice way of phrasing things. Fine, follow @Christian-Ehrlicher's advice not to include ( ) in your paths, which caused you a problem, and ignore mine not to include spaces, which can also can cause problems. Better still, go ahead and edit the Makefile generated by Creator to your heart's content. Or just look at it, and see what you make of the error messages from your /bin/sh & make knowledge. There's little point trying to advise you.

                1 Reply Last reply
                1

                • Login

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