goblin
goblin copied to clipboard
feature request, remove the dependes on log or make it optional.
That's pulls a lot deps, I wanna use goblin in a c runtime but too much deps cause it's hard to tracking.
I don’t think log has any dependencies unless I’m mistaken ?
More than you think
[dependencies]
cfg-if = "0.1.2"
serde = { version = "1.0", optional = true, default-features = false }
sval = { version = "0.5.2", optional = true, default-features = false }
dep pull dep, then have a lot of deps.
It looks like it has cfg-if as a dep and two optional others, which is quite annoying. I don’t remember when they were added (or why):
Dependencies
cfg-if ^0.1.2 serde ^1.0 optional sval ^0.5.2 optional
Making log optional is possible but I’m not convinced it’s worth the effort.
And then you still have plain and scroll and scroll derive.
scroll also pulls a lot deps, only plain are clean
Is the serde or eval dep getting turned on for you somehow?
[[package]]
name = "sc"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "176365c8253e381ad147774b6d9730a1b3fe2d7db498af521ed7d968674a55b3"
[[package]]
name = "scroll"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fda28d4b4830b807a8b43f7b0e6b5df875311b3e7621d84577188c175b6ec1ec"
dependencies = [
"scroll_derive",
]
[[package]]
name = "scroll_derive"
version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6dfde5d1531034db129e95c76ac857e2baecea3443579d493d02224950b0fb6d"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
I guess I don’t understand why
- getting rid of log would help manage dependencies since there are others, and
- I’m not sure why dependencies are an issue in a C build; if you can get one dep why couldn’t you get them all ?
I guess I don’t understand why
- getting rid of log would help manage dependencies since there are others, and
- I’m not sure why dependencies are an issue in a C build; if you can get one dep why couldn’t you get them all ?
See that, I am trying to building goblin as a depedency of c runtime, means I need modify every depended package to such form
[dependencies]
compiler_builtins = {version = "0.1", optional = true}
core = {version = "1.0", optional = true, package = "rustc-std-workspace-core"}
alloc = {version = "1.0", optional = true, package = "rustc-std-workspace-alloc"}
[features]
default = ["rustc-dep-of-std"]
rustc-dep-of-std = ["compiler_builtins", "core", "alloc"]
Maybe this is not a good solution
but anyway, gobin are very fundenmatal library, better have little deps.
Those look like you're using this in rustc, not c runtime?
If you're using this in rustc, then use the object
crate instead, since it already has support for this and is used by backtrace-rs
already. The object
crate doesn't support as much as goblin
, but additions are welcome.
So scroll itself will never have an external dep, because I’m the owner and I say so :) (I guess never say never but I don’t see it happening, maybe uuid was talked about but I’m not sure and doesn’t look like it’ll happen); grtting goblin off of scroll derive is possible but it would be a lot of work and I’m not sure I see the value.
Plain will never have a dep, at least the author promised me and I said ok I’ll take the dep but if it adds a dep I’ll remove the methods it uses and goes back to implementation similar to what it had before inside the crate.
So that leaves log. It’s possible to do a survey to see the effort to make log optional but it would be pretty invasive and not make the internals so nice, not sure, but I may be convinced ?
Is something turning on the optional log deps in your build ?
Actually it looks like log already is optional though I don’t know to what extent at the moment it disables functionality. I would have to check :)
Looks like the functionality is half implemented: https://github.com/m4b/goblin/search?q=log&type=
@lygstate if you want you could open up a PR making log fully optional.
Might be better to create a macro like glog
which includes the cfg in every log statement.
Anyway that should be enough for a start at least ? :)
Looks like the functionality is half implemented: https://github.com/m4b/goblin/search?q=log&type=
@lygstate if you want you could open up a PR making log fully optional.
Might be better to create a macro like
glog
which includes the cfg in every log statement.Anyway that should be enough for a start at least ? :)
Thanks, make sense, log is not a key component for goblin, I'll try PR when I have the time, thanks a lot
So scroll itself will never have an external dep, because I’m the owner and I say so :) (I guess never say never but I don’t see it happening, maybe uuid was talked about but I’m not sure and doesn’t look like it’ll happen); grtting goblin off of scroll derive is possible but it would be a lot of work and I’m not sure I see the value.
Plain will never have a dep, at least the author promised me and I said ok I’ll take the dep but if it adds a dep I’ll remove the methods it uses and goes back to implementation similar to what it had before inside the crate.
So that leaves log. It’s possible to do a survey to see the effort to make log optional but it would be pretty invasive and not make the internals so nice, not sure, but I may be convinced ?
Is something turning on the optional log deps in your build ?
After reading things about scroll, it's like a macro process engine, so have it as a deps not a problem, won't cause code bloating. Only the deps are limited, the only issue are log, I'll try to figure out use features to disable log totally.
scroll_derive is a prolbem, can we remove it with a customized one?
warning: Patch `proc-macro2 v1.0.24 (C:\work\study\languages\rust\rulibc\deps\proc-macro2)` was not used in the crate graph.
Patch `quote v1.0.7 (C:\work\study\languages\rust\rulibc\deps\quote)` was not used in the crate graph.
Patch `syn v1.0.44 (C:\work\study\languages\rust\rulibc\deps\syn)` was not used in the crate graph.
Patch `unicode-xid v0.2.1 (C:\work\study\languages\rust\rulibc\deps\unicode-xid)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
Compiling rulibc v0.1.0 (C:\work\study\languages\rust\rulibc)
warning: use of deprecated macro `try`: use the `?` operator instead
--> deps\plain\src\methods.rs:75:5
|
75 | try!(check_alignment::<T>(bytes));
| ^^^
|
= note: `#[warn(deprecated)]` on by default
warning: use of deprecated macro `try`: use the `?` operator instead
--> deps\plain\src\methods.rs:76:5
|
76 | try!(check_length::<T>(bytes, 1));
| ^^^
warning: use of deprecated macro `try`: use the `?` operator instead
--> deps\plain\src\methods.rs:125:5
|
125 | try!(check_alignment::<T>(bytes));
| ^^^
warning: use of deprecated macro `try`: use the `?` operator instead
--> deps\plain\src\methods.rs:126:5
|
126 | try!(check_length::<T>(bytes, len));
| ^^^
warning: use of deprecated macro `try`: use the `?` operator instead
--> deps\plain\src\methods.rs:141:5
|
141 | try!(check_alignment::<T>(bytes));
| ^^^
warning: use of deprecated macro `try`: use the `?` operator instead
--> deps\plain\src\methods.rs:142:5
|
142 | try!(check_length::<T>(bytes, 1));
| ^^^
warning: use of deprecated macro `try`: use the `?` operator instead
--> deps\plain\src\methods.rs:168:5
|
168 | try!(check_alignment::<T>(bytes));
| ^^^
warning: use of deprecated macro `try`: use the `?` operator instead
--> deps\plain\src\methods.rs:169:5
|
169 | try!(check_length::<T>(bytes, len));
| ^^^
warning: 8 warnings emitted
Compiling goblin v0.2.3 (C:\work\study\languages\rust\rulibc\deps\goblin)
error[E0432]: unresolved import `scroll::SizeWith`
--> deps\goblin\src\elf\compression_header.rs:86:29
|
86 | use scroll::{Pread, Pwrite, SizeWith};
| ^^^^^^^^ no `SizeWith` in the root
error[E0432]: unresolved import `scroll::SizeWith`
--> deps\goblin\src\elf\program_header.rs:346:29
|
346 | use scroll::{Pread, Pwrite, SizeWith};
| ^^^^^^^^ no `SizeWith` in the root
error[E0432]: unresolved import `scroll::SizeWith`
--> deps\goblin\src\elf\sym.rs:268:29
|
268 | use scroll::{Pread, Pwrite, SizeWith};
| ^^^^^^^^ no `SizeWith` in the root
error[E0432]: unresolved imports `scroll::IOread`, `scroll::IOwrite`, `scroll::SizeWith`
--> deps\goblin\src\elf\note.rs:6:14
|
6 | use scroll::{IOread, IOwrite, Pread, Pwrite, SizeWith};
| ^^^^^^ ^^^^^^^ ^^^^^^^^ no `SizeWith` in the root
| | |
| | no `IOwrite` in the root
| no `IOread` in the root
|
help: a similar name exists in the module
|
6 | use scroll::{pread, IOwrite, Pread, Pwrite, SizeWith};
| ^^^^^
help: a similar name exists in the module
|
6 | use scroll::{IOread, pwrite, Pread, Pwrite, SizeWith};
| ^^^^^^
error[E0432]: unresolved import `scroll::SizeWith`
--> deps\goblin\src\elf\reloc.rs:74:37
|
74 | use scroll::{Pread, Pwrite, SizeWith};
| ^^^^^^^^ no `SizeWith` in the root
...
225 | elf_reloc!(u32, i32);
| --------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0432]: unresolved import `scroll::SizeWith`
--> deps\goblin\src\elf\reloc.rs:74:37
|
74 | use scroll::{Pread, Pwrite, SizeWith};
| ^^^^^^^^ no `SizeWith` in the root
...
251 | elf_reloc!(u64, i64);
| --------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0432]: unresolved import `log`
--> deps\goblin\src\elf\dynamic.rs:451:17
|
451 | use log::warn;
| ^^^ use of undeclared crate or module `log`
error[E0433]: failed to resolve: could not find `Pread` in `scroll`
--> deps\goblin\src\elf\section_header.rs:10:28
|
10 | derive(scroll::Pread, scroll::Pwrite, scroll::SizeWith)
| ^^^^^ could not find `Pread` in `scroll`
...
350 | elf_section_header!(u32);
| ------------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `Pwrite` in `scroll`
--> deps\goblin\src\elf\section_header.rs:10:43
|
10 | derive(scroll::Pread, scroll::Pwrite, scroll::SizeWith)
| ^^^^^^ could not find `Pwrite` in `scroll`
...
350 | elf_section_header!(u32);
| ------------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `SizeWith` in `scroll`
--> deps\goblin\src\elf\section_header.rs:10:59
|
10 | derive(scroll::Pread, scroll::Pwrite, scroll::SizeWith)
| ^^^^^^^^ could not find `SizeWith` in `scroll`
...
350 | elf_section_header!(u32);
| ------------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `Pread` in `scroll`
--> deps\goblin\src\elf\section_header.rs:10:28
|
10 | derive(scroll::Pread, scroll::Pwrite, scroll::SizeWith)
| ^^^^^ could not find `Pread` in `scroll`
...
361 | elf_section_header!(u64);
| ------------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `Pwrite` in `scroll`
--> deps\goblin\src\elf\section_header.rs:10:43
|
10 | derive(scroll::Pread, scroll::Pwrite, scroll::SizeWith)
| ^^^^^^ could not find `Pwrite` in `scroll`
...
361 | elf_section_header!(u64);
| ------------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `SizeWith` in `scroll`
--> deps\goblin\src\elf\section_header.rs:10:59
|
10 | derive(scroll::Pread, scroll::Pwrite, scroll::SizeWith)
| ^^^^^^^^ could not find `SizeWith` in `scroll`
...
361 | elf_section_header!(u64);
| ------------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `Pread` in `scroll`
--> deps\goblin\src\elf\dynamic.rs:10:28
|
10 | derive(scroll::Pread, scroll::Pwrite, scroll::SizeWith)
| ^^^^^ could not find `Pread` in `scroll`
...
779 | elf_dyn!(u32);
| -------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `Pwrite` in `scroll`
--> deps\goblin\src\elf\dynamic.rs:10:43
|
10 | derive(scroll::Pread, scroll::Pwrite, scroll::SizeWith)
| ^^^^^^ could not find `Pwrite` in `scroll`
...
779 | elf_dyn!(u32);
| -------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `SizeWith` in `scroll`
--> deps\goblin\src\elf\dynamic.rs:10:59
|
10 | derive(scroll::Pread, scroll::Pwrite, scroll::SizeWith)
| ^^^^^^^^ could not find `SizeWith` in `scroll`
...
779 | elf_dyn!(u32);
| -------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `Pread` in `scroll`
--> deps\goblin\src\elf\dynamic.rs:10:28
|
10 | derive(scroll::Pread, scroll::Pwrite, scroll::SizeWith)
| ^^^^^ could not find `Pread` in `scroll`
...
793 | elf_dyn!(u64);
| -------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `Pwrite` in `scroll`
--> deps\goblin\src\elf\dynamic.rs:10:43
|
10 | derive(scroll::Pread, scroll::Pwrite, scroll::SizeWith)
| ^^^^^^ could not find `Pwrite` in `scroll`
...
793 | elf_dyn!(u64);
| -------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `SizeWith` in `scroll`
--> deps\goblin\src\elf\dynamic.rs:10:59
|
10 | derive(scroll::Pread, scroll::Pwrite, scroll::SizeWith)
| ^^^^^^^^ could not find `SizeWith` in `scroll`
...
793 | elf_dyn!(u64);
| -------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot find derive macro `Pread` in this scope
--> deps\goblin\src\elf\compression_header.rs:93:47
|
93 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^
error: cannot find derive macro `Pwrite` in this scope
--> deps\goblin\src\elf\compression_header.rs:93:54
|
93 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^
error: cannot determine resolution for the derive macro `SizeWith`
--> deps\goblin\src\elf\compression_header.rs:93:62
|
93 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot find derive macro `Pread` in this scope
--> deps\goblin\src\elf\compression_header.rs:128:47
|
128 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^
error: cannot find derive macro `Pwrite` in this scope
--> deps\goblin\src\elf\compression_header.rs:128:54
|
128 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^
error: cannot determine resolution for the derive macro `SizeWith`
--> deps\goblin\src\elf\compression_header.rs:128:62
|
128 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot find derive macro `Pread` in this scope
--> deps\goblin\src\elf\program_header.rs:353:47
|
353 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^
error: cannot find derive macro `Pwrite` in this scope
--> deps\goblin\src\elf\program_header.rs:353:54
|
353 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^
error: cannot determine resolution for the derive macro `SizeWith`
--> deps\goblin\src\elf\program_header.rs:353:62
|
353 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot find derive macro `Pread` in this scope
--> deps\goblin\src\elf\program_header.rs:387:47
|
387 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^
error: cannot find derive macro `Pwrite` in this scope
--> deps\goblin\src\elf\program_header.rs:387:54
|
387 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^
error: cannot determine resolution for the derive macro `SizeWith`
--> deps\goblin\src\elf\program_header.rs:387:62
|
387 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot find derive macro `Pread` in this scope
--> deps\goblin\src\elf\sym.rs:275:47
|
275 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^
error: cannot find derive macro `Pwrite` in this scope
--> deps\goblin\src\elf\sym.rs:275:54
|
275 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^
error: cannot determine resolution for the derive macro `SizeWith`
--> deps\goblin\src\elf\sym.rs:275:62
|
275 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot find derive macro `Pread` in this scope
--> deps\goblin\src\elf\sym.rs:305:47
|
305 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^
error: cannot find derive macro `Pwrite` in this scope
--> deps\goblin\src\elf\sym.rs:305:54
|
305 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^
error: cannot determine resolution for the derive macro `SizeWith`
--> deps\goblin\src\elf\sym.rs:305:62
|
305 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot determine resolution for the macro `warn`
--> deps\goblin\src\elf\dynamic.rs:459:25
|
459 | warn!("Invalid DT_NEEDED {}", dynamic.d_val)
| ^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot find derive macro `Pread` in this scope
--> deps\goblin\src\elf\reloc.rs:77:51
|
77 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^
...
225 | elf_reloc!(u32, i32);
| --------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot find derive macro `Pwrite` in this scope
--> deps\goblin\src\elf\reloc.rs:77:58
|
77 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^
...
225 | elf_reloc!(u32, i32);
| --------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot determine resolution for the derive macro `SizeWith`
--> deps\goblin\src\elf\reloc.rs:77:66
|
77 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^^^
...
225 | elf_reloc!(u32, i32);
| --------------------- in this macro invocation
|
= note: import resolution is stuck, try simplifying macro imports
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot find derive macro `Pread` in this scope
--> deps\goblin\src\elf\reloc.rs:89:51
|
89 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^
...
225 | elf_reloc!(u32, i32);
| --------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot find derive macro `Pwrite` in this scope
--> deps\goblin\src\elf\reloc.rs:89:58
|
89 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^
...
225 | elf_reloc!(u32, i32);
| --------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot determine resolution for the derive macro `SizeWith`
--> deps\goblin\src\elf\reloc.rs:89:66
|
89 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^^^
...
225 | elf_reloc!(u32, i32);
| --------------------- in this macro invocation
|
= note: import resolution is stuck, try simplifying macro imports
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot find derive macro `Pread` in this scope
--> deps\goblin\src\elf\reloc.rs:77:51
|
77 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^
...
251 | elf_reloc!(u64, i64);
| --------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot find derive macro `Pwrite` in this scope
--> deps\goblin\src\elf\reloc.rs:77:58
|
77 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^
...
251 | elf_reloc!(u64, i64);
| --------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot determine resolution for the derive macro `SizeWith`
--> deps\goblin\src\elf\reloc.rs:77:66
|
77 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^^^
...
251 | elf_reloc!(u64, i64);
| --------------------- in this macro invocation
|
= note: import resolution is stuck, try simplifying macro imports
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot find derive macro `Pread` in this scope
--> deps\goblin\src\elf\reloc.rs:89:51
|
89 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^
...
251 | elf_reloc!(u64, i64);
| --------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot find derive macro `Pwrite` in this scope
--> deps\goblin\src\elf\reloc.rs:89:58
|
89 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^
...
251 | elf_reloc!(u64, i64);
| --------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot determine resolution for the derive macro `SizeWith`
--> deps\goblin\src\elf\reloc.rs:89:66
|
89 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, SizeWith))]
| ^^^^^^^^
...
251 | elf_reloc!(u64, i64);
| --------------------- in this macro invocation
|
= note: import resolution is stuck, try simplifying macro imports
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot find derive macro `Pread` in this scope
--> deps\goblin\src\elf\note.rs:58:43
|
58 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, IOread, IOwrite, SizeWith))]
| ^^^^^
error: cannot find derive macro `Pwrite` in this scope
--> deps\goblin\src\elf\note.rs:58:50
|
58 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, IOread, IOwrite, SizeWith))]
| ^^^^^^
error: cannot determine resolution for the derive macro `IOread`
--> deps\goblin\src\elf\note.rs:58:58
|
58 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, IOread, IOwrite, SizeWith))]
| ^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot determine resolution for the derive macro `IOwrite`
--> deps\goblin\src\elf\note.rs:58:66
|
58 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, IOread, IOwrite, SizeWith))]
| ^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot determine resolution for the derive macro `SizeWith`
--> deps\goblin\src\elf\note.rs:58:75
|
58 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, IOread, IOwrite, SizeWith))]
| ^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot find derive macro `Pread` in this scope
--> deps\goblin\src\elf\note.rs:72:43
|
72 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, IOread, IOwrite, SizeWith))]
| ^^^^^
error: cannot find derive macro `Pwrite` in this scope
--> deps\goblin\src\elf\note.rs:72:50
|
72 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, IOread, IOwrite, SizeWith))]
| ^^^^^^
error: cannot determine resolution for the derive macro `IOread`
--> deps\goblin\src\elf\note.rs:72:58
|
72 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, IOread, IOwrite, SizeWith))]
| ^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot determine resolution for the derive macro `IOwrite`
--> deps\goblin\src\elf\note.rs:72:66
|
72 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, IOread, IOwrite, SizeWith))]
| ^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot determine resolution for the derive macro `SizeWith`
--> deps\goblin\src\elf\note.rs:72:75
|
72 | #[cfg_attr(feature = "alloc_user", derive(Pread, Pwrite, IOread, IOwrite, SizeWith))]
| ^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
error: cannot find macro `debug` in this scope
--> deps\goblin\src\elf\note.rs:105:17
|
105 | debug!("NoteIterator - {:#x}", self.offset);
| ^^^^^
error: cannot find macro `debug` in this scope
--> deps\goblin\src\elf\note.rs:206:13
|
206 | debug!("{:?} - {:#x}", header, *offset);
| ^^^^^
error: cannot find macro `debug` in this scope
--> deps\goblin\src\elf\note.rs:211:13
|
211 | debug!("note name {} - {:#x}", name, *offset);
| ^^^^^
error: cannot find macro `debug` in this scope
--> deps\goblin\src\elf\note.rs:214:13
|
214 | debug!("desc {:?} - {:#x}", desc, *offset);
| ^^^^^
warning: unused imports: `Pread`, `Pwrite`
--> deps\goblin\src\elf\reloc.rs:74:22
|
74 | use scroll::{Pread, Pwrite, SizeWith};
| ^^^^^ ^^^^^^
...
225 | elf_reloc!(u32, i32);
| ---------------------
| |
| in this macro invocation
| in this macro invocation
|
= note: `#[warn(unused_imports)]` on by default
= note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
warning: unused imports: `Pread`, `Pwrite`
--> deps\goblin\src\elf\reloc.rs:74:22
|
74 | use scroll::{Pread, Pwrite, SizeWith};
| ^^^^^ ^^^^^^
...
251 | elf_reloc!(u64, i64);
| ---------------------
| |
| in this macro invocation
| in this macro invocation
|
= note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
warning: unused import: `Pwrite`
--> deps\goblin\src\elf\note.rs:6:38
|
6 | use scroll::{IOread, IOwrite, Pread, Pwrite, SizeWith};
| ^^^^^^
error[E0277]: the trait bound `compression_header32::CompressionHeader: TryFromCtx<'_, _>` is not satisfied
--> deps\goblin\src\elf\compression_header.rs:234:28
|
234 | (bytes.pread_with::<compression_header32::CompressionHeader>(0, le)?.into(), compression_header32::SIZEOF_CHDR)
| ^^^^^^^^^^ the trait `TryFromCtx<'_, _>` is not implemented for `compression_header32::CompressionHeader`
error[E0277]: the trait bound `compression_header64::CompressionHeader: TryFromCtx<'_, _>` is not satisfied
--> deps\goblin\src\elf\compression_header.rs:237:28
|
237 | (bytes.pread_with::<compression_header64::CompressionHeader>(0, le)?.into(), compression_header64::SIZEOF_CHDR)
| ^^^^^^^^^^ the trait `TryFromCtx<'_, _>` is not implemented for `compression_header64::CompressionHeader`
error[E0277]: the trait bound `compression_header32::CompressionHeader: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\compression_header.rs:251:30
|
251 | Ok(bytes.pwrite_with(chdr, 0, le)?)
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `compression_header32::CompressionHeader`
error[E0277]: the trait bound `compression_header64::CompressionHeader: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\compression_header.rs:255:30
|
255 | Ok(bytes.pwrite_with(chdr, 0, le)?)
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `compression_header64::CompressionHeader`
error[E0277]: the trait bound `compression_header32::CompressionHeader: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\compression_header.rs:266:27
|
266 | bytes.pwrite_with(chdr, 0, le).unwrap();
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `compression_header32::CompressionHeader`
error[E0277]: the trait bound `compression_header64::CompressionHeader: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\compression_header.rs:270:27
|
270 | bytes.pwrite_with(chdr, 0, le).unwrap();
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `compression_header64::CompressionHeader`
error[E0277]: the trait bound `program_header32::ProgramHeader: TryFromCtx<'_, _>` is not satisfied
--> deps\goblin\src\elf\program_header.rs:206:28
|
206 | (bytes.pread_with::<program_header32::ProgramHeader>(0, le)?.into(), program_header32::SIZEOF_PHDR)
| ^^^^^^^^^^ the trait `TryFromCtx<'_, _>` is not implemented for `program_header32::ProgramHeader`
error[E0277]: the trait bound `program_header64::ProgramHeader: TryFromCtx<'_, _>` is not satisfied
--> deps\goblin\src\elf\program_header.rs:209:28
|
209 | (bytes.pread_with::<program_header64::ProgramHeader>(0, le)?.into(), program_header64::SIZEOF_PHDR)
| ^^^^^^^^^^ the trait `TryFromCtx<'_, _>` is not implemented for `program_header64::ProgramHeader`
error[E0277]: the trait bound `program_header32::ProgramHeader: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\program_header.rs:223:30
|
223 | Ok(bytes.pwrite_with(phdr, 0, le)?)
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `program_header32::ProgramHeader`
error[E0277]: the trait bound `program_header64::ProgramHeader: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\program_header.rs:227:30
|
227 | Ok(bytes.pwrite_with(phdr, 0, le)?)
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `program_header64::ProgramHeader`
error[E0277]: the trait bound `program_header32::ProgramHeader: TryFromCtx<'_, _>` is not satisfied
--> deps\goblin\src\elf\program_header.rs:313:23
|
313 | bytes.gread_inout_with(offset, &mut program_headers, ctx)?;
| ^^^^^^^^^^^^^^^^ the trait `TryFromCtx<'_, _>` is not implemented for `program_header32::ProgramHeader`
...
379 | elf_program_header_std_impl!(u32);
| ---------------------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `program_header64::ProgramHeader: TryFromCtx<'_, _>` is not satisfied
--> deps\goblin\src\elf\program_header.rs:313:23
|
313 | bytes.gread_inout_with(offset, &mut program_headers, ctx)?;
| ^^^^^^^^^^^^^^^^ the trait `TryFromCtx<'_, _>` is not implemented for `program_header64::ProgramHeader`
...
413 | elf_program_header_std_impl!(u64);
| ---------------------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `section_header32::SectionHeader: TryFromCtx<'_, _>` is not satisfied
--> deps\goblin\src\elf\section_header.rs:528:28
|
528 | (bytes.pread_with::<section_header32::SectionHeader>(0, le)?.into(), section_header32::SIZEOF_SHDR)
| ^^^^^^^^^^ the trait `TryFromCtx<'_, _>` is not implemented for `section_header32::SectionHeader`
error[E0277]: the trait bound `section_header64::SectionHeader: TryFromCtx<'_, _>` is not satisfied
--> deps\goblin\src\elf\section_header.rs:531:28
|
531 | (bytes.pread_with::<section_header64::SectionHeader>(0, le)?.into(), section_header64::SIZEOF_SHDR)
| ^^^^^^^^^^ the trait `TryFromCtx<'_, _>` is not implemented for `section_header64::SectionHeader`
error[E0277]: the trait bound `section_header32::SectionHeader: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\section_header.rs:545:30
|
545 | Ok(bytes.pwrite_with(shdr, 0, le)?)
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `section_header32::SectionHeader`
error[E0277]: the trait bound `section_header64::SectionHeader: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\section_header.rs:549:30
|
549 | Ok(bytes.pwrite_with(shdr, 0, le)?)
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `section_header64::SectionHeader`
error[E0277]: the trait bound `section_header32::SectionHeader: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\section_header.rs:560:27
|
560 | bytes.pwrite_with(shdr, 0, le).unwrap();
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `section_header32::SectionHeader`
error[E0277]: the trait bound `section_header64::SectionHeader: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\section_header.rs:564:27
|
564 | bytes.pwrite_with(shdr, 0, le).unwrap();
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `section_header64::SectionHeader`
error[E0277]: the trait bound `sym32::Sym: TryFromCtx<'_, _>` is not satisfied
--> deps\goblin\src\elf\sym.rs:444:28
|
444 | (bytes.pread_with::<sym32::Sym>(0, le)?.into(), sym32::SIZEOF_SYM)
| ^^^^^^^^^^ the trait `TryFromCtx<'_, _>` is not implemented for `sym32::Sym`
error[E0277]: the trait bound `sym64::Sym: TryFromCtx<'_, _>` is not satisfied
--> deps\goblin\src\elf\sym.rs:447:28
|
447 | (bytes.pread_with::<sym64::Sym>(0, le)?.into(), sym64::SIZEOF_SYM)
| ^^^^^^^^^^ the trait `TryFromCtx<'_, _>` is not implemented for `sym64::Sym`
error[E0277]: the trait bound `sym32::Sym: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\sym.rs:461:30
|
461 | Ok(bytes.pwrite_with(sym, 0, le)?)
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `sym32::Sym`
error[E0277]: the trait bound `sym64::Sym: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\sym.rs:465:30
|
465 | Ok(bytes.pwrite_with(sym, 0, le)?)
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `sym64::Sym`
error[E0277]: the trait bound `sym32::Sym: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\sym.rs:477:27
|
477 | bytes.pwrite_with(sym, 0, le).unwrap();
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `sym32::Sym`
error[E0277]: the trait bound `sym64::Sym: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\sym.rs:481:27
|
481 | bytes.pwrite_with(sym, 0, le).unwrap();
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `sym64::Sym`
error[E0277]: the trait bound `dyn32::Dyn: TryFromCtx<'_, _>` is not satisfied
--> deps\goblin\src\elf\dynamic.rs:375:28
|
375 | (bytes.pread_with::<dyn32::Dyn>(0, le)?.into(), dyn32::SIZEOF_DYN)
| ^^^^^^^^^^ the trait `TryFromCtx<'_, _>` is not implemented for `dyn32::Dyn`
error[E0277]: the trait bound `dyn64::Dyn: TryFromCtx<'_, _>` is not satisfied
--> deps\goblin\src\elf\dynamic.rs:378:28
|
378 | (bytes.pread_with::<dyn64::Dyn>(0, le)?.into(), dyn64::SIZEOF_DYN)
| ^^^^^^^^^^ the trait `TryFromCtx<'_, _>` is not implemented for `dyn64::Dyn`
error[E0277]: the trait bound `dyn32::Dyn: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\dynamic.rs:392:30
|
392 | Ok(bytes.pwrite_with(dynamic, 0, le)?)
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `dyn32::Dyn`
error[E0277]: the trait bound `dyn64::Dyn: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\dynamic.rs:396:30
|
396 | Ok(bytes.pwrite_with(dynamic, 0, le)?)
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `dyn64::Dyn`
error[E0277]: the trait bound `reloc32::Rela: TryFromCtx<'_, _>` is not satisfied
--> deps\goblin\src\elf\reloc.rs:328:32
|
328 | (bytes.pread_with::<reloc32::Rela>(0, le)?.into(), reloc32::SIZEOF_RELA)
| ^^^^^^^^^^ the trait `TryFromCtx<'_, _>` is not implemented for `reloc32::Rela`
error[E0277]: the trait bound `reloc32::Rel: TryFromCtx<'_, _>` is not satisfied
--> deps\goblin\src\elf\reloc.rs:330:32
|
330 | (bytes.pread_with::<reloc32::Rel>(0, le)?.into(), reloc32::SIZEOF_REL)
| ^^^^^^^^^^ the trait `TryFromCtx<'_, _>` is not implemented for `reloc32::Rel`
error[E0277]: the trait bound `reloc64::Rela: TryFromCtx<'_, _>` is not satisfied
--> deps\goblin\src\elf\reloc.rs:335:32
|
335 | (bytes.pread_with::<reloc64::Rela>(0, le)?.into(), reloc64::SIZEOF_RELA)
| ^^^^^^^^^^ the trait `TryFromCtx<'_, _>` is not implemented for `reloc64::Rela`
error[E0277]: the trait bound `reloc64::Rel: TryFromCtx<'_, _>` is not satisfied
--> deps\goblin\src\elf\reloc.rs:337:32
|
337 | (bytes.pread_with::<reloc64::Rel>(0, le)?.into(), reloc64::SIZEOF_REL)
| ^^^^^^^^^^ the trait `TryFromCtx<'_, _>` is not implemented for `reloc64::Rel`
error[E0277]: the trait bound `reloc32::Rela: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\reloc.rs:354:34
|
354 | Ok(bytes.pwrite_with(rela, 0, le)?)
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `reloc32::Rela`
error[E0277]: the trait bound `reloc32::Rel: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\reloc.rs:357:34
|
357 | Ok(bytes.pwrite_with(rel, 0, le)?)
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `reloc32::Rel`
error[E0277]: the trait bound `reloc64::Rela: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\reloc.rs:363:34
|
363 | Ok(bytes.pwrite_with(rela, 0, le)?)
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `reloc64::Rela`
error[E0277]: the trait bound `reloc64::Rel: TryIntoCtx<_>` is not satisfied
--> deps\goblin\src\elf\reloc.rs:366:34
|
366 | Ok(bytes.pwrite_with(rel, 0, le)?)
| ^^^^^^^^^^^ the trait `TryIntoCtx<_>` is not implemented for `reloc64::Rel`
error[E0277]: the trait bound `Nhdr32: TryFromCtx<'_, _>` is not satisfied
--> deps\goblin\src\elf\note.rs:202:34
|
202 | 4|8 => bytes.gread_with::<Nhdr32>(offset, ctx.le)?.into(),
| ^^^^^^^^^^ the trait `TryFromCtx<'_, _>` is not implemented for `Nhdr32`
warning: unused import: `Pread`
--> deps\goblin\src\elf\compression_header.rs:86:14
|
86 | use scroll::{Pread, Pwrite, SizeWith};
| ^^^^^
warning: unused import: `Pwrite`
--> deps\goblin\src\elf\compression_header.rs:86:21
|
86 | use scroll::{Pread, Pwrite, SizeWith};
| ^^^^^^
warning: unused import: `Pread`
--> deps\goblin\src\elf\program_header.rs:346:14
|
346 | use scroll::{Pread, Pwrite, SizeWith};
| ^^^^^
warning: unused import: `Pwrite`
--> deps\goblin\src\elf\program_header.rs:346:21
|
346 | use scroll::{Pread, Pwrite, SizeWith};
| ^^^^^^
error: aborting due to 101 previous errors; 7 warnings emitted
Some errors have detailed explanations: E0277, E0432, E0433.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `goblin`
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed