Comments (1)
Hi @SheldonHH
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
from c2rust.
Related Issues (20)
- rust-toolchain.toml is too old for 1.75 rust HOT 4
- cargo install c2rust failed: Could not find a configuration file for package "LLVM" that exactly matches requested version "16.0.6". HOT 2
- Build not matching clang version (Fedora 39, Clang 17.0.6) HOT 3
- cargo install c2rust failed: Error 2 HOT 2
- In the while loop body using a volatile variable, the generated code will lack a semicolon.
- why do you not support windows HOT 1
- Build fails with LLVM 18 and tip-of-tree HOT 1
- fail build on archlinux HOT 2
- Casting bool to pointer type results in invalid Rust HOT 1
- Fatal error: 'stddef.h' file not found HOT 4
- ast_exporter can't convert a c code to ast HOT 2
- (Question) Do you plan to support C++ ? HOT 1
- Missing parentheses on reference applied to a cast
- Translate glsl
- analyze: proposal for simplified analysis and rewriting of allocations HOT 6
- Fails to compile on latest nightly HOT 3
- Git build failure on Ubuntu 24.04 HOT 4
- analyze: tracking issue for simple_buffer HOT 2
- analyze: Lifetimes are incorrectly added to public extern C functions HOT 2
- Failed to build c2rust from source code in docker HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from c2rust.