Skip to content

Importing from rustpkg in pkg.rs causes link error #7338

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
dcolish opened this issue Jun 24, 2013 · 4 comments
Closed

Importing from rustpkg in pkg.rs causes link error #7338

dcolish opened this issue Jun 24, 2013 · 4 comments

Comments

@dcolish
Copy link

dcolish commented Jun 24, 2013

When trying to convert rust-http-client to use rustpkg I ran into some issues during link phase. With a custom pkg.rs, I am able to cause the following output:

WARNING: The Rust package manager is experimental and may be unstable
rust: ~"Using sysroot: Some(@{is_absolute: true, components: ~[~\"home\", ~\"dcolish\", ~\"local\", ~\"rust\", ~
rust: ~"whole = rust-http-client part = rust-http-client"
rust: ~"rust-http-client doesn\'t look like an explicit-version thing"
rust: ~"rust-http-client has no explicit version"
rust: ~"try_getting_version: rust-http-client"
rust: ~"local_path = rust_http_client, remote_path = rust-http-client"
rust: ~"=> p = whatever.rs"
rust: ~"=> p = .git"
rust: ~"p = .git, remote_path = rust-http-client"
rust: ~"whole = .git part = .git"
rust: ~".git doesn\'t look like an explicit-version thing"
rust: ~"=> p = .gitignore"
rust: ~"=> p = rust-http-client"
rust: ~"p = rust-http-client, remote_path = rust-http-client"
rust: ~"build: workspace = . pkgid = rust_http_client-0.1"
rust: ~"Destination dir = ./build/rust_http_client"
rust: ~"Package src = {root: {is_absolute: false, components: ~[~\".\"]}, dst_dir: {is_absolute: false, componen
rust: ~"Package source directory = Some({is_absolute: false, components: ~[~\".\", ~\"src\", ~\"rust-http-client
rust: ~"Returning package script with id &{remote_path: {__field__: {is_absolute: false, components: ~[~\"rust-h
rust: ~"run_custom: post_build"
rust: ~"Working directory = ./build/rust_http_client"
rust: ~"Building output filenames with script name ./src/rust-http-client/pkg.rs"
rust: ~"Root is /home/dcolish/local, calling compile_rest"
rust: ~"Calling build_output_filenames with ./build/rust_http_client, building library? @false"
rust: ~"Outputs are @{out_filename: {is_absolute: false, components: ~[~\".\", ~\"build\", ~\"rust_http_client\"
rust: ~"\"additional libraries:\""
./src/rust-http-client/pkg.rs:2:4: 2:12 warning: unused import [-W unused-imports (default)]
./src/rust-http-client/pkg.rs:2 use std::run;
                                    ^~~~~~~~
error: linking with `cc` failed with code 1
note: cc arguments: -L/home/dcolish/local/rust/trunk/lib/rustc/x86_64-unknown-linux-gnu/lib -m64 -o ./build/rust
note: /usr/bin/ld: cannot find -lrustllvm
collect2: error: ld returned 1 exit status

error: aborting due to previous error
rust: task failed at 'explicit failure', /home/dcolish/workspace/rust/src/libsyntax/diagnostic.rs:98
rust: domain main @0x1b70c80 root task failed

The smallest program that I can write to cause this behavior is the following

$ cat pkg.rs
extern mod rustpkg;
fn main() {}
@dcolish
Copy link
Author

dcolish commented Jun 24, 2013

@ghost ghost assigned catamorphism Jun 24, 2013
@catamorphism
Copy link
Contributor

Related to #6401

@catamorphism
Copy link
Contributor

#7403 should fix this when it lands.

@catamorphism
Copy link
Contributor

Testing this.

flip1995 pushed a commit to flip1995/rust that referenced this issue Oct 7, 2021
Re-write shadow lints

changelog: Move shadow_unrelated to restriction
changelog: The shadow lints find a lot more shadows and are not limited to certain patterns

Drastically simplifies the implementation. Catches a lot more cases.

I removed the "initialization happens here" note. It is not helpful IMO.

Closes rust-lang#318
Fixes rust-lang#2890
Fixes rust-lang#6563
Fixes rust-lang#7588
Fixes rust-lang#7620
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