Skip to content

Conversation

jayantk
Copy link
Contributor

@jayantk jayantk commented Aug 19, 2022

the cargo build (and ./scripts/build-bpf.sh) used were failing because we were defining these integer types multiple times. It turns out that we already have a solution to this problem in compat_stdint.h which selects between the system stdint.h and the definitions in the solana sdk.

Note that the repo still expects to be placed adjacent to a solana directory. I'll fix that next.

@@ -9,6 +9,7 @@ fn main() {

//generate and write bindings
let bindings = Builder::default()
.clang_arg("-I../../../solana/sdk/bpf/c/inc/")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

required to make bindgen find the solana header files.

hardcoding this path is obviously bizarre. however, the C makefile already does this, so I'm not making the situation any worse.

Copy link
Contributor

@guibescos guibescos left a comment

Choose a reason for hiding this comment

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

I'm not sure I get the changes to build.rs but seems minimal and it seems like you're gonna change it soon anyway.

@jayantk jayantk merged commit ca645b7 into main Aug 19, 2022
@jayantk jayantk deleted the better_build branch August 19, 2022 23:21
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