Skip to content
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

Linker error calling StackSegment::start() #8478

Closed
kmcallister opened this issue Aug 12, 2013 · 2 comments
Closed

Linker error calling StackSegment::start() #8478

kmcallister opened this issue Aug 12, 2013 · 2 comments

Comments

@kmcallister
Copy link
Contributor

After applying #8475 I can access current_stack_segment but I get a linker error calling .start() on it:

use std::rt::local::Local;
use std::rt::task::Task;

fn main() {
    do Local::borrow |task: &mut Task| {
        fmt!("%?", task.coroutine.get_ref().current_stack_segment.start());
    }
}
$ ~/proj/servo/servo/build/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/bin/rustc foo.rs
error: linking with `cc` failed with code 1
note: cc arguments: -L/home/keegan/proj/servo/servo/build/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib -m64 -o foo foo.o -L/home/keegan/proj/servo/servo/build/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib -lstd-6c65cf4b443341b1-0.8-pre -lrustrt -lrt -lpthread -L/tmp/.rust -L/tmp -lrt -ldl -lm -lmorestack -lrustrt -Wl,-rpath,$ORIGIN/../home/keegan/proj/servo/servo/build/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib -Wl,-rpath,/home/keegan/proj/servo/servo/build/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib -Wl,-rpath,/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib
note: foo.o: In function `main::anon::expr_fn_5280':
foo.rc:(.text+0xe832): undefined reference to `rt::stack::__extensions__::meth_31856::start::_bf49874ae71d3b80::_0$x2e8$x2dpre'
collect2: error: ld returned 1 exit status

error: aborting due to previous error

Possibly something's wrong with my locally patched rustc but I did do a clean build after applying that patch.

@brson
Copy link
Contributor

brson commented Aug 13, 2013

Hm. This is probably because mod stack is not pub!

@kmcallister
Copy link
Contributor Author

Added a fix to #8475. @brson: r? again?

kmcallister added a commit to kmcallister/rust that referenced this issue Aug 13, 2013
@bors bors closed this as completed in 4fd5318 Aug 13, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Apr 7, 2022
[`map_identity`] checks for needless `map_err`

Closes rust-lang#8478

changelog: [`map_identity`] checks for needless `map_err`
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

No branches or pull requests

2 participants