Build failure when specifying elf32 feature without elf64
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.5k
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
Disable default-features and specify only `elf32`:
```toml
[dependencies]
goblin = { version = "0.2", default-features = false, features = ["std", "elf32"] }
```
Build fails:
```
Compiling goblin v0.2.0
error[E0432]: unresolved import `crate::elf64`
--> /Users/parasyte/.cargo/registry/src/github.com-1ecc6299db9ec823/goblin-0.2.0/src/elf/header.rs:207:17
|
207 | use crate::elf64;
| ^^^^^^^^^^^^ no `elf64` in the root
error[E0433]: failed to resolve: maybe a missing crate `elf64`?
--> /Users/parasyte/.cargo/registry/src/github.com-1ecc6299db9ec823/goblin-0.2.0/src/elf/dynamic.rs:704:35
|
704 | elf_dyn_std_impl!(u64, crate::elf64::program_header::ProgramHeader);
| ^^^^^ maybe a missing crate `elf64`?
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `goblin`.
```
Looking at the code, specifying the opposite (`elf64` without `elf32`) will also fail for similar reasons.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the shown Cargo.toml feature configuration, then inspect src/elf/header.rs and src/elf/dynamic.rs, the files named in the compiler errors. Verify the fix by building with only elf32 and only elf64 enabled; done means both configurations compile without unresolved elf module references.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100