Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-29329

Visual Studio/MSBuild projects can not be built implicitly anymore

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Problem:
      After changing the usage from CMAKE_BUILD_TOOL to CMAKE_MAKE_PROGRAM, see https://issues.jenkins-ci.org/browse/JENKINS-29267) Visual Studio Builds do not work anymore.

      Workaround:
      Explicitly set CMAKE_MAKE_PROGRAM via commandline option:
      For example:
      -DCMAKE_MAKE_PROGRAM:PATH=C:\Progra~2\MSBuild\12.0\Bin\amd64\MSBuild.exe

      Suggestions:

      • Reenable the usage of cmake --build . as build step. This works on all plattforms and outsources the build step (calling the correct tools etc.) to cmake
      • Fix the automatic recognition of Visual Studio/MSBuild Paths

        Attachments

          Activity

          Hide
          dacri Dominik Acri added a comment -

          No, does not work for me.

          Plugin Version: 2.2-SNAPSHOT (private-43148708-jenkins)
          Same error:

          – Build files have been written to: C:/Jenkins/workspace/piratol/build
          ERROR: Failed to get value for CMAKE_BUILD_TOOL from c:\Jenkins\workspace\piratol\build\CMakeCache.txt
          Finished: SUCCESS

          Show
          dacri Dominik Acri added a comment - No, does not work for me. Plugin Version: 2.2-SNAPSHOT (private-43148708-jenkins) Same error: – Build files have been written to: C:/Jenkins/workspace/piratol/build ERROR: Failed to get value for CMAKE_BUILD_TOOL from c:\Jenkins\workspace\piratol\build\CMakeCache.txt Finished: SUCCESS
          Hide
          dacri Dominik Acri added a comment -

          more log:
          no change for https://chii.selfhost.eu/svn/piratol/trunk since the previous build
          Cleaning build dir... c:\Jenkins\workspace\HorusEye\build
          [build] $ cmake -G "Visual Studio 14 2015" -DHORUS_3RDPARTY_SILENT:BOOL=TRUE c:\Jenkins\workspace\piratol\source
          – The C compiler identification is MSVC 19.0.23026.0
          – The CXX compiler identification is MSVC 19.0.23026.0
          – Check for working C compiler using: Visual Studio 14 2015
          – Check for working C compiler using: Visual Studio 14 2015 – works
          – Detecting C compiler ABI info
          – Detecting C compiler ABI info - done
          – Check for working CXX compiler using: Visual Studio 14 2015
          – Check for working CXX compiler using: Visual Studio 14 2015 – works
          – Detecting CXX compiler ABI info
          – Detecting CXX compiler ABI info - done
          – Detecting CXX compile features
          – Detecting CXX compile features - done
          – Boost version: 1.59.0
          – Found the following Boost libraries:
          – filesystem
          – system
          – Configuring done
          – Generating done
          – Build files have been written to: C:/Jenkins/workspace/piratol/build
          ERROR: Failed to get value for CMAKE_BUILD_TOOL from c:\Jenkins\workspace\piratol\build\CMakeCache.txt
          Finished: SUCCESS

          Show
          dacri Dominik Acri added a comment - more log: no change for https://chii.selfhost.eu/svn/piratol/trunk since the previous build Cleaning build dir... c:\Jenkins\workspace\HorusEye\build [build] $ cmake -G "Visual Studio 14 2015" -DHORUS_3RDPARTY_SILENT:BOOL=TRUE c:\Jenkins\workspace\piratol\source – The C compiler identification is MSVC 19.0.23026.0 – The CXX compiler identification is MSVC 19.0.23026.0 – Check for working C compiler using: Visual Studio 14 2015 – Check for working C compiler using: Visual Studio 14 2015 – works – Detecting C compiler ABI info – Detecting C compiler ABI info - done – Check for working CXX compiler using: Visual Studio 14 2015 – Check for working CXX compiler using: Visual Studio 14 2015 – works – Detecting CXX compiler ABI info – Detecting CXX compiler ABI info - done – Detecting CXX compile features – Detecting CXX compile features - done – Boost version: 1.59.0 – Found the following Boost libraries: – filesystem – system – Configuring done – Generating done – Build files have been written to: C:/Jenkins/workspace/piratol/build ERROR: Failed to get value for CMAKE_BUILD_TOOL from c:\Jenkins\workspace\piratol\build\CMakeCache.txt Finished: SUCCESS
          Hide
          15knots Martin Weber added a comment - - edited

          Thank you for testing on Windows!

          Does your job actually invoke the build tool? (msbuild in this case.)
          I would expect to sees something in the log like

          {{-- Build files have been written to: /tmp/hudson5225684379901236121test/workspace/test0/build/debug
          [debug] $ cmake --build /tmp/hudson5225684379901236121test/workspace/test0/build/debug --target all
          Scanning dependencies of target theBuildArtifact
          [100%] Building CXX object CMakeFiles/theBuildArtifact.dir/tester.cpp.o
          Linking CXX executable theBuildArtifact
          [100%] Built target theBuildArtifact
          }}

          NOTE: The log above comes from the unit test.

          Show
          15knots Martin Weber added a comment - - edited Thank you for testing on Windows! Does your job actually invoke the build tool? (msbuild in this case.) I would expect to sees something in the log like {{-- Build files have been written to: /tmp/hudson5225684379901236121test/workspace/test0/build/debug [debug] $ cmake --build /tmp/hudson5225684379901236121test/workspace/test0/build/debug --target all Scanning dependencies of target theBuildArtifact [100%] Building CXX object CMakeFiles/theBuildArtifact.dir/tester.cpp.o Linking CXX executable theBuildArtifact [100%] Built target theBuildArtifact }} NOTE: The log above comes from the unit test.
          Hide
          dacri Dominik Acri added a comment -

          ahh sorry, Yes, it works now !!
          I did not add the cmake build step in jenkins because of the same error log but I missed that the cmake config step was now successfull.
          Thanks!

          – Build files have been written to: C:/Jenkins/workspace/Piratol/build
          ERROR: Failed to get value for CMAKE_BUILD_TOOL from c:\Jenkins\workspace\Piratol\build\CMakeCache.txt
          [build] $ cmake --build c:\Jenkins\workspace\Piratol\build
          Microsoft (R)-Buildmodul, Version 14.0.23107.0
          Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

          Der Buildvorgang wurde am 25.08.2015 09:17:23 gestartet.

          ...

          c:/Jenkins/workspace/Piratol/source/source/base/baselib/CMakeLists.txt
          CMake does not need to re-run because C:\Jenkins\workspace\Piratol\build\source\base\baselib\CMakeFiles\generate.stamp is up-to-date.
          ClCompile:
          C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe /c /IC:\Jenkins\workspace\Piratol\build\source\base\baselib /Ic:\Jenkins\workspace\Piratol\source\source\base\baselib /Ic:\Jenkins\workspace\Piratol\source\source\base\baselib\src /Ic:\Jenkins\workspace\Piratol\source\source\base\baselib\include /I"c:\Jenkins\workspace\Piratol\3rdparty_3\3rdparty\x86\boost_1_59_0\include\boost-1_59" /I"c:\Jenkins\workspace\Piratol\3rdparty_3\3rdparty\x86\log4cpp-1.1.1" /Zi /nologo /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D UNICODE /D _UNICODE /D _CRT_SECURE_NO_WARNINGS /D BOOST_ALL_NO_LIB /D BOOST_LIB_DIAGNOSTIC /D "CMAKE_INTDIR=\"Debug\"" /D BaseLib_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"BaseLib.dir\Debug
          " /Fd"BaseLib.dir\Debug\vc140.pdb" /Gd /TP /wd4290 /wd4251 /wd4275 /wd4996 /analyze- /errorReport:queue
          Link:
          C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"C:\Jenkins\workspace\Piratol\build\build\debug\bin\BaseLibD.dll" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib "c:\Jenkins\workspace\Piratol\3rdparty_3\3rdparty\x86\boost_1_59_0\lib\boost_filesystem-vc140-mt-gd-1_59.lib" "c:\Jenkins\workspace\Piratol\3rdparty_3\3rdparty\x86\boost_1_59_0\lib\boost_system-vc140-mt-gd-1_59.lib"
          ...

          FinalizeBuildStatus:
          Die Datei "Service.dir\Debug\Service.tlog\unsuccessfulbuild" wird gel”scht.
          Aktualisieren des Timestamps von "Service.dir\Debug\Service.tlog\Service.lastbuildstate".
          Die Erstellung von Projekt "C:\Jenkins\workspace\Piratol\build\source\service\Service.vcxproj" ist abgeschlossen (Standardziele).
          PrepareForBuild:
          Das Verzeichnis "Win32\Debug\ALL_BUILD\" wird erstellt.
          Das Verzeichnis "Win32\Debug\ALL_BUILD\ALL_BUILD.tlog\" wird erstellt.
          InitializeBuildStatus:
          "Win32\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild" wird erstellt, da "AlwaysCreate" angegeben wurde.
          CustomBuild:
          Building Custom Rule c:/Jenkins/workspace/Piratol/source/CMakeLists.txt
          CMake does not need to re-run because C:\Jenkins\workspace\Piratol\build\CMakeFiles\generate.stamp is up-to-date.
          FinalizeBuildStatus:
          Die Datei "Win32\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild" wird gel”scht.
          Aktualisieren des Timestamps von "Win32\Debug\ALL_BUILD\ALL_BUILD.tlog\ALL_BUILD.lastbuildstate".
          Die Erstellung von Projekt "c:\Jenkins\workspace\Piratol\build\ALL_BUILD.vcxproj" ist abgeschlossen (Standardziele).

          Der Buildvorgang wurde erfolgreich ausgef�hrt.
          0 Warnung(en)
          0 Fehler

          Verstrichene Zeit 00:00:59.10
          Finished: SUCCESS

          Show
          dacri Dominik Acri added a comment - ahh sorry, Yes, it works now !! I did not add the cmake build step in jenkins because of the same error log but I missed that the cmake config step was now successfull. Thanks! – Build files have been written to: C:/Jenkins/workspace/Piratol/build ERROR: Failed to get value for CMAKE_BUILD_TOOL from c:\Jenkins\workspace\Piratol\build\CMakeCache.txt [build] $ cmake --build c:\Jenkins\workspace\Piratol\build Microsoft (R)-Buildmodul, Version 14.0.23107.0 Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten. Der Buildvorgang wurde am 25.08.2015 09:17:23 gestartet. ... c:/Jenkins/workspace/Piratol/source/source/base/baselib/CMakeLists.txt CMake does not need to re-run because C:\Jenkins\workspace\Piratol\build\source\base\baselib\CMakeFiles\generate.stamp is up-to-date. ClCompile: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe /c /IC:\Jenkins\workspace\Piratol\build\source\base\baselib /Ic:\Jenkins\workspace\Piratol\source\source\base\baselib /Ic:\Jenkins\workspace\Piratol\source\source\base\baselib\src /Ic:\Jenkins\workspace\Piratol\source\source\base\baselib\include /I"c:\Jenkins\workspace\Piratol\3rdparty_3\3rdparty\x86\boost_1_59_0\include\boost-1_59" /I"c:\Jenkins\workspace\Piratol\3rdparty_3\3rdparty\x86\log4cpp-1.1.1" /Zi /nologo /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D UNICODE /D _UNICODE /D _CRT_SECURE_NO_WARNINGS /D BOOST_ALL_NO_LIB /D BOOST_LIB_DIAGNOSTIC /D "CMAKE_INTDIR=\"Debug\"" /D BaseLib_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"BaseLib.dir\Debug " /Fd"BaseLib.dir\Debug\vc140.pdb" /Gd /TP /wd4290 /wd4251 /wd4275 /wd4996 /analyze- /errorReport:queue Link: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"C:\Jenkins\workspace\Piratol\build\build\debug\bin\BaseLibD.dll" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib "c:\Jenkins\workspace\Piratol\3rdparty_3\3rdparty\x86\boost_1_59_0\lib\boost_filesystem-vc140-mt-gd-1_59.lib" "c:\Jenkins\workspace\Piratol\3rdparty_3\3rdparty\x86\boost_1_59_0\lib\boost_system-vc140-mt-gd-1_59.lib" ... FinalizeBuildStatus: Die Datei "Service.dir\Debug\Service.tlog\unsuccessfulbuild" wird gel”scht. Aktualisieren des Timestamps von "Service.dir\Debug\Service.tlog\Service.lastbuildstate". Die Erstellung von Projekt "C:\Jenkins\workspace\Piratol\build\source\service\Service.vcxproj" ist abgeschlossen (Standardziele). PrepareForBuild: Das Verzeichnis "Win32\Debug\ALL_BUILD\" wird erstellt. Das Verzeichnis "Win32\Debug\ALL_BUILD\ALL_BUILD.tlog\" wird erstellt. InitializeBuildStatus: "Win32\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild" wird erstellt, da "AlwaysCreate" angegeben wurde. CustomBuild: Building Custom Rule c:/Jenkins/workspace/Piratol/source/CMakeLists.txt CMake does not need to re-run because C:\Jenkins\workspace\Piratol\build\CMakeFiles\generate.stamp is up-to-date. FinalizeBuildStatus: Die Datei "Win32\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild" wird gel”scht. Aktualisieren des Timestamps von "Win32\Debug\ALL_BUILD\ALL_BUILD.tlog\ALL_BUILD.lastbuildstate". Die Erstellung von Projekt "c:\Jenkins\workspace\Piratol\build\ALL_BUILD.vcxproj" ist abgeschlossen (Standardziele). Der Buildvorgang wurde erfolgreich ausgef�hrt. 0 Warnung(en) 0 Fehler Verstrichene Zeit 00:00:59.10 Finished: SUCCESS
          Hide
          15knots Martin Weber added a comment -

          Thank you for testing the snapshot version under windows.

          So I will close this and JENKINS-29267 and publish the next release.

          Show
          15knots Martin Weber added a comment - Thank you for testing the snapshot version under windows. So I will close this and JENKINS-29267 and publish the next release.

            People

            • Assignee:
              15knots Martin Weber
              Reporter:
              derphilipp Philipp Weißmann
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: