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

Fix CI #641

Merged
merged 7 commits into from
Aug 10, 2023
Merged

Fix CI #641

merged 7 commits into from
Aug 10, 2023

Conversation

tcharding
Copy link
Member

@tcharding tcharding commented Aug 8, 2023

CI has a bunch of things broken.

This is #640 followed by #639 followed by a few addition fixes to get CI green again. Includes clippy warnings in feature gated code which is not strictly necessary and a fix to a panic message, also not strictly necessary.

@tcharding
Copy link
Member Author

I can't repro the ASAN memory sanitizer failure and have no clue what is causing it.

@apoelstra
Copy link
Member

The ASAN thing is extremely weird. "Undefined reference to memmove" inside libcore itself. Let's wait a few days for a new nightly and see if it goes away.

@tcharding
Copy link
Member Author

tcharding commented Aug 8, 2023

After writing rust-bitcoin/rust-bitcoin#1981 there is a lot to do and we need this in to get cracking.

Kick CI, no changes.

@apoelstra
Copy link
Member

When I try to run this test locally I get the error error: the feature lang_items is internal to the compiler or standard library. AFAICT this error showed up months ago, so I don't know why it's not happening in CI (even though CI is using the same nightly compiler as me). If we remove feature(lang_items) from the nostd test (I don't know why it's even there) then things work.

@tcharding
Copy link
Member Author

tcharding commented Aug 8, 2023

Strange you get the error still, it is allowed now (in a1005a6) I looked it up but didn't quite understand what it was for. I'll remove it.

@tcharding
Copy link
Member Author

Removed, no other changes.

@apoelstra
Copy link
Member

Ok I can reproduce locally now :)

@apoelstra
Copy link
Member

Strange you get the error still, it is allowed now (in a1005a6) I looked it up but didn't quite understand what it was for. I'll remove it.

I don't know what that commit is from. I don't have it locally.

@apoelstra
Copy link
Member

This is extremely weird. In my mastert/ directory things pass while in my pr-review/ directory they don't. Even running the exact same commit in both, even running cargo clean in both, even moving boths' target/ directories out of the way.

@apoelstra
Copy link
Member

Ok, it's a problem in the cc crate that appeared between 1.79 (six months old) and 1.80 (first of several releases from the last week).

@apoelstra
Copy link
Member

The old cc would provide -lc -lm -lrt -lpthread flags which the new one does not. I think -lc is the important one.

@apoelstra
Copy link
Member

rust-lang/cc-rs#780 is the offending PR, though I haven't looked into how yet.

@apoelstra
Copy link
Member

@tcharding let's just pin cc in CI to 1.0.79 for now.

Pinning is broken again, update the pins it CI so that the following
sequence of commands would work

```bash
rm Cargo.lock
cargo +1.48 update -p wasm-bindgen-test --precise 0.3.34
cargo +1.48 update -p serde_test --precise 1.0.175
cargo +1.48 test --all-features
```

Note, solely out of interest, `cargo +1.48 build` does not need
pinning (at the moment :)
`cargo +nightly` output of panic recently changed breaking our grep
statement by adding the code line and a newline.

Grep for the exact second line of the error message.
Remove the `internal_features` attribute, not sure what it was supposed
to be doing but the crate works without it.
We have an unconditional panic for some combination of features, this
causes clippy to give a bunch of useless warnings.

Add allow attributes to quieten down clippy.
Currently the panic message refers to stuff related to development of
the library, this is meaningless for users of the lib. Target panic
message at secp users instead.
In preparation for using `pushd`/`popd` use `bash` to run the CI script
instead of `sh`.
Looks like a recent version of `cc` breaks our ASAN job. Pin to the
previous version.
@tcharding
Copy link
Member Author

Took me a while, but oh yeah it works!

@apoelstra
Copy link
Member

apoelstra commented Aug 10, 2023

Ok, testing locally, thanks so much!

BTW I think the lang_items stuff was obsoleted by #205. I also think the doccomment in no_std which talks about eh_personality is also out of date since that PR. But we can fix it in a followup. Basically, what happened was:

  1. We originally were redefining internal std stuff as a way to trigger errors in the case that we accidentally pulled std into a nostd build.
  2. The compiler took away the internal std stuff or otherwise somehow broke this, so elichai removed the redefinitions but didn't update the comment explaining what we were doing. He also didn't remove feature(lang_items) which became unnecessary.
  3. The compiler later made feature(lang_items) deny-by-default to warn us about the kind of breakage in point (2).

It would be nice to test somehow the "we aren't pulling in std", but I think this is a weird enough failure mode that we shouldn't bend over backward to do it.

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 92778ef

@apoelstra apoelstra merged commit 090f073 into rust-bitcoin:master Aug 10, 2023
24 checks passed
@tcharding tcharding deleted the 08-08-ci branch August 10, 2023 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants