Skip to content
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

Malformed cfg value or key/value pair with cargo-prusti #55

Closed
fpoli opened this issue Jun 12, 2020 · 2 comments · Fixed by #57
Closed

Malformed cfg value or key/value pair with cargo-prusti #55

fpoli opened this issue Jun 12, 2020 · 2 comments · Fixed by #57
Assignees
Labels
bug Something isn't working

Comments

@fpoli
Copy link
Member

fpoli commented Jun 12, 2020

After PR #48, cargo-prusti fails with "error: malformed cfg value or key/value pair: lib___.rlib".

That PR runs the compiler twice, to collect type system information that are not available in the parse phase of the second run. The preliminar run probably has some side effects (stdout messages? file system changes?) that break cargo.

The error is not catched by the CI tests because they don't yet run cargo-prusti (see also: #3).

@fpoli fpoli added the bug Something isn't working label Jun 12, 2020
@fpoli
Copy link
Member Author

fpoli commented Jun 15, 2020

The error is raised when trying to compile crates libc, bitflags, log, ...

@fpoli fpoli self-assigned this Jun 15, 2020
@fpoli
Copy link
Member Author

fpoli commented Jun 15, 2020

It turns out that cargo executes

rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg

to print some information of the compiled crate. Prusti prints the same output twice, due to the double call to the compiler, and this breaks cargo's parsing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant