Skip to content

Build fails with spaces in path #185

@Timmmm

Description

@Timmmm

This is on Windows; I've not tested on other platforms. I've verified that upstream builds ok in a path with spaces so this is an issue with git2-rs rather than libgit2. Here is the output:

C:\Users\Tim\Google Drive\git_info>cargo build --release
   Compiling libgit2-sys v0.6.6
error: failed to run custom build command for `libgit2-sys v0.6.6`
process didn't exit successfully: `C:\Users\Tim\Google Drive\git_info\target\release\build\libgit2-sys-551aec5e9c1946f4\build-script-build` (exit code: 101)
--- stdout
cargo:warning=cpp_set_stdlib is specified, but the Msvc compiler does not support this option, ignored
running: "cmake" "C:\\Users\\Tim\\.cargo\\registry\\src\\mygithub.libinneed.workers.dev-1ecc6299db9ec823\\libgit2-sys-0.6.6\\libgit2" "-G" "Visual Studio 14 2015 Win64" "-DSTATIC_CRT=OFF" "-DBUILD_SHARED_LIBS=OFF" "-DBUILD_CLAR=OFF" "-DCMAKE_INSTALL_PREFIX=C:\\Users\\Tim\\Google Drive\\git_info\\target\\release\\build\\libgit2-sys-551aec5e9c1946f4\\out" "-DCMAKE_C_FLAGS= /GL- /IC:\\Users\\Tim\\Google Drive\\git_info\\target\\release\\build\\libssh2-sys-d3b5c446708c2a4d\\out/include /DGIT_SSH /nologo /MD" "-DCMAKE_C_FLAGS_RELEASE= /GL- /IC:\\Users\\Tim\\Google Drive\\git_info\\target\\release\\build\\libssh2-sys-d3b5c446708c2a4d\\out/include /DGIT_SSH /nologo /MD" "-DCMAKE_CXX_FLAGS= /nologo /MD" "-DCMAKE_CXX_FLAGS_RELEASE= /nologo /MD" "-DCMAKE_BUILD_TYPE=Release"
-- The C compiler identification is MSVC 19.0.24210.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- broken
-- Configuring incomplete, errors occurred!
See also "C:/Users/Tim/Google Drive/git_info/target/release/build/libgit2-sys-551aec5e9c1946f4/out/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Tim/Google Drive/git_info/target/release/build/libgit2-sys-551aec5e9c1946f4/out/build/CMakeFiles/CMakeError.log".

--- stderr
fatal: Not a git repository (or any of the parent directories): .git
CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/CMakeTestCCompiler.cmake:51 (message):
  The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
  14.0/VC/bin/x86_amd64/cl.exe" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: C:/Users/Tim/Google Drive/git_info/target/release/build/libgit2-sys-551aec5e9c1946f4/out/build/CMakeFiles/CMakeTmp



  Run Build Command:"C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe"
  "cmTC_be1f4.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=14.0"

  Microsoft (R) Build Engine version 14.0.25420.1

  Copyright (C) Microsoft Corporation.  All rights reserved.



  Build started 31/01/2017 11:17:39.

  Project "C:\Users\Tim\Google
  Drive\git_info\target\release\build\libgit2-sys-551aec5e9c1946f4\out\build\CMakeFiles\CMakeTmp\cmTC_be1f4.vcxproj"
  on node 1 (default targets).

  PrepareForBuild:

    Creating directory "cmTC_be1f4.dir\Debug\".
    Creating directory "C:\Users\Tim\Google Drive\git_info\target\release\build\libgit2-sys-551aec5e9c1946f4\out\build\CMakeFiles\CMakeTmp\Debug\".
    Creating directory "cmTC_be1f4.dir\Debug\cmTC_be1f4.tlog\".

  InitializeBuildStatus:

    Creating "cmTC_be1f4.dir\Debug\cmTC_be1f4.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.

  ClCompile:

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\CL.exe /c /IC:\Users\Tim\Google /Zi /nologo /W1 /WX- /Od /Ob0 /D GIT_SSH /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_be1f4.dir\Debug\\" /Fd"cmTC_be1f4.dir\Debug\vc140.pdb" /Gd /TC /errorReport:queue  /GL- Drive\git_info\target\release\build\libssh2-sys-d3b5c446708c2a4d\out/include "C:\Users\Tim\Google Drive\git_info\target\release\build\libgit2-sys-551aec5e9c1946f4\out\build\CMakeFiles\CMakeTmp\testCCompiler.c"
    include

  c1 : fatal error C1083: Cannot open source file:
  'Drive\git_info\target\release\build\libssh2-sys-d3b5c446708c2a4d\out/include':
  No such file or directory [C:\Users\Tim\Google
  Drive\git_info\target\release\build\libgit2-sys-551aec5e9c1946f4\out\build\CMakeFiles\CMakeTmp\cmTC_be1f4.vcxproj]


    testCCompiler.c
    Generating Code...

  Done Building Project "C:\Users\Tim\Google
  Drive\git_info\target\release\build\libgit2-sys-551aec5e9c1946f4\out\build\CMakeFiles\CMakeTmp\cmTC_be1f4.vcxproj"
  (default targets) -- FAILED.



  Build FAILED.



  "C:\Users\Tim\Google
  Drive\git_info\target\release\build\libgit2-sys-551aec5e9c1946f4\out\build\CMakeFiles\CMakeTmp\cmTC_be1f4.vcxproj"
  (default target) (1) ->

  (ClCompile target) ->

    c1 : fatal error C1083: Cannot open source file: 'Drive\git_info\target\release\build\libssh2-sys-d3b5c446708c2a4d\out/include': No such file or directory [C:\Users\Tim\Google Drive\git_info\target\release\build\libgit2-sys-551aec5e9c1946f4\out\build\CMakeFiles\CMakeTmp\cmTC_be1f4.vcxproj]



      0 Warning(s)
      1 Error(s)



  Time Elapsed 00:00:00.26





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:14 (PROJECT)


thread 'main' panicked at '
command did not execute successfully, got: exit code: 1

build script failed, must exit now', C:\Users\Tim\.cargo\registry\src\mygithub.libinneed.workers.dev-1ecc6299db9ec823\cmake-0.1.20\src\lib.rs:573
note: Run with `RUST_BACKTRACE=1` for a backtrace.


C:\Users\Tim\Google Drive\git_info>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions