-
Notifications
You must be signed in to change notification settings - Fork 668
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: buids on various archs/platforms #4331
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error when running cargo check
➜ stacks-core git:(fix/c-deps) cargo check
Checking wsts v7.0.0
error: expected identifier, found `32`
--> /Users/hankstoever/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wsts-7.0.0/src/net.rs:307:39
|
307 | 33 => Some(self.message[::32]),
| ^^ expected identifier
error: functions are not allowed in struct definitions
--> /Users/hankstoever/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wsts-7.0.0/src/net.rs:304:5
|
288 | pub struct SignatureShareRequest {
| --------------------- while parsing this struct
...
304 | / fn hash_bytes(&self) -> Result<Hash, Error> {
305 | | match self.message.len() {
306 | | 32 => Some(self.message),
307 | | 33 => Some(self.message[::32]),
308 | | _ => None,
309 | | }
310 | | }
| |_____^
|
= help: unlike in C++, Java, and C#, functions are declared in `impl` blocks
= help: see https://doc.rust-lang.org/book/ch05-03-method-syntax.html for more information
error: expected identifier
--> /Users/hankstoever/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wsts-7.0.0/src/net.rs:304:5
|
304 | fn hash_bytes(&self) -> Result<Hash, Error> {
| ^^
error[E0277]: the trait bound `SignatureShareRequest: Serialize` is not satisfied
--> /Users/hankstoever/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wsts-7.0.0/src/net.rs:55:17
|
55 | #[derive(Clone, Serialize, Deserialize, Debug, PartialEq)]
| ^^^^^^^^^ the trait `Serialize` is not implemented for `SignatureShareRequest`
...
75 | SignatureShareRequest(SignatureShareRequest),
| --------------------- required by a bound introduced by this call
|
= help: the following other types implement trait `Serialize`:
bool
char
isize
i8
i16
i32
i64
i128
and 158 others
note: required by a bound in `serialize_newtype_variant`
--> /Users/hankstoever/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.156/src/ser/mod.rs:942:12
|
934 | fn serialize_newtype_variant<T: ?Sized>(
| ------------------------- required by a bound in this associated function
...
942 | T: Serialize;
| ^^^^^^^^^ required by this bound in `Serializer::serialize_newtype_variant`
error[E0277]: the trait bound `SignatureShareRequest: Deserialize<'_>` is not satisfied
--> /Users/hankstoever/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wsts-7.0.0/src/net.rs:75:27
|
75 | SignatureShareRequest(SignatureShareRequest),
| ^^^^^^^^^^^^^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `SignatureShareRequest`
|
= help: the following other types implement trait `Deserialize<'de>`:
bool
char
isize
i8
i16
i32
i64
i128
and 170 others
note: required by a bound in `newtype_variant`
--> /Users/hankstoever/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.156/src/de/mod.rs:2122:12
|
2120 | fn newtype_variant<T>(self) -> Result<T, Self::Error>
| --------------- required by a bound in this associated function
2121 | where
2122 | T: Deserialize<'de>,
| ^^^^^^^^^^^^^^^^ required by this bound in `VariantAccess::newtype_variant`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `wsts` (lib) due to 5 previous errors
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #4331 +/- ##
==========================================
- Coverage 83.35% 76.88% -6.48%
==========================================
Files 446 446
Lines 318774 318774
==========================================
- Hits 265706 245080 -20626
- Misses 53068 73694 +20626 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! matches what i found for next
i think this might be localized issue - running on a glibc-x64 system, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to keep wsts
and p256k1
using bindgen
if it's supported by the target OS, but disable it if not. bindgen
is used to create Rust FFI bindings for the host's libc
, which can differ from OS to OS.
@jcnelson that suggests that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed the error I mentioned in this PR, it was in fact a local issue :)
@jcnelson I'm not going to be able to get the change you requested working in this PR (doesn't seem reasonable IMO). If that's a blocker then we should close this PR. |
removing my review for now so this isn't inadvertently merged until we can resolve @jcnelson comment |
Also tested that the published Docker images have a working
👍🏼 |
@jcnelson it looks like the binaries work without your suggested change. Are you sure this isn't okay as-is? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shipit
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
fix building & cross compilation, including
stacks-signer
, tested building for the following:ty @wileyj and @hugocaillard