Skip to content

Build and install error #95608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MrMidnightOfficial opened this issue Apr 2, 2022 · 4 comments · Fixed by #95849
Closed

Build and install error #95608

MrMidnightOfficial opened this issue Apr 2, 2022 · 4 comments · Fixed by #95849

Comments

@MrMidnightOfficial
Copy link

MrMidnightOfficial commented Apr 2, 2022

I run cp config.toml.example config.toml ans then ./x.py build && ./x.py install and I get:

$ ./x.py build && ./x.py install
downloading https://static.rust-lang.org/dist/2022-01-13/rust-std-1.58.0-x86_64-pc-windows-gnu.tar.xz
extracting G:\rust-1.59.0\rust-1.59.0\build\cache\2022-01-13\rust-std-1.58.0-x86_64-pc-windows-gnu.tar.xz
downloading https://static.rust-lang.org/dist/2022-01-13/rustc-1.58.0-x86_64-pc-windows-gnu.tar.xz
extracting G:\rust-1.59.0\rust-1.59.0\build\cache\2022-01-13\rustc-1.58.0-x86_64-pc-windows-gnu.tar.xz
downloading https://static.rust-lang.org/dist/2022-01-13/cargo-1.58.0-x86_64-pc-windows-gnu.tar.xz
extracting G:\rust-1.59.0\rust-1.59.0\build\cache\2022-01-13\cargo-1.58.0-x86_64-pc-windows-gnu.tar.xz
Building rustbuild
error: failed to load manifest for workspace member G:\rust-1.59.0\rust-1.59.0\src\tools\rust-installer

Caused by:
failed to read G:\rust-1.59.0\rust-1.59.0\src\tools\rust-installer\Cargo.toml

Caused by:
The system cannot find the file specified. (os error 2)
failed to run: G:\rust-1.59.0\rust-1.59.0\build\x86_64-pc-windows-gnu\stage0\bin\cargo.exe build --manifest-path G:\rust-1.59.0\rust-1.59.0\src/bootstrap/Cargo.toml
Build completed unsuccessfully in 0:08:36

@MrMidnightOfficial MrMidnightOfficial added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 2, 2022
@ehuss
Copy link
Contributor

ehuss commented Apr 3, 2022

Can you say more about how you obtained and extracted the rust source? If you downloaded and extracted from https://static.rust-lang.org/dist/rustc-1.59.0-src.tar.gz, the src/tools/rust-installer directory should be there.

@ehuss ehuss removed I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Apr 3, 2022
@MrMidnightOfficial
Copy link
Author

Can you say more about how you obtained and extracted the rust source? If you downloaded and extracted from https://static.rust-lang.org/dist/rustc-1.59.0-src.tar.gz, the src/tools/rust-installer directory should be there.

I downloaded the source from here: https://github.com/rust-lang/rust/releases/tag/1.59.0
and the src/tools/rust-installer is there and is empty.

@ehuss
Copy link
Contributor

ehuss commented Apr 3, 2022

Ah, the tagged GitHub releases shouldn't be used. They do not include the git submodules. The link above is the one that should be used.

Unfortunately we don't have the ability to disable GitHub releases, but we can probably add an error message to x.py if it can detect this scenario.

@MrMidnightOfficial
Copy link
Author

MrMidnightOfficial commented Apr 5, 2022

Ah, the tagged GitHub releases shouldn't be used. They do not include the git submodules. The link above is the one that should be used.

Unfortunately we don't have the ability to disable GitHub releases, but we can probably add an error message to x.py if it can detect this scenario.

I did ./x.py build && ./x.py install and got

$ ./x.py build && ./x.py install
Building rustbuild
Finished dev [unoptimized] target(s) in 1m 06s
warning: creating symbolic link G:\rustc-1.59.0-src\rustc-1.59.0-src\build\x86_64-pc-windows-gnu\stage0-sysroot\lib/rustlib/src\rust to G:\rustc-1.59.0-src\rustc-1.59.0-src failed with Incorrect function. (os error 1)
Building stage0 std artifacts (x86_64-pc-windows-gnu -> x86_64-pc-windows-gnu)
Finished release [optimized] target(s) in 39.65s
Copying stage0 std from stage0 (x86_64-pc-windows-gnu -> x86_64-pc-windows-gnu / x86_64-pc-windows-gnu)
Building LLVM for x86_64-pc-windows-gnu
running: "cmake" "G:\rustc-1.59.0-src\rustc-1.59.0-src\src/llvm-project/llvm" "-G" "Ninja" "-DLLVM_ENABLE_ASSERTIONS=OFF" "-DLLVM_ENABLE_PLUGINS=OFF" "-DLLVM_TARGETS_TO_BUILD=AArch64;ARM;BPF;Hexagon;MSP430;Mips;NVPTX;PowerPC;RISCV;Sparc;SystemZ;WebAssembly;X86" "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR;M68k" "-DLLVM_INCLUDE_EXAMPLES=OFF" "-DLLVM_INCLUDE_DOCS=OFF" "-DLLVM_INCLUDE_BENCHMARKS=OFF" "-DLLVM_INCLUDE_TESTS=OFF" "-DLLVM_ENABLE_TERMINFO=OFF" "-DLLVM_ENABLE_LIBEDIT=OFF" "-DLLVM_ENABLE_BINDINGS=OFF" "-DLLVM_ENABLE_Z3_SOLVER=OFF" "-DLLVM_PARALLEL_COMPILE_JOBS=4" "-DLLVM_TARGET_ARCH=x86_64" "-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-pc-windows-gnu" "-DLLVM_INSTALL_UTILS=ON" "-DLLVM_ENABLE_ZLIB=OFF" "-DLLVM_ENABLE_LIBXML2=OFF" "-DLLVM_VERSION_SUFFIX=-rust-dev" "-DCMAKE_INSTALL_MESSAGE=LAZY" "-DCMAKE_C_COMPILER=gcc.exe" "-DCMAKE_CXX_COMPILER=g++.exe" "-DCMAKE_ASM_COMPILER=gcc.exe" "-DCMAKE_C_FLAGS=-ffunction-sections -fdata-sections -m64" "-DCMAKE_CXX_FLAGS=-ffunction-sections -fdata-sections -m64" "-DCMAKE_INSTALL_PREFIX=G:\rustc-1.59.0-src\rustc-1.59.0-src\build\x86_64-pc-windows-gnu\llvm" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -m64" "-DCMAKE_BUILD_TYPE=Release"
-- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)
-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Ninja version: 1.10.2
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- LLVM host triple: x86_64-w64-windows-gnu
-- LLVM default target triple: x86_64-pc-windows-gnu
-- LLVMHello ignored -- Loadable modules not supported on this platform.
-- Targeting AArch64
-- Targeting ARM
-- Targeting BPF
-- Targeting Hexagon
-- Targeting MSP430
-- Targeting Mips
-- Targeting NVPTX
-- Targeting PowerPC
-- Targeting RISCV
-- Targeting Sparc
-- Targeting SystemZ
-- Targeting WebAssembly
-- Targeting X86
-- Targeting AVR
-- Targeting M68k
-- BugpointPasses ignored -- Loadable modules not supported on this platform.
-- Configuring done
-- Generating done
-- Build files have been written to: G:/rustc-1.59.0-src/rustc-1.59.0-src/build/x86_64-pc-windows-gnu/llvm/build
running: "cmake" "--build" "." "--target" "install" "--config" "Release" "--" "-j" "4"
[1/2594] Building Attributes.inc...
FAILED: include/llvm/IR/Attributes.inc G:/rustc-1.59.0-src/rustc-1.59.0-src/build/x86_64-pc-windows-gnu/llvm/build/include/llvm/IR/Attributes.inc
cmd.exe /C "cd /D G:\rustc-1.59.0-src\rustc-1.59.0-src\build\x86_64-pc-windows-gnu\llvm\build && G:\rustc-1.59.0-src\rustc-1.59.0-src\build\x86_64-pc-windows-gnu\llvm\build\bin\llvm-tblgen.exe -gen-attrs -I G:/rustc-1.59.0-src/rustc-1.59.0-src/src/llvm-project/llvm/include/llvm/IR -IG:/rustc-1.59.0-src/rustc-1.59.0-src/build/x86_64-pc-windows-gnu/llvm/build/include -IG:/rustc-1.59.0-src/rustc-1.59.0-src/src/llvm-project/llvm/include G:/rustc-1.59.0-src/rustc-1.59.0-src/src/llvm-project/llvm/include/llvm/IR/Attributes.td --write-if-changed -o include/llvm/IR/Attributes.inc -d include/llvm/IR/Attributes.inc.d"
[2/2594] Building IntrinsicImpl.inc...
FAILED: include/llvm/IR/IntrinsicImpl.inc G:/rustc-1.59.0-src/rustc-1.59.0-src/build/x86_64-pc-windows-gnu/llvm/build/include/llvm/IR/IntrinsicImpl.inc
cmd.exe /C "cd /D G:\rustc-1.59.0-src\rustc-1.59.0-src\build\x86_64-pc-windows-gnu\llvm\build && G:\rustc-1.59.0-src\rustc-1.59.0-src\build\x86_64-pc-windows-gnu\llvm\build\bin\llvm-tblgen.exe -gen-intrinsic-impl -I G:/rustc-1.59.0-src/rustc-1.59.0-src/src/llvm-project/llvm/include/llvm/IR -IG:/rustc-1.59.0-src/rustc-1.59.0-src/build/x86_64-pc-windows-gnu/llvm/build/include -IG:/rustc-1.59.0-src/rustc-1.59.0-src/src/llvm-project/llvm/include G:/rustc-1.59.0-src/rustc-1.59.0-src/src/llvm-project/llvm/include/llvm/IR/Intrinsics.td --write-if-changed -o include/llvm/IR/IntrinsicImpl.inc -d include/llvm/IR/IntrinsicImpl.inc.d"
[3/2594] Building IntrinsicsARM.h...
FAILED: include/llvm/IR/IntrinsicsARM.h G:/rustc-1.59.0-src/rustc-1.59.0-src/build/x86_64-pc-windows-gnu/llvm/build/include/llvm/IR/IntrinsicsARM.h
cmd.exe /C "cd /D G:\rustc-1.59.0-src\rustc-1.59.0-src\build\x86_64-pc-windows-gnu\llvm\build && G:\rustc-1.59.0-src\rustc-1.59.0-src\build\x86_64-pc-windows-gnu\llvm\build\bin\llvm-tblgen.exe -gen-intrinsic-enums -intrinsic-prefix=arm -I G:/rustc-1.59.0-src/rustc-1.59.0-src/src/llvm-project/llvm/include/llvm/IR -IG:/rustc-1.59.0-src/rustc-1.59.0-src/build/x86_64-pc-windows-gnu/llvm/build/include -IG:/rustc-1.59.0-src/rustc-1.59.0-src/src/llvm-project/llvm/include G:/rustc-1.59.0-src/rustc-1.59.0-src/src/llvm-project/llvm/include/llvm/IR/Intrinsics.td --write-if-changed -o include/llvm/IR/IntrinsicsARM.h -d include/llvm/IR/IntrinsicsARM.h.d"
[4/2594] Building IntrinsicsHexagon.h...
FAILED: include/llvm/IR/IntrinsicsHexagon.h G:/rustc-1.59.0-src/rustc-1.59.0-src/build/x86_64-pc-windows-gnu/llvm/build/include/llvm/IR/IntrinsicsHexagon.h
cmd.exe /C "cd /D G:\rustc-1.59.0-src\rustc-1.59.0-src\build\x86_64-pc-windows-gnu\llvm\build && G:\rustc-1.59.0-src\rustc-1.59.0-src\build\x86_64-pc-windows-gnu\llvm\build\bin\llvm-tblgen.exe -gen-intrinsic-enums -intrinsic-prefix=hexagon -I G:/rustc-1.59.0-src/rustc-1.59.0-src/src/llvm-project/llvm/include/llvm/IR -IG:/rustc-1.59.0-src/rustc-1.59.0-src/build/x86_64-pc-windows-gnu/llvm/build/include -IG:/rustc-1.59.0-src/rustc-1.59.0-src/src/llvm-project/llvm/include G:/rustc-1.59.0-src/rustc-1.59.0-src/src/llvm-project/llvm/include/llvm/IR/Intrinsics.td --write-if-changed -o include/llvm/IR/IntrinsicsHexagon.h -d include/llvm/IR/IntrinsicsHexagon.h.d"
ninja: build stopped: subcommand failed.
thread 'main' panicked at '
command did not execute successfully, got: exit code: 1

build script failed, must exit now', C:\Users\Dragon boy.cargo\registry\src\gb.xjqchip.workers.dev-1ecc6299db9ec823\cmake-0.1.44\src\lib.rs:885:5
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
finished in 70.343 seconds
Build completed unsuccessfully in 0:04:02

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Apr 10, 2022
…lacrum

Check for git submodules in non-git source tree.

People occasionally download the source from https://github.com/rust-lang/rust/releases, but those source distributions will not work because they are missing the submodules. They will get a confusing `failed to load manifest for workspace member` error.

Unfortunately AFAIK there is no way to disable the GitHub source links. This change tries to detect this scenario and provide an error message that guides them toward a solution.

Closes rust-lang#95608
@bors bors closed this as completed in 0b87143 Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants