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

Using structure in a binary makes it link dynamically to libstd #5

Closed
birkenfeld opened this issue Jan 10, 2018 · 3 comments
Closed

Comments

@birkenfeld
Copy link
Contributor

birkenfeld commented Jan 10, 2018

Not sure if this is a problem with structure or the proc-macro crates it uses, but...

$ cargo new --bin rust-test; cd rust-test; cargo build
$ ldd target/debug/rust-test
        linux-vdso.so.1 =>  (0x00007ffe588e1000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007efc9077a000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007efc90572000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007efc90353000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007efc9013c000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007efc8fd5c000)
        /lib64/ld-linux-x86-64.so.2 (0x00007efc90bef000)

$ cargo add structure; (add "extern crate structure;" to main.rs)
$ cargo build
$ ldd target/debug/rust-test
        linux-vdso.so.1 =>  (0x00007ffdb0dc3000)
        libstd-e02a69124d8fa918.so => not found
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9702591000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f97021b1000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f97029ab000)

System: Linux amd64, Rust: stable 1.23 or nightly.

@birkenfeld
Copy link
Contributor Author

Found it: dtolnay/proc-macro-hack#13

Please update to proc-macro-hack = "0.4" to fix it.

@liranringel
Copy link
Owner

Hi, thanks for the report.
I'm not at home, I'll probably fix it by tomorrow.

@birkenfeld
Copy link
Contributor Author

Thanks!

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