You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing difficulties in building the bzip2 project, which I have converted from C to Rust using C2Rust. The original bzip2 project is hosted on GitLab, and my converted version is on GitHub.
I am unable to build the converted project, hindering any further testing or development. Below are the details:
Thanks for your report, it would have been helpful if you'd directly included the build errors. This is what I see:
error[E0557]: feature has been removed
--> c2rust-lib.rs:8:12
|
8 | #![feature(const_raw_ptr_to_usize_cast)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ feature has been removed
|
= note: at compile-time, pointers do not have an integer value, so these casts cannot be properly supported
error[E0557]: feature has been removed
--> c2rust-lib.rs:12:12
|
12 | #![feature(main)]
| ^^^^ feature has been removed
error: cannot find attribute `main` in this scope
--> bzip2.rs:3164:3
|
3164 | #[main]
| ^^^^
|
= note: `main` is in scope, but it is a function, not an attribute
error: cannot find attribute `main` in this scope
--> bzip2recover.rs:590:3
|
590 | #[main]
| ^^^^
|
= note: `main` is in scope, but it is a function, not an attribute
It seems that C2Rust relies on features that are no longer in the latest nightlies. As a workaround, you can build with a much older nightly until you've patched the transpiled code to remove uses of the deprecated features. This works for me:
cargo +nightly-2020-03-21 build
thedataking
changed the title
Build Failure in bzip2 Project Post C2Rust Conversion and How to build/organize project-scale C project?
C2Rust transpiler emits features removed in recent nightlies
Jan 4, 2024
I'm experiencing difficulties in building the bzip2 project, which I have converted from C to Rust using C2Rust. The original bzip2 project is hosted on GitLab, and my converted version is on GitHub.
I am unable to build the converted project, hindering any further testing or development. Below are the details:
Build Issues:
Questions:
I would appreciate any guidance or suggestions to resolve these build issues. Thank you for your assistance.
The text was updated successfully, but these errors were encountered: