conda-forge / conda-forge.github.io

The conda-forge website.
https://conda-forge.org
BSD 3-Clause "New" or "Revised" License
128 stars 275 forks source link

Azure: CMake does not find MSBuild options #703

Open xhochy opened 5 years ago

xhochy commented 5 years ago

Running cmake in Azure DevOps Pipelines currently fails, e.g. https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=10607&view=logs&jobId=2cc45e14-23e3-52d7-b33a-8c2744410b97&taskId=22e1f59c-6ad0-5e39-c80e-f2cebe3974dd&lineStart=724&lineEnd=725&colStart=1&colEnd=1

The relevant error message is:

D:\bld\thrift-cpp_1549275362470\work\build\CMakeFiles\3.13.2\VCTargetsPath.vcxproj(15,2): error MSB4019: The imported project "D:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

This is probably due to a missing VCTargetsPath.

mariusvniekerk commented 5 years ago

cc @DavidStaheli @willsmythe

mariusvniekerk commented 5 years ago

This looks incredibly similar to https://stackoverflow.com/questions/8497931/msbuild-does-not-contain-a-value-for-the-vctargetspath-property

mariusvniekerk commented 5 years ago

I have a small little tester project running here that fetches some of the relevant registry keys

https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=11185

mariusvniekerk commented 5 years ago

cc @msarahan @mingwandroid

xhochy commented 5 years ago

Known workaround for this is to use NMake Makefiles as the CMake generator.

jakirkham commented 5 years ago

Yeah using nmake on Windows has been useful for several issues. Glad to hear that it works here as well.

hadim commented 4 years ago

It looks like this issue is also related: https://github.com/conda-forge/_libarchive_static_for_cph-feedstock/issues/5

NMake Makefiles fixed it.

xhochy commented 4 years ago

Perferred solution is nowadays to use Ninja or NMake Makefiles JOM as the generator as NMake Makefiles doesn't parallelize.

hadim commented 4 years ago

Are those available in the conda forge Windows build tools?

xhochy commented 4 years ago

Yes but e.g. for Ninja you need to add ninja to the build requirements.