Skip to content

Custom libdir breaks std crate #45345

Closed
Closed
@o01eg

Description

@o01eg

I maintain live-ebuild for dev channel. To avoid collision between different rust channels libdir should be set to different subdirectory: gentoo/gentoo-rust#287
It worked with configure script but was broken after moving to x.py script.

config.toml file:

[llvm]
optimize = true
release-debuginfo = false
assertions = false
[build]
build = "x86_64-unknown-linux-gnu"
host = ["x86_64-unknown-linux-gnu"]
target = ["x86_64-unknown-linux-gnu"]
docs = true
submodules = false
python = "python2.7"
locked-deps = true
vendor = false
verbose = 2
sanitizers = true
extended = true
[install]
prefix = "/usr"
libdir = "lib64/rust-9999"
docdir = "share/doc/rust-9999"
mandir = "share/rust-9999/man"
[rust]
optimize = true
debuginfo = false
debug-assertions = false
use-jemalloc = true
default-linker = "x86_64-pc-linux-gnu-gcc"
rpath = false
ignore-git = false
[target.x86_64-unknown-linux-gnu]
cc = "x86_64-pc-linux-gnu-gcc"
cxx = "x86_64-pc-linux-gnu-g++"
ar = "x86_64-pc-linux-gnu-ar"
llvm-config = "/usr/bin/x86_64-pc-linux-gnu-llvm-config"

Compiling hello world project:

$ cargo build --verbose
   Compiling tst01 v0.1.0 (file:///tmp/tst01)
     Running `rustc --crate-name tst01 src/main.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=b838c4ea0bb50c79 -C extra-filename=-b838c4ea0bb50c79 --out-dir /tmp/tst01/target/debug/deps -L dependency=/tmp/tst01/target/debug/deps`
error[E0463]: can't find crate for `std`

error: aborting due to previous error

error: Could not compile `tst01`.

Caused by:
  process didn't exit successfully: `rustc --crate-name tst01 src/main.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=b838c4ea0bb50c79 -C extra-filename=-b838c4ea0bb50c79 --out-dir /tmp/tst01/target/debug/deps -L dependency=/tmp/tst01/target/debug/deps` (exit code: 101)

If I set libdir to lib64 then rustc works.

rustc --version --verbose:

rustc 1.22.0-dev (db80da1c1 2017-10-17)
binary: rustc
commit-hash: db80da1c1a20529054ce6745a6219c2108693fb7
commit-date: 2017-10-17
host: x86_64-unknown-linux-gnu
release: 1.22.0-dev
LLVM version: 3.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions