Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt project failing compilation with no discernible error

Qt project failing compilation with no discernible error

Scheduled Pinned Locked Moved Solved Installation and Deployment
11 Posts 3 Posters 1.3k 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.
  • K Offline
    K Offline
    Karlovsky120
    wrote on 13 Aug 2020, 07:31 last edited by
    #1

    I'm porting a qt project that compiles on a MacOS to Windows. I've managed to more or less fix all of the compiler errors, but I'm now met with this:

    18 warnings generated.
    	  /OUT:debug\editor.exe @C:\Users\User\AppData\Local\Temp\editor.exe.10472.84781.jom
    The system cannot find the path specified.
    jom: C:\Source\build-project-qt-Desktop_Qt_5_12_9_MSVC2017_64bit-Debug\src\Makefile.Debug [debug\editor.exe] Error 1
    jom: C:\Source\build-project-qt-Desktop_Qt_5_12_9_MSVC2017_64bit-Debug\src\Makefile [debug] Error 2
    jom: C:\Source\build-project-qt-Desktop_Qt_5_12_9_MSVC2017_64bit-Debug\Makefile [sub-src-make_first] Error 2
    02:32:53: The process "C:\Users\User\msvc_make.bat" exited with code 2.
    Error while building/deploying project project (kit: Desktop Qt 5.12.9 MSVC2017 64bit)
    When executing step "Make"
    

    I've been looking for hours and I have no idea why this isn't being generated. I would very much like to not disable JOM if I don't have to (not that I haven't tried, setting CMake generator in the kit to NMake Makefiles with Codeblock instead of NMake Makefiles JOM with Codeblocks just gives me the same error).

    This is the part of the Makefile.debug file which seems to invoke the editor.exe:

    ####### Build rules
    
    first: all
    all: Makefile.Debug  debug\editor.exe
    
    debug\editor.exe: C:\Source\build-project-Desktop_Qt_5_12_9_MSVC2017_64bit-Debug\src\..\lib\cocos2d\debug\cocos2d.lib C:\Qt\Qt5.12.9\5.12.9\msvc2017_64\lib\Qt5OpenGLd.lib C:\Qt\Qt5.12.9\5.12.9\msvc2017_64\lib\Qt5Widgetsd.lib C:\Qt\Qt5.12.9\5.12.9\msvc2017_64\lib\Qt5Guid.lib C:\Qt\Qt5.12.9\5.12.9\msvc2017_64\lib\Qt5Xmld.lib C:\Qt\Qt5.12.9\5.12.9\msvc2017_64\lib\Qt5Cored.lib C:\Qt\Qt5.12.9\5.12.9\msvc2017_64\lib\qtmaind.lib ui_mainwindow.h ui_setprojectpathdialog.h $(OBJECTS) 
    	$(LIBAPP) $(LIBFLAGS) /OUT:$(DESTDIR_TARGET) @<<
    	  [here is a list of paths to a bunch of obj files in a debug folder]
    <<
    

    Here are the variables I was able to find:

    DESTDIR        = debug\ #avoid trailing-slash linebreak
    TARGET         = editor.exe
    DESTDIR_TARGET = debug\editor.exe
    

    OBJECTS is a list of obj files in the debug folder.

    How do I make this project compile on windows?

    J 1 Reply Last reply 13 Aug 2020, 07:59
    0
    • K Offline
      K Offline
      Karlovsky120
      wrote on 14 Aug 2020, 11:31 last edited by
      #10

      LIBAPP is unset for this particular project, although it works perfectly fine for it's dependency. Solution that I found is to just add it to the system environment in the build settings. I hate everything.

      1 Reply Last reply
      0
      • K Karlovsky120
        13 Aug 2020, 07:31

        I'm porting a qt project that compiles on a MacOS to Windows. I've managed to more or less fix all of the compiler errors, but I'm now met with this:

        18 warnings generated.
        	  /OUT:debug\editor.exe @C:\Users\User\AppData\Local\Temp\editor.exe.10472.84781.jom
        The system cannot find the path specified.
        jom: C:\Source\build-project-qt-Desktop_Qt_5_12_9_MSVC2017_64bit-Debug\src\Makefile.Debug [debug\editor.exe] Error 1
        jom: C:\Source\build-project-qt-Desktop_Qt_5_12_9_MSVC2017_64bit-Debug\src\Makefile [debug] Error 2
        jom: C:\Source\build-project-qt-Desktop_Qt_5_12_9_MSVC2017_64bit-Debug\Makefile [sub-src-make_first] Error 2
        02:32:53: The process "C:\Users\User\msvc_make.bat" exited with code 2.
        Error while building/deploying project project (kit: Desktop Qt 5.12.9 MSVC2017 64bit)
        When executing step "Make"
        

        I've been looking for hours and I have no idea why this isn't being generated. I would very much like to not disable JOM if I don't have to (not that I haven't tried, setting CMake generator in the kit to NMake Makefiles with Codeblock instead of NMake Makefiles JOM with Codeblocks just gives me the same error).

        This is the part of the Makefile.debug file which seems to invoke the editor.exe:

        ####### Build rules
        
        first: all
        all: Makefile.Debug  debug\editor.exe
        
        debug\editor.exe: C:\Source\build-project-Desktop_Qt_5_12_9_MSVC2017_64bit-Debug\src\..\lib\cocos2d\debug\cocos2d.lib C:\Qt\Qt5.12.9\5.12.9\msvc2017_64\lib\Qt5OpenGLd.lib C:\Qt\Qt5.12.9\5.12.9\msvc2017_64\lib\Qt5Widgetsd.lib C:\Qt\Qt5.12.9\5.12.9\msvc2017_64\lib\Qt5Guid.lib C:\Qt\Qt5.12.9\5.12.9\msvc2017_64\lib\Qt5Xmld.lib C:\Qt\Qt5.12.9\5.12.9\msvc2017_64\lib\Qt5Cored.lib C:\Qt\Qt5.12.9\5.12.9\msvc2017_64\lib\qtmaind.lib ui_mainwindow.h ui_setprojectpathdialog.h $(OBJECTS) 
        	$(LIBAPP) $(LIBFLAGS) /OUT:$(DESTDIR_TARGET) @<<
        	  [here is a list of paths to a bunch of obj files in a debug folder]
        <<
        

        Here are the variables I was able to find:

        DESTDIR        = debug\ #avoid trailing-slash linebreak
        TARGET         = editor.exe
        DESTDIR_TARGET = debug\editor.exe
        

        OBJECTS is a list of obj files in the debug folder.

        How do I make this project compile on windows?

        J Offline
        J Offline
        JonB
        wrote on 13 Aug 2020, 07:59 last edited by JonB
        #2

        @Karlovsky120
        This is my guess.

        jom: C:\Source\build-project-qt-Desktop_Qt_5_12_9_MSVC2017_64bit-Debug\src\Makefile.Debug [debug\editor.exe] Error 1
        jom: C:\Source\build-project-qt-Desktop_Qt_5_12_9_MSVC2017_64bit-Debug\src\Makefile [debug] Error 2
        jom: C:\Source\build-project-qt-Desktop_Qt_5_12_9_MSVC2017_64bit-Debug\Makefile [sub-src-make_first] Error 2
        

        This is the part of the Makefile.debug file which seems to invoke the editor.exe:

        It is not trying to "invoke" editor.exe. It is trying to open/create it for writing to, for generating the final executable from the link command line.

        I think you will find that those Error numbers are just the value of the constants in <errno.h>.

        Value 2 is ENOENT, No such file or directory. I don't know whether they are supposed to exist, but I think it's telling you debug and sub-src-make_first do not. These might be a consequence of the other error....

        ...Value 1 is EPERM, “Operation not permitted.” Only the owner of the file (or other resource) or processes with special privileges can perform the operation. This is the first error and I think the interesting one.

        I think this is telling you it is unable to open debug\editor.exe for write. I would concentrate on this. Under Windows you can get this error number for a variety of reasons (not just what the text above says).

        • Does that file exist, can you delete it?
        • If, for example, you have previously set off running editor.exe and it has not exited properly you may get this message.
        • Could there be a permission problem? You should be able to delete the whole of the debug folder and rebuild from scratch, which might sort it out?
        1 Reply Last reply
        0
        • K Offline
          K Offline
          Karlovsky120
          wrote on 13 Aug 2020, 08:23 last edited by
          #3

          Well, sub-src-make_first is mentioned in the Makefile in the root directory:

          sub-src-make_first: sub-lib-cocos2d-make_first FORCE
          	@if not exist src\ mkdir src\ & if not exist src\ exit 1
          	@set MAKEFLAGS=$(MAKEFLAGS)
          	cd src\ && ( if not exist Makefile $(QMAKE) -o Makefile C:\Source\project\src\src.pro -spec win32-clang-msvc "CONFIG+=debug" "CONFIG+=qml_debug" "CONFIG+=qtquickcompiler" "CONFIG+=force_debug_info" "CONFIG+=separate_debug_info" "DEFINES+=_WIN32 _WINDOWS CC_STATIC BT_NO_SIMD_OPERATOR_OVERLOADS _WINSOCKAPI_ Z_SOLO" ) && $(MAKE) -f Makefile
          

          debug/editor.exe doesn't exist at all, I think that is the output that the project needs to produce. I've completely deleted the output folder many times, there can't be write permission issues with windows when it so readily writes the rest of the files, unless it somehow can't specifically write *.exe files.

          The mentioned editor.exe.10472.84781.jom file also doesn't exist on that (or any other) path.

          J 1 Reply Last reply 13 Aug 2020, 09:17
          0
          • K Karlovsky120
            13 Aug 2020, 08:23

            Well, sub-src-make_first is mentioned in the Makefile in the root directory:

            sub-src-make_first: sub-lib-cocos2d-make_first FORCE
            	@if not exist src\ mkdir src\ & if not exist src\ exit 1
            	@set MAKEFLAGS=$(MAKEFLAGS)
            	cd src\ && ( if not exist Makefile $(QMAKE) -o Makefile C:\Source\project\src\src.pro -spec win32-clang-msvc "CONFIG+=debug" "CONFIG+=qml_debug" "CONFIG+=qtquickcompiler" "CONFIG+=force_debug_info" "CONFIG+=separate_debug_info" "DEFINES+=_WIN32 _WINDOWS CC_STATIC BT_NO_SIMD_OPERATOR_OVERLOADS _WINSOCKAPI_ Z_SOLO" ) && $(MAKE) -f Makefile
            

            debug/editor.exe doesn't exist at all, I think that is the output that the project needs to produce. I've completely deleted the output folder many times, there can't be write permission issues with windows when it so readily writes the rest of the files, unless it somehow can't specifically write *.exe files.

            The mentioned editor.exe.10472.84781.jom file also doesn't exist on that (or any other) path.

            J Offline
            J Offline
            JonB
            wrote on 13 Aug 2020, 09:17 last edited by JonB
            #4

            @Karlovsky120 said in Qt project failing compilation with no discernible error:

            editor.exe.10472.84781.jom

            That will just be a temporary file, created & removed by the make process.

            /OUT:debug\editor.exe @C:\Users\User\AppData\Local\Temp\editor.exe.10472.84781.jom

            Let's be absolutely clear: does the path C:\Users\User\AppData\Local\Temp exist (and you can create files there) or not?

            @if not exist src\ mkdir src\ & if not exist src\ exit 1

            That looks like the potential Error 1 then. Whatever directory that runs in (I don't know, so don't ask me) is there a directory named src/can it create one there? Just for example, if there were a file there named src this would fall over.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              Karlovsky120
              wrote on 13 Aug 2020, 09:20 last edited by
              #5

              Yeah, the temp folder exists and I can create file no problem. I even played a game (for the first time, after I tried compiling this) last night, I can see it created files there as well too.

              J 1 Reply Last reply 13 Aug 2020, 09:20
              0
              • K Karlovsky120
                13 Aug 2020, 09:20

                Yeah, the temp folder exists and I can create file no problem. I even played a game (for the first time, after I tried compiling this) last night, I can see it created files there as well too.

                J Offline
                J Offline
                JonB
                wrote on 13 Aug 2020, 09:20 last edited by
                #6

                @Karlovsky120
                I just edited previous to ask about the mkdir src\ line?

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  Karlovsky120
                  wrote on 13 Aug 2020, 09:30 last edited by
                  #7

                  What about that line? It seems to create src folder if it doesn't exist and crash if it can't. But it creates the folder just fine, this is where Makefile and Makefile.Debug are, along with a few others.

                  J 1 Reply Last reply 13 Aug 2020, 09:34
                  0
                  • K Karlovsky120
                    13 Aug 2020, 09:30

                    What about that line? It seems to create src folder if it doesn't exist and crash if it can't. But it creates the folder just fine, this is where Makefile and Makefile.Debug are, along with a few others.

                    J Offline
                    J Offline
                    JonB
                    wrote on 13 Aug 2020, 09:34 last edited by
                    #8

                    @Karlovsky120 said in Qt project failing compilation with no discernible error:

                    What about that line?

                    I picked that out because of the exit 1 and your first error message's Error 1. There may be other occurrences of exit 1.

                    Since I don't do this stuff I will leave it to others to try to help.

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      Karlovsky120
                      wrote on 13 Aug 2020, 09:41 last edited by
                      #9

                      I don't think that line is the issue. Thank you for you time anyway. :)

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        Karlovsky120
                        wrote on 14 Aug 2020, 11:31 last edited by
                        #10

                        LIBAPP is unset for this particular project, although it works perfectly fine for it's dependency. Solution that I found is to just add it to the system environment in the build settings. I hate everything.

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          Supriys
                          wrote on 12 Jul 2024, 09:51 last edited by
                          #11

                          @Karlovsky120 & @JonB , same error when i compile my project in msvc_2019 compiler(qt creator 13.0.1) with qt version 6.7.1 . I do the some library that needed but also having same error . How to solved ????

                          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