Skip to content

Plugins without #[no_link] produce shared library error when running #20769

Closed
@daboross

Description

@daboross

When building a project using regex_macros, the binary runs successfully on my development system, but fails on production (where rust isn't installed).

Here's the smallest program I could think of that will cause this:

#![feature(plugin)]
extern crate regex;
#[plugin]
// works correctly if #[no_link] is used here
extern crate regex_macros;

fn main() {
}

An even more concise example causing the same effect:

extern crate regex_macros;
fn main() {}

That program compiles and runs successfully on a system with rust installed, but fails on one which isn't with the following error message:

$ ./test-project 
./test-project: error while loading shared libraries: libstd-4e7c5e5c.so: cannot open shared object file: No such file or directory

Note that this works correctly if #[no_link] is added before extern crate regex_macros;. This also works correctly when regex_macros isn't used.

I wasn't sure if this is an issue in rust or the regex library, so I've submitted the issue here. Feel free to close it and direct me to the correct place to submit this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-pluginsArea: compiler plugins, doc.rust-lang.org/nightly/unstable-book/language-features/plugin.html

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions