mozilla/rust — Issue #1706: Linking fails when using a crate name alias
Author: brson
Created: 2012-01-30 06:18:44+00:00
State: open
Labels: bug, link, trans, unassigned

```
use stdlib(name = "std");

fn main() {
}
```

```
error: linking with gcc failed with code 1
note: gcc arguments: -L/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib -m64 -o x86_64-unknown-linux-gnu/test/run-pass/corelib.stage1-x86_64-unknown-linux-gnu x86_64-unknown-linux-gnu/test/run-pass/corelib.o -L/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib -lcore-14bd852465126fe7-0.1 -L/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib -lstd-79ca5fac56b63fde-0.1 -lm -lrustrt -lrt -ldl -lmorestack -Wl,-rpath,$ORIGIN/../../stage1/lib/rustc/x86_64-unknown-linux-gnu/lib -Wl,-rpath,/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib -Wl,-rpath,/home/brian/dev/rust-install/lib/rustc/x86_64-unknown-linux-gnu/lib
note: x86_64-unknown-linux-gnu/test/run-pass/corelib.o:(.data.rel+0x10): undefined reference to `_rust_crate_map_stdlib'
collect2: ld returned 1 exit status

error: aborting due to previous errors
```