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. Errors occur when building yaml-cpp in Windows
QtWS25 Last Chance

Errors occur when building yaml-cpp in Windows

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 3 Posters 1.0k 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.
  • P Offline
    P Offline
    Platinum Lucario
    wrote on 14 Feb 2020, 00:05 last edited by Platinum Lucario
    #1

    Hello, I have some issues when building yaml-cpp with Qt Creator.

    When using MinGW 64-bit, it will come up with this error:

    C:\Program Files\CMake\share\cmake-3.16\Modules\CMakeMinGWFindMake.cmake:12: error: sh.exe was found in your PATH, here: C:/devkitPro/msys/bin/sh.exe For MinGW make to work correctly sh.exe must NOT be in your path. Run cmake from a shell that does not have sh.exe in your PATH. If you want to use a UNIX shell, then use MSYS Makefiles. CMakeLists.txt:3 (project)
    

    But when I try to build using MSVC 2017 64bit, it comes up with this error:

    C:\Temp\AME\yaml-cpp\test\gtest-1.8.0\googletest\include\gtest\internal\gtest-port.h:996: error: C2220: warning treated as error - no 'object' file generated
    

    And the error that I mentioned earlier that said "sh.exe must not be in your PATH", it's actually where devkitPro is installed, and it's actually a requirement for some projects to be built.

    The question is, will devkitPro compilers still work if they're removed from the System Environment Variables PATH? Because that's the only place where devkitPro Environment Variable is found:

    C:\Python27\;
    C:\Python27\Scripts;
    c:\devkitPro\msys\bin;
    C:\Program Files (x86)\Intel\iCLS Client\;
    C:\Program Files\Intel\iCLS Client\;
    C:\WINDOWS\system32;
    C:\WINDOWS;
    C:\WINDOWS\System32\Wbem;
    C:\WINDOWS\System32\WindowsPowerShell\v1.0\;
    C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;
    C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;
    C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;
    C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;
    C:\Program Files (x86)\Skype\Phone\;
    C:\WINDOWS\system32;
    C:\WINDOWS;
    C:\WINDOWS\System32\Wbem;
    C:\WINDOWS\System32\WindowsPowerShell\v1.0\;
    C:\Program Files (x86)\Common Files\Seagate\SnapAPI\;
    C:\Program Files (x86)\Common Files\Acronis\VirtualFile\;
    C:\Program Files (x86)\Common Files\Acronis\VirtualFile64\;
    C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;
    C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;
    C:\Program Files\PuTTY\;
    C:\MinGW\bin;
    C:\WINDOWS\System32\OpenSSH\;
    C:\Program Files\dotnet\;
    C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;
    C:\Strawberry\c\bin;
    C:\Strawberry\perl\site\bin;
    C:\Strawberry\perl\bin;
    C:\Program Files\CMake\bin;
    C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;
    C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
    
    1 Reply Last reply
    0
    • C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 14 Feb 2020, 05:54 last edited by
      #2

      Anything Qt related here?

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

      P 1 Reply Last reply 14 Feb 2020, 09:52
      1
      • C Christian Ehrlicher
        14 Feb 2020, 05:54

        Anything Qt related here?

        P Offline
        P Offline
        Platinum Lucario
        wrote on 14 Feb 2020, 09:52 last edited by
        #3

        @Christian-Ehrlicher Yep, I'm trying to build yaml-cpp in Qt Creator, and those errors appear.

        C 1 Reply Last reply 15 Feb 2020, 07:58
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 14 Feb 2020, 21:51 last edited by
          #4

          Hi,

          One thing you can do is go to the Build part of the Project panel and modify PATH there.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          P 1 Reply Last reply 15 Feb 2020, 11:21
          1
          • P Platinum Lucario
            14 Feb 2020, 09:52

            @Christian-Ehrlicher Yep, I'm trying to build yaml-cpp in Qt Creator, and those errors appear.

            C Offline
            C Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on 15 Feb 2020, 07:58 last edited by
            #5

            @Platinum-Lucario said in Errors occur when building yaml-cpp in Windows:

            Yep, I'm trying to build yaml-cpp in Qt Creator, and those errors appear.

            Then don't use qtcreator - I would guess it doesn't work there too.

            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
            • S SGaist
              14 Feb 2020, 21:51

              Hi,

              One thing you can do is go to the Build part of the Project panel and modify PATH there.

              P Offline
              P Offline
              Platinum Lucario
              wrote on 15 Feb 2020, 11:21 last edited by Platinum Lucario
              #6

              @SGaist said in Errors occur when building yaml-cpp in Windows:

              Hi,

              One thing you can do is go to the Build part of the Project panel and modify PATH there.

              The Build part of the project panel, it's this part, right?
              ab2541f9-487a-4063-86a1-ab92d31be36f-image.png

              I selected "Clear system environment" box in that section, and it came up with this error instead:

              C:\Qt\Tools\CMake_64\share\cmake-3.16\Modules\CMakeTestCXXCompiler.cmake:53: error: The C++ compiler "C:/Qt/Tools/mingw730_64/bin/g++.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: C:/Temp/AME/yaml-cpp/bin/CMakeFiles/CMakeTmp Run Build Command(s):C:/Qt/Tools/mingw730_64/bin/mingw32-make.exe cmTC_13973/fast && C:/Qt/Tools/mingw730_64/bin/mingw32-make.exe -f CMakeFiles\cmTC_13973.dir\build.make CMakeFiles/cmTC_13973.dir/build mingw32-make.exe[1]: Entering directory 'C:/Temp/AME/yaml-cpp/bin/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_13973.dir/testCXXCompiler.cxx.obj C:\Qt\Tools\mingw730_64\bin\g++.exe     -o CMakeFiles\cmTC_13973.dir\testCXXCompiler.cxx.obj -c C:\Temp\AME\yaml-cpp\bin\CMakeFiles\CMakeTmp\testCXXCompiler.cxx Cannot create temporary file in C:\WINDOWS\: Permission denied mingw32-make.exe[1]: *** [CMakeFiles\cmTC_13973.dir\build.make:65: CMakeFiles/cmTC_13973.dir/testCXXCompiler.cxx.obj] Error 3 mingw32-make.exe[1]: Leaving directory 'C:/Temp/AME/yaml-cpp/bin/CMakeFiles/CMakeTmp' mingw32-make.exe: *** [Makefile:120: cmTC_13973/fast] Error 2
              

              When I tried to change the CMake Tool from the drop down box in the MinGW 64-bit kit, sure it worked for a bit, then when I tried to build it, it came up with lots of different errors.
              d622d872-7e8a-4f45-a2ab-e4a070f08ddb-image.png

              And when I closed and reopened the project after modifying the MinGW 64-bit kit, it came up with the same error all over again, which is:

              C:\Program Files\CMake\share\cmake-3.16\Modules\CMakeMinGWFindMake.cmake:12: error: sh.exe was found in your PATH, here: C:/devkitPro/msys/bin/sh.exe For MinGW make to work correctly sh.exe must NOT be in your path. Run cmake from a shell that does not have sh.exe in your PATH. If you want to use a UNIX shell, then use MSYS Makefiles. CMakeLists.txt:3 (project)
              

              And also, there's this message that appears:
              a0e76fcc-dbc7-47e1-baf1-559c7f335704-image.png

              1 Reply Last reply
              0
              • P Offline
                P Offline
                Platinum Lucario
                wrote on 18 Feb 2020, 12:39 last edited by
                #7

                I'm not sure why the error is occurring when trying to build yaml-cpp. I'd like to fix the issue, but I'm not sure how to.

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  Platinum Lucario
                  wrote on 17 Mar 2020, 13:38 last edited by
                  #8

                  Okay! I've fixed the problem!

                  All I needed to do was remove C:/devkitPro/msys/bin/ from the System PATH in Environmental Variables and then disabled YAML_CPP_BUILD_TESTS in the Qt Projects Build Settings for yaml-cpp, and it worked!

                  For some reason, GTest (Google Test Framework) doesn't build in MinGW, that's why it has that error.

                  1 Reply Last reply
                  2

                  • Login

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