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

Compiles without errors but fails on linking(no FFI) #17610

Closed
Eilie opened this issue Sep 28, 2014 · 3 comments
Closed

Compiles without errors but fails on linking(no FFI) #17610

Eilie opened this issue Sep 28, 2014 · 3 comments
Labels
A-linkage Area: linking into static, shared libraries and binaries I-compiletime Issue: Problems and improvements with respect to compile times.

Comments

@Eilie
Copy link

Eilie commented Sep 28, 2014

Hello,

Code from https://gist.github.com/Eilie/76bca04969992e471f4d compiles just fine but fails at linking stage. Here's what I've got on #rust:

 kimundi >>> ainieco: So, its probably a combination of bugs/misuse
  in cargo and rustc where it does 
 not recompile the library you depend on, and rustc does not do enough 
 version checking to notice that it links against a old version of the lib
 without that symbol
@kmcallister kmcallister added I-wrong A-linkage Area: linking into static, shared libraries and binaries I-compiletime Issue: Problems and improvements with respect to compile times. and removed I-wrong labels Sep 28, 2014
@steveklabnik
Copy link
Member

Triage: this still happens. I've made a repo to make it a bit easier than the linked gist, with syntax updates. https://github.com/steveklabnik/rust-issue-17610

@jminer
Copy link

jminer commented Dec 30, 2015

Likely a dupe of #16734 (there's a comment in #20201 that explains that bug). In this case, it is a field instead of a method but otherwise looks the same.

@alexcrichton
Copy link
Member

Ah yeah I think this is a dupe of #16734, so closing in favor of that. Thanks @jminer!

lnicola pushed a commit to lnicola/rust that referenced this issue Jul 28, 2024
Add method `Impl::all_in_module(…)` for allowing more localized querying

This PR is motivated by an [outside use](https://github.com/regexident/cargo-modules) of the `ra_ap_hir` crate that would benefit from being able to more efficiently query for all impls of a given module (instead of having to query for its parent crate's impls and then filtering on `impl_hir.module(db) == module_hir`).

I have the suspicion that the code as is won't quite work for file-level modules, since those don't have a block, afaict, but with all the crate-rename and version shenanigans around the `ra_ap_` release process I haven't yet been able to figure out how to patch a `ra_ap_` dependency from a third-party crate (let alone how to test this from inside of `rust-analyzer`), so haven't been able to actually run and test this. 😔

Any hints on how to make this (i.e. the code itself, as well as the testing) work are more than welcome!
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 1, 2024
Add method `Impl::all_in_module(…)` for allowing more localized querying

This PR is motivated by an [outside use](https://github.com/regexident/cargo-modules) of the `ra_ap_hir` crate that would benefit from being able to more efficiently query for all impls of a given module (instead of having to query for its parent crate's impls and then filtering on `impl_hir.module(db) == module_hir`).

I have the suspicion that the code as is won't quite work for file-level modules, since those don't have a block, afaict, but with all the crate-rename and version shenanigans around the `ra_ap_` release process I haven't yet been able to figure out how to patch a `ra_ap_` dependency from a third-party crate (let alone how to test this from inside of `rust-analyzer`), so haven't been able to actually run and test this. 😔

Any hints on how to make this (i.e. the code itself, as well as the testing) work are more than welcome!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries I-compiletime Issue: Problems and improvements with respect to compile times.
Projects
None yet
Development

No branches or pull requests

5 participants