[llvm-dev] Switching to Ninja
David Blaikie via llvm-dev
llvm-dev at lists.llvm.org
Sat Aug 8 18:48:26 PDT 2020
On Sat, Aug 8, 2020 at 5:27 PM Paul C. Anagnostopoulos
<paul at windfall.com> wrote:
>
> Sigh. I ask for your indulgence yet again.
>
> I installed Ninja and deleted my old build tree. When I run CMake now, I'm told that it can't find the compilers and assembler. So, of course, I need to put a compiler toolset on my path. I tried MinGW but was instantly reminded that it doesn't have localtime_s. So I tried to find the Visual Studio binaries and located four different directories. I added what I thought was the correct one to my path. CMake found the compiler, but it failed to compile CMake's test.
I /think/ you're probably best using a Visual Studio shell - I /think/
you want to use a command prompt like this:
https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs
that sets up everything right in the PATH.
>
> Is anyone running Ninja with Visual Studio who might have a suggestion? I can't find anything in "Building LLVM with CMake." I've attached the CMake output below.
>
> At 8/8/2020 05:19 PM, David Blaikie wrote:
> >Maybe? I'd usually delete my whole build directory (or create another)
> >if I were switching that aspect - not sure if they'd effectively be
> >able to reuse each others artefacts or would get in the way, etc.
> >
> >On Sat, Aug 8, 2020 at 2:12 PM Paul C. Anagnostopoulos via llvm-dev
> ><llvm-dev at lists.llvm.org> wrote:
> >>
> >> I built my first submission with Visual Studio, but everything I read and watch suggests Ninja, about which I know nothing. Is it okay if I rerun CMake with -G "Ninja" in the same build directory, then just run ninja?
>
> ----------------------------------------------
> -- The C compiler identification is MSVC 19.26.28806.0
> -- The CXX compiler identification is MSVC 19.26.28806.0
> -- The ASM compiler identification is MSVC
> -- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Host
> x64/x64/cl.exe
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - failed
> -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.2
> 8801/bin/Hostx64/x64/cl.exe
> -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.2
> 8801/bin/Hostx64/x64/cl.exe - broken
> CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message):
> The C compiler
>
> "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe"
>
> is not able to compile a simple test program.
>
> It fails with the following output:
>
> Change Dir: D:/LLVM/Build/CMakeFiles/CMakeTmp
>
> Run Build Command(s):C:/Utils/ninja.exe cmTC_009c0 && [1/2] Building C object CMakeFiles\cmTC_009c0.dir\testCCom
> piler.c.obj
> [2/2] Linking C executable cmTC_009c0.exe
> FAILED: cmTC_009c0.exe
> cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_009c0.dir --r
> c=rc --mt=CMAKE_MT-NOTFOUND --manifests -- C:\PROGRA~2\MIB055~1\2019\COMMUN~1\VC\Tools\MSVC\1426~1.288\bin\Hostx64\
> x64\link.exe /nologo CMakeFiles\cmTC_009c0.dir\testCCompiler.c.obj /out:cmTC_009c0.exe /implib:cmTC_009c0.lib /pdb:
> cmTC_009c0.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib
> winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
> RC Pass 1: command "rc /fo CMakeFiles\cmTC_009c0.dir/manifest.res CMakeFiles\cmTC_009c0.dir/manifest.rc" failed
> (exit code 0) with the following output:
> The system cannot find the file specified
> ninja: build stopped: subcommand failed.
>
> CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
> CMakeLists.txt:49 (project)
>
> -- Configuring incomplete, errors occurred!
> See also "D:/LLVM/Build/CMakeFiles/CMakeOutput.log".
> See also "D:/LLVM/Build/CMakeFiles/CMakeError.log".
>
More information about the llvm-dev
mailing list