Skip to content

Build fails with longer repo root paths  #60812

Open

Description

@jkotas

Description

Build does not work with longer repo root paths (verified for repo root 55 characters long)

Originally reported as dotnet/runtimelab#1676

Reproduction Steps

mkdir \LongPathLongPathLongPathLongPathLongPathLongPathLongPath
cd \LongPathLongPathLongPathLongPathLongPathLongPathLongPath
git clone http://github.com/dotnet/runtime
cd runtime
build.cmd -c release

Expected behavior

Build works, or there is a clear error message saying that the repo root path is too long.

(The specific repro steps above produce cmake warning about long paths. However, there are situations like in the original runtimelab report where this warning is not present or buried too deep to be noticeable.)

Actual behavior

Build fails with:

...
 running "C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --build D:\LongPathLongPathLongPathLongPathLongPathLongPathLongPath\runtime\src\coreclr\..\..\artifacts\obj\coreclr\windows.x64.Release --target install --config Release --
  ninja: error: mkdir(Native.Windows/System.IO.Compression.Native/CMakeFiles/System.IO.Compression.Native-Static.dir/D_/LongPathLongPathLongPathLongPathLongPathLongPathLongPath): No such file or directory
  ninja: build stopped: .

Configuration

Windows 10, VS 2022 Preview

Activity

  1. ghost added
    untriaged
    on Oct 24, 2021
  2. jkotas commented on Oct 24, 2021

    @jkotas
    MemberAuthor

    cc @jkoritzinsky Looks like ninja is not able to handle long paths.

  3. added this to the Future milestone on Jul 11, 2022
  4. removed
    untriaged
    on Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions