Skip to content

[rustbuild] error on out of source build: fatal: Not a git repository #31619

Closed
@japaric

Description

@japaric
Member

STR

$ git clone --depth 1 https://github.com/rust-lang/rust
$ mkdir build
$ cd build
$ ../rust/configure --enable-rustbuild
$ make
(...)
   Compiling bootstrap v0.0.0 (file:///home/japaric/tmp/foo/rust/src/bootstrap)
fatal: Not a git repository (or any parent up to mount point /home/japaric/tmp)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
thread '<main>' panicked at 'command did not execute successfully: "git" "submodule" "status"
expected success, got: exit code: 128', /home/japaric/tmp/foo/rust/src/build_helper/lib.rs:59
Makefile:23: recipe for target 'all' failed
make: *** [all] Error 101

But using a build directory inside the cloned rust directory works fine. i.e.

$ git clone --depth 1 https://github.com/rust-lang/rust
$ cd rust
$ mkdir build
$ cd build
$ ../configure --enable-rustbuild
$ make
   Compiling bootstrap v0.0.0 (file:///home/japaric/tmp/foo/rust/src/bootstrap)
Submodule 'src/compiler-rt' (https://github.com/rust-lang/compiler-rt.git) registered for path '../src/compiler-rt'
(OK)

It seems git submodule status is called in the build directory instead of calling it inside the rust repository.

Version

$ git rev-parse HEAD
0c4d81f9bc9bb39963ded050b821347ae214d734

cc @alexcrichton

Activity

added
T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
on Feb 13, 2016
added a commit that references this issue on Feb 13, 2016
5aef0e8
added a commit that references this issue on Feb 20, 2016

Auto merge of #31620 - alexcrichton:fix-out-of-tree-builds, r=brson

df128bd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @alexcrichton@japaric

      Issue actions

        [rustbuild] error on out of source build: fatal: Not a git repository · Issue #31619 · rust-lang/rust