-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some if cfg!(unix)
mis-usages
#708
Comments
* Fixes #709. * Fixes #708. This adds an MVP of a `cargo` wrapper for `c2rust-analyze` so that it can be run on a whole crate like `cargo`. This copies the approach from `c2rust-instrument`, with some minor adjustments: * We don't care about the instrumentation and metadata `c2rust-instrument` need, so that code is gone. * We still allow `c2rust-analyze` to be called as a `rustc_wrapper` directly. More specifically, the `cargo` wrapper is supposed to set `RUST_SYSROOT`. `c2rust-instrument` requires this, while `c2rust-analyze` will re-calculate it if it wasn't. This allows us to keep using the `rustc` wrapper in tests, as the tests are all set up as single files meant to be compiled with `rustc` directly. We can change this, but that'll come later. The exception is the `lighttpd_minimal` and `with_pdg_file` tests, as those run on full crates. I converted `lighttpd_minimal` to use the `cargo` wrapper as a proof of concept to show it works. I tried to do the same for `with_pdg_file`, but it updated some of the hashes or something so now the PDG binary has out-of-date `DefPathHash`es, and I'm not sure how to regenerate a new one.
Thanks for fixing this particular Windows error, I understand that there are (probably) several further Windows 11 errors to be fixed at some time. error[E0599]: no function or associated item named I noted that it was trying to install this: stable-x86_64-pc-windows-msvc unchanged - rustc 1.73.0 (cc66ad468 2023-10-03) info: cleaning up downloads & tmp directories I assume that this means that I should wait for the next official update of Rust, since this change wouldn't be merged into the current build? Thanks again for all of your efforts. |
Hi! It doesn't have anything to do with the version of rust itself, but you'd have to wait for the next release of |
Thanks, I really appreciate this.
I followed your instructions re: cargo install and progressed further but got this error:
Compiling clap_derive v3.2.25
error: failed to run custom build command for `c2rust-ast-exporter v0.18.0 (C:\Users\murra\.cargo\git\checkouts\c2rust-2a3ef4c32beab81a\431847a\c2rust-ast-exporter)`
Caused by:
process didn't exit successfully: `C:\Users\murra\AppData\Local\Temp\cargo-install0BdKSm\release\build\c2rust-ast-exporter-65bc7a58e81af1f8\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at c2rust-build-paths\src\lib.rs:88:44:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }
It appears that a file is missing??
Thanks for you help!!
Murray
…________________________________
From: Khyber Sen ***@***.***>
Sent: Friday, November 3, 2023 1:54 PM
To: immunant/c2rust ***@***.***>
Cc: MurraySobol ***@***.***>; Comment ***@***.***>
Subject: Re: [immunant/c2rust] Fix some `if cfg!(unix)` mis-usages (Issue #708)
Hi! It doesn't have anything to do with the version of rust itself, but you'd have to wait for the next release of c2rust to be able to cargo install c2rust the newest version. But you can cargo install --git https://github.com/immunant/c2rust/ and it'll build the latest master version, which includes the above fix.
—
Reply to this email directly, view it on GitHub<#708 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJWUNKY6IC7QI5XVH3HPYA3YCUVU5AVCNFSM6AAAAAARIOUFAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJSHA4DQMRWGA>.
You are receiving this because you commented.Message ID: ***@***.***>
|
See #519 (comment) by @SimonIT.
I used
if cfg!(unix)
wrong (instead of#[cfg(unix)]
), so some simple snippets don't compile on non-unix platforms anymore.This is in
c2rust-build-paths/src/lib.rs
anddynamic_instrumentation/src/main.rs
.The text was updated successfully, but these errors were encountered: