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

Static libs are doubling up on new lang item definitions #14355

Closed
bharrisau opened this issue May 22, 2014 · 4 comments
Closed

Static libs are doubling up on new lang item definitions #14355

bharrisau opened this issue May 22, 2014 · 4 comments

Comments

@bharrisau
Copy link
Contributor

Since #14293 I have added the dummy lang items for the weak linking in my projects (or I am unable to build static libs). Now static libs are defining rust_eh_personality and rust_stack_exhausted which is causing linker errors due to duplicate definitions.

Note: This is only for static libs, rlibs are fine. See travis log here https://travis-ci.org/bharrisau/zinc/jobs/25774156

@bharrisau bharrisau changed the title Static libs are doubling up on Static libs are doubling up on new lang item definitions May 22, 2014
@huonw
Copy link
Member

huonw commented May 22, 2014

cc @alexcrichton (thanks for filing!)

@alexcrichton
Copy link
Member

The staticlib format was initially intended to be the only compilation unit of rust included in an external product. Including two staticlibs was not an intended use case of staticlibs (hence the duplicated symbols). Each staticlib output is inteded to be its own standalone version of the rust world necessary for it to run.

Could you combine the two staticlibs into one staticlib with a meta-crate?

@bharrisau
Copy link
Contributor Author

Probably (im not the primary maintainer). Don't mind if this is
#willnotfix, I was just making sure there was awareness of the change.
On 23/05/2014 1:03 am, "Alex Crichton" notifications@github.com wrote:

The staticlib format was initially intended to be the only compilation
unit of rust included in an external product. Including two staticlibs was
not an intended use case of staticlibs (hence the duplicated symbols). Each
staticlib output is inteded to be its own standalone version of the rust
world necessary for it to run.

Could you combine the two staticlibs into one staticlib with a meta-crate?


Reply to this email directly or view it on GitHubhttps://github.com//issues/14355#issuecomment-43915887
.

@alexcrichton
Copy link
Member

Ok, for now I'm going to close this as WONTFIX and instead recommend only one staticlib being included at a time. We may want to revisit that decision later, but for now that's the state of things.

bors added a commit to rust-lang-ci/rust that referenced this issue Mar 20, 2023
fix: Fix reference completions being emitted in places other than argument lists

Fixes rust-lang/rust-analyzer#14331
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

3 participants