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. error from /bin/sh when compiling under Linux
Forum Updated to NodeBB v4.3 + New Features

error from /bin/sh when compiling under Linux

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 2 Posters 3.3k 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.
  • nulluseN Offline
    nulluseN Offline
    nulluse
    wrote on last edited by
    #1

    Did a fresh install of Qt5.6 on a Linux box and opened a project with the source that builds fine on the same machine under Netbeans. But it does not build under QtCreator:

    10:04:39: Running steps for project MandelbrotQt...
    10:04:39: Configuration unchanged, skipping qmake step.
    10:04:39: Starting: "/usr/bin/make" 
    g++ -c -pipe -g -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -IC:/Program\ Files\ (x86)/AMD\ APP\ SDK/3.0/include -I../../Qt/5.6/gcc_64/include -I../../Qt/5.6/gcc_64/include/QtWidgets -I../../Qt/5.6/gcc_64/include/QtGui -I../../Qt/5.6/gcc_64/include/QtConcurrent -I../../Qt/5.6/gcc_64/include/QtNetwork -I../../Qt/5.6/gcc_64/include/QtCore -I. -I. -I../../Qt/5.6/gcc_64/mkspecs/linux-g++ -o main.o main.cpp
    /bin/sh: -c: line 0: syntax error near unexpected token `('
    /bin/sh: -c: line 0: `g++ -c -pipe -g -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -IC:/Program\ Files\ (x86)/AMD\ APP\ SDK/3.0/include -I../../Qt/5.6/gcc_64/include -I../../Qt/5.6/gcc_64/include/QtWidgets -I../../Qt/5.6/gcc_64/include/QtGui -I../../Qt/5.6/gcc_64/include/QtConcurrent -I../../Qt/5.6/gcc_64/include/QtNetwork -I../../Qt/5.6/gcc_64/include/QtCore -I. -I. -I../../Qt/5.6/gcc_64/mkspecs/linux-g++ -o main.o main.cpp'
    make: *** [main.o] Error 1
    10:04:39: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project MandelbrotQt (kit: Desktop Qt 5.6.0 GCC 64bit)
    When executing step "Make"
    10:04:39: Elapsed time: 00:00.
    
    p3c0P 1 Reply Last reply
    0
    • nulluseN nulluse

      Did a fresh install of Qt5.6 on a Linux box and opened a project with the source that builds fine on the same machine under Netbeans. But it does not build under QtCreator:

      10:04:39: Running steps for project MandelbrotQt...
      10:04:39: Configuration unchanged, skipping qmake step.
      10:04:39: Starting: "/usr/bin/make" 
      g++ -c -pipe -g -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -IC:/Program\ Files\ (x86)/AMD\ APP\ SDK/3.0/include -I../../Qt/5.6/gcc_64/include -I../../Qt/5.6/gcc_64/include/QtWidgets -I../../Qt/5.6/gcc_64/include/QtGui -I../../Qt/5.6/gcc_64/include/QtConcurrent -I../../Qt/5.6/gcc_64/include/QtNetwork -I../../Qt/5.6/gcc_64/include/QtCore -I. -I. -I../../Qt/5.6/gcc_64/mkspecs/linux-g++ -o main.o main.cpp
      /bin/sh: -c: line 0: syntax error near unexpected token `('
      /bin/sh: -c: line 0: `g++ -c -pipe -g -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -IC:/Program\ Files\ (x86)/AMD\ APP\ SDK/3.0/include -I../../Qt/5.6/gcc_64/include -I../../Qt/5.6/gcc_64/include/QtWidgets -I../../Qt/5.6/gcc_64/include/QtGui -I../../Qt/5.6/gcc_64/include/QtConcurrent -I../../Qt/5.6/gcc_64/include/QtNetwork -I../../Qt/5.6/gcc_64/include/QtCore -I. -I. -I../../Qt/5.6/gcc_64/mkspecs/linux-g++ -o main.o main.cpp'
      make: *** [main.o] Error 1
      10:04:39: The process "/usr/bin/make" exited with code 2.
      Error while building/deploying project MandelbrotQt (kit: Desktop Qt 5.6.0 GCC 64bit)
      When executing step "Make"
      10:04:39: Elapsed time: 00:00.
      
      p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi @nulluse,
      The project that you are compiling seems to include Windows paths(?) which the compiler is unable to parse properly. Check the .Pro file.

      157

      1 Reply Last reply
      1
      • nulluseN Offline
        nulluseN Offline
        nulluse
        wrote on last edited by nulluse
        #3

        Yes, I have the OpenCL include and libs paths from the Windows machine.
        How can I make them multiplatform in the .pro file?

        p3c0P 1 Reply Last reply
        0
        • nulluseN nulluse

          Yes, I have the OpenCL include and libs paths from the Windows machine.
          How can I make them multiplatform in the .pro file?

          p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          @nulluse It is probably included in your project's (MandelbrotQt ?) .pro file.

          157

          1 Reply Last reply
          0
          • nulluseN Offline
            nulluseN Offline
            nulluse
            wrote on last edited by
            #5

            Sorry, I do not follow.

            p3c0P 1 Reply Last reply
            0
            • nulluseN Offline
              nulluseN Offline
              nulluse
              wrote on last edited by
              #6

              For now I converted the paths to the Linux format, but still need to make this multiplatform in the .pro file.
              The project still does not build: http://pastebin.com/raw/KmT1NnhN
              Tons of errors outside of the project source code. This builds just fine under MingW. Is it incompatible with GCC 4.8.3?

              $ gcc --version
              gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)
              Copyright (C) 2013 Free Software Foundation, Inc.
              This is free software; see the source for copying conditions.  There is NO
              warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
              
              p3c0P 1 Reply Last reply
              0
              • nulluseN nulluse

                Sorry, I do not follow.

                p3c0P Offline
                p3c0P Offline
                p3c0
                Moderators
                wrote on last edited by
                #7

                @nulluse I'll try to explain.
                When you compile your project MandelbrotQt the compiler tries to compile main.cpp against some set of libraries some dependent paths for header files. The following line shows it:
                g++ -c -pipe -g -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -IC:/Program\ Files\ (x86)/AMD\ APP\ SDK/3.0/include -I../../Qt/5.6/gcc_64/include -I../../Qt/5.6/gcc_64/include/QtWidgets -I../../Qt/5.6/gcc_64/include/QtGui -I../../Qt/5.6/gcc_64/include/QtConcurrent -I../../Qt/5.6/gcc_64/include/QtNetwork -I../../Qt/5.6/gcc_64/include/QtCore -I. -I. -I../../Qt/5.6/gcc_64/mkspecs/linux-g++ -o main.o main.cpp

                Notice the path C:/Program\ Files\ (x86)/AMD\ APP\ SDK/3.0/include.
                First this Windows OS specific path shouldn't be there when you compile the project on Unix based system.
                So now that it is included accidentally when the compiler encounters this path, it is unable to parse it due to space or special characters in the path.
                In case of Qt this user defined path is actually added from projects .pro file.
                So you have to modify the pro file so that the platform dependent paths are picked up accordingly or just remove these Windows OS based paths for quick test.

                157

                1 Reply Last reply
                1
                • nulluseN nulluse

                  For now I converted the paths to the Linux format, but still need to make this multiplatform in the .pro file.
                  The project still does not build: http://pastebin.com/raw/KmT1NnhN
                  Tons of errors outside of the project source code. This builds just fine under MingW. Is it incompatible with GCC 4.8.3?

                  $ gcc --version
                  gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)
                  Copyright (C) 2013 Free Software Foundation, Inc.
                  This is free software; see the source for copying conditions.  There is NO
                  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
                  
                  p3c0P Offline
                  p3c0P Offline
                  p3c0
                  Moderators
                  wrote on last edited by
                  #8

                  @nulluse

                  For now I converted the paths to the Linux format, but still need to make this multiplatform in the .pro file.

                  For that you have these and thesevariables to be defined in .pro file.

                  Is it incompatible with GCC 4.8.3?

                  Not sure about it. What version of gcc MingW uses ?

                  157

                  1 Reply Last reply
                  1
                  • nulluseN Offline
                    nulluseN Offline
                    nulluse
                    wrote on last edited by
                    #9

                    I don't know GCC version as I do not have access to the Windows machine this came from. All I know they have installed the current as of today version of Qt5 with MingW 4.9.2 toolchain.

                    p3c0P 1 Reply Last reply
                    0
                    • nulluseN nulluse

                      I don't know GCC version as I do not have access to the Windows machine this came from. All I know they have installed the current as of today version of Qt5 with MingW 4.9.2 toolchain.

                      p3c0P Offline
                      p3c0P Offline
                      p3c0
                      Moderators
                      wrote on last edited by
                      #10

                      @nulluse Unfortunately I too don't know what is leading to those errors. What is at line 3 of main.cpp ?

                      157

                      1 Reply Last reply
                      0

                      • Login

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