Created
June 6, 2025 12:03
-
-
Save qknight/cec3d2be284ab704ae88ee2da5726821 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# problem | |
problem: the quote crate produces a 'can't find crate for `proc_macro2`' problem | |
# solution | |
the solution for the problem is to add the -L to the --crate-name quote crate: | |
[nixos@nixos:~/rphtml/test/quote-1.0.39]$ /nix/store/9bc93rjal0wmb7cc5j0c94k5dfl2axiz-rustc-wrapper-1.86.0/bin/rustc --crate-name quote --edition=2018 src/lib.rs --crate-type lib --emit=dep-info,metadata,link | |
-C embed-bitcode=no --cfg 'feature="default"' --cfg 'feature="proc-macro"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("default", "proc-macro"))' --cfg no_literal_byte_character --cfg no_li | |
teral_c_string -C metadata=9b8a9fdb179dc4b4 -C extra-filename=-6aacf6b034557052 --extern proc_macro2=../deps/libproc_macro2/libproc_macro2-a253d4ccb9225c80.rmeta -L ../deps/libunicode_ident/ --out-dir ../deps/ | |
--cap-lints allow | |
so in nix terms this probably needs `propagatedBuildInputs` | |
# details | |
# unicode_ident | |
# /nix/store/9bc93rjal0wmb7cc5j0c94k5dfl2axiz-rustc-wrapper-1.86.0/bin/rustc --crate-name unicode_ident --edition=2018 src/lib.rs --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=5dab009dea47bbaa -C extra-filename=-fe629a8e43aefbdd --out-dir ../deps/ --cap-lints allow --emit=metadata | |
# proc_macro2 | |
# /nix/store/9bc93rjal0wmb7cc5j0c94k5dfl2axiz-rustc-wrapper-1.86.0/bin/rustc --crate-name proc_macro2 --edition=2021 src/lib.rs --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no --cfg 'feature="default"' --cfg 'feature="span-locations"' --cfg 'feature="proc-macro"' --cfg use_proc_macro --cfg no_literal_byte_character --cfg no_literal_c_string --cfg wrap_proc_macro -C metadata=7b315970b4477e11 -C extra-filename=-a253d4ccb9225c80 --out-dir ../deps/ --extern unicode_ident=../deps/libunicode_ident-fe629a8e43aefbdd.rmeta --cap-lints allow | |
# quote | |
# /nix/store/9bc93rjal0wmb7cc5j0c94k5dfl2axiz-rustc-wrapper-1.86.0/bin/rustc --crate-name quote --edition=2018 src/lib.rs --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no --cfg 'feature="default"' --cfg 'feature="proc-macro"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("default", "proc-macro"))' --cfg no_literal_byte_character --cfg no_literal_c_string -C metadata=9b8a9fdb179dc4b4 -C extra-filename=-6aacf6b034557052 --extern proc_macro2=../deps/libproc_macro2-a253d4ccb9225c80.rmeta --out-dir ../deps/ --cap-lints allow | |
error[E0463]: can't find crate for `proc_macro2` | |
--> src/ext.rs:3:5 | |
| | |
3 | use proc_macro2::{TokenStream, TokenTree}; | |
| ^^^^^^^^^^^ can't find crate | |
error[E0463]: can't find crate for `proc_macro2` | |
--> src/ext.rs:105:9 | |
| | |
105 | use proc_macro2::TokenStream; | |
| ^^^^^^^^^^^ can't find crate | |
error[E0463]: can't find crate for `proc_macro2` | |
--> src/ident_fragment.rs:3:5 | |
| | |
3 | use proc_macro2::{Ident, Span}; | |
| ^^^^^^^^^^^ can't find crate | |
error[E0463]: can't find crate for `proc_macro2` | |
--> src/to_tokens.rs:5:5 | |
| | |
5 | use proc_macro2::{Group, Ident, Literal, Punct, Span, TokenStream, TokenTree}; | |
| ^^^^^^^^^^^ can't find crate | |
error[E0463]: can't find crate for `proc_macro2` | |
--> src/runtime.rs:6:5 | |
| | |
6 | use proc_macro2::{Group, Ident, Punct, Spacing, TokenTree}; | |
| ^^^^^^^^^^^ can't find crate | |
error[E0463]: can't find crate for `proc_macro2` | |
--> src/runtime.rs:200:9 | |
| | |
200 | use proc_macro2::extra::DelimSpan; | |
| ^^^^^^^^^^^ can't find crate | |
error[E0463]: can't find crate for `proc_macro2` | |
--> src/runtime.rs:201:9 | |
| | |
201 | use proc_macro2::Span; | |
| ^^^^^^^^^^^ can't find crate | |
error[E0463]: can't find crate for `proc_macro2` | |
--> src/spanned.rs:2:5 | |
| | |
2 | use proc_macro2::extra::DelimSpan; | |
| ^^^^^^^^^^^ can't find crate | |
error[E0463]: can't find crate for `proc_macro2` | |
--> src/spanned.rs:3:5 | |
| | |
3 | use proc_macro2::{Span, TokenStream}; | |
| ^^^^^^^^^^^ can't find crate | |
error[E0463]: can't find crate for `proc_macro2` | |
--> src/spanned.rs:43:9 | |
| | |
43 | use proc_macro2::extra::DelimSpan; | |
| ^^^^^^^^^^^ can't find crate | |
error[E0463]: can't find crate for `proc_macro2` | |
--> src/spanned.rs:44:9 | |
| | |
44 | use proc_macro2::Span; | |
| ^^^^^^^^^^^ can't find crate | |
error[E0463]: can't find crate for `proc_macro2` | |
--> src/runtime.rs:14:22 | |
| | |
14 | pub type Delimiter = proc_macro2::Delimiter; | |
| ^^^^^^^^^^^ can't find crate | |
error[E0463]: can't find crate for `proc_macro2` | |
--> src/runtime.rs:16:17 | |
| | |
16 | pub type Span = proc_macro2::Span; | |
| ^^^^^^^^^^^ can't find crate | |
error[E0463]: can't find crate for `proc_macro2` | |
--> src/runtime.rs:18:24 | |
| | |
18 | pub type TokenStream = proc_macro2::TokenStream; | |
| ^^^^^^^^^^^ can't find crate | |
error: aborting due to 14 previous errors | |
For more information about this error, try `rustc --explain E0463`. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment