Conda-forge.github.io: CMake is finding GCC when building in Windows with `-G "Ninja"` in Azure Pipelines

Created on 19 Feb 2019  路  9Comments  路  Source: conda-forge/conda-forge.github.io

This recipe is building in AppVeyor, but is failing in Azure Pipelines (win64):

%SRC_DIR%>SET "CMAKE_GENERATOR=Visual Studio 14 2015 Win64"  

%SRC_DIR%>CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\..\..\VC\vcvarsall.bat" amd64  
-- The C compiler identification is GNU 8.1.0
-- The CXX compiler identification is GNU 8.1.0
-- Check for working C compiler: C:/ProgramData/chocolatey/bin/gcc.exe
-- Check for working C compiler: C:/ProgramData/chocolatey/bin/gcc.exe -- broken
CMake Error at D:/bld/cminpack_1550515875602/_build_env/Library/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:52 (message):
  The C compiler

    "C:/ProgramData/chocolatey/bin/gcc.exe"

  is not able to compile a simple test program.
azure

Most helpful comment

In addition to sourcing vcvars, the compiler should be explicitly specified for CMake. This is possible with -DCMAKE_CXX_COMPILER=cl.exe and -DCMAKE_C_COMPILER=cl.exe or setting the standard environmental variables CC=cl.exe, CXX=cl.exe.

All 9 comments

Azure cmake windows builds are a known failure right now

Interesting, but AFAIK, conda build should already call the correct vcvars script :/

CC @mariusvniekerk

In addition to sourcing vcvars, the compiler should be explicitly specified for CMake. This is possible with -DCMAKE_CXX_COMPILER=cl.exe and -DCMAKE_C_COMPILER=cl.exe or setting the standard environmental variables CC=cl.exe, CXX=cl.exe.

Is this issue still live? Any examples of current problems? If not, maybe we should close it out. Thoughts? 馃檪

The issue seems fixed (probably on Azure side), I've temporarily changed the recipe with the original problem to use Ninja again, and it is working! Feel free to close it.

Ok good to know. Thanks for the update.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

h-vetinari picture h-vetinari  路  4Comments

jakirkham picture jakirkham  路  3Comments

bulli92 picture bulli92  路  4Comments

artPlusPlus picture artPlusPlus  路  5Comments

Cadair picture Cadair  路  5Comments