-
Notifications
You must be signed in to change notification settings - Fork 92
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
multiple matching crates for lazy_static
when trying to compile tracing-core
#51
Comments
@kolloch This is the problem I reference in the |
Thank you. I could reproduce this problem but have trouble understanding why this happens. I would expect two flags of similar to |
Ah, okay, we might need to filter duplicate ones in filterDependencies. |
If you have some time, I'd love a minimal reproducible example for this. I could reproduce this before with the "with_problematic_crates" example when using "tracing" with default features. See #51 (comment) Now, I cannot reproduce it anymore. Can you? I'd love a minimal project example which has only a small number of dependencies. I suspect that my nixpkgs update fixed it. |
I was actually able to reproduce by only adding Another error popped up, though...
I can open another issue for that 😛 In any case, this particular issue with |
Thank you for testing! I think that For dbus_codegen, I do not see any extern parameter. Something is quite wrong :( Could you please create another bug with a reproducing repro? I would be appreciated... |
So this builds but I think that the dependency with the more specific target should probably override the features of the general dependency. |
Let's reopen if this becomes a concrete problem again. |
I have a similar problem. Tell me if you want me to open a new issue: Cargo.toml futures = { version = "0.3", default-features = false, features = ["compat"] }
futures01 = { package = "futures", version = "0.1" } main.rs use futures01::future::IntoFuture;
fn something(
) -> impl futures01::Future<Item = (), Error = std::io::Error> {
Ok(()).into_future()
}
fn main() {
println!("Hello, world!");
} log
|
That looks like this issue. Do you use nixpks-unstable? Can you include the rustc command lines? |
Yes
Do you mean the full build log like this:
|
This is an instance of #83. The generated command line is definitely wrong: Running rustc --crate-name test_crate2nix src/main.rs --crate-type bin -C opt-level=3 -C codegen-units=4 --remap-path-prefix=/build=/ --extern futures01=/nix/store/bikk5jmdrkj84lhwnbvdvld29g7awc8k-rust_futures-0.1.29-lib/lib/libfutures-935dbfd7d6.rlib --extern futures01=/nix/store/jwjxndqbg3jncs0fp3jdw5gxn06bdwfm-rust_futures-0.3.5-lib/lib/libfutures-a0288b50d7.rlib --cfg feature="default" --edition 2018 --out-dir target/bin -L dependency=target/deps --cap-lints allow --color always There is a regression test that is very similar, so I suspect you are not using a recent crate2nix (from master) version or not an updated nixpkgs-unstable version. Try updating both. You need this PR. |
I should be up-to-date now and I still have the problem: I don't have to use crate2nix 0.9.0-alpha.1
|
Sorry, you are right! I didn't push the fix. Sorry for that. It should be pushed now and work for you. Thanks for your insistance. |
Now that #37 has been fixed, I am able to get a little further with compiling my project using
crate2nix
.When attempting to build, I encounter an error with multiple matching crates for
lazy_static
.nix-info -m
"x86_64-linux"
Linux 5.3.11, NixOS, 19.09.1300.08e503bac6d (Loris)
yes
yes
nix-env (Nix) 2.3
"nixos-19.09.1300.08e503bac6d"
""
/nix/var/nix/profiles/per-user/root/channels/nixos
crate2nix version:
crate2nix 0.6.0
(installed from master)Happy to provide any other information that might help.
The text was updated successfully, but these errors were encountered: