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

grin: switch to llvm@15 #130508

Merged
merged 2 commits into from
May 9, 2023
Merged

grin: switch to llvm@15 #130508

merged 2 commits into from
May 9, 2023

Conversation

ZhongRuoyu
Copy link
Member

@ZhongRuoyu ZhongRuoyu commented May 9, 2023

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

A follow-up to #128865. The error '"enum_(unnamed_at_CRoaring/ roaring_h_7_1)" is not a valid Ident' was from croaring, caused by rust-lang/rust-bindgen#2312. We could fix this by switching to llvm@15.

In addition, add lmdb as a dependency to avoid vendoring. (Update: see #130508 (comment).) croaring is being vendored too, but the crate croaring-sys only supports building its own copy (see 1). Given that it's lightweight (with a single C source file), I think we can leave it as-is for now.

Footnotes

  1. https://github.com/saulius/croaring-rs/blob/0.8.1/croaring-sys/build.rs

@ZhongRuoyu ZhongRuoyu mentioned this pull request May 9, 2023
1 task
@github-actions github-actions bot added the rust Rust use is a significant feature of the PR or issue label May 9, 2023
Formula/grin.rb Outdated Show resolved Hide resolved
@ZhongRuoyu ZhongRuoyu force-pushed the grin-fix branch 3 times, most recently from 5dac766 to 80cda75 Compare May 9, 2023 04:29
p-linnane
p-linnane previously approved these changes May 9, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

🤖 An automated task has requested bottles to be published to this PR.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label May 9, 2023
github-actions[bot]
github-actions bot previously approved these changes May 9, 2023
@BrewTestBot BrewTestBot enabled auto-merge May 9, 2023 05:10
@BrewTestBot BrewTestBot added this pull request to the merge queue May 9, 2023
@ZhongRuoyu ZhongRuoyu removed this pull request from the merge queue due to a manual request May 9, 2023
@ZhongRuoyu
Copy link
Member Author

ZhongRuoyu commented May 9, 2023

Sorry, still no linkage with lmdb. The lmdb-sys crate uses pkg-config to find liblmdb, but our lmdb does not come with any pkg-config file. I'll delete the published bottles. (Update: deleted.)

@carlocab
Copy link
Member

carlocab commented May 9, 2023

Can we mock a pc file and write it to buildpath/"pkgconfig/lmdb.pc" or something like that?

Though, TBH, I don't mind just adding one to lmdb. This should technically be fixed in lmdb-sys, but this is a bit of a losing battle this other distros ship one for themselves.

@ZhongRuoyu
Copy link
Member Author

Yea, I'm currently working to add a lmdb.pc file to our lmdb. Debian does this too: https://salsa.debian.org/debian/lmdb/-/blob/debian/0.9.24-1/debian/lmdb.pc.in?ref_type=tags

@ZhongRuoyu ZhongRuoyu mentioned this pull request May 9, 2023
6 tasks
@carlocab carlocab removed the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label May 9, 2023
@carlocab carlocab dismissed stale reviews from github-actions[bot] and p-linnane May 9, 2023 05:56

no lmdb linkage

ZhongRuoyu added a commit to ZhongRuoyu/homebrew-core that referenced this pull request May 9, 2023
Needed for Homebrew#130508.

Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

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

Needs rebase

@ZhongRuoyu
Copy link
Member Author

I tried building this locally with the new lmdb bottle, but there was still no linkage. Weird. 🤔

@ZhongRuoyu
Copy link
Member Author

ZhongRuoyu commented May 9, 2023

Ah. There are two crates: lmdb-sys and liblmdb-sys. I was looking at the former but grin is actually using the latter 🙃

https://github.com/mimblewimble/grin/blob/v5.1.2/Cargo.lock#L1467

And unfortunately, liblmdb-sys cannot link with system lmdb at all.

https://github.com/vhbit/lmdb-rs/blob/master/liblmdb-sys/build.rs

A follow-up to Homebrew#128865. The error '"enum_(unnamed_at_CRoaring/
roaring_h_7_1)" is not a valid Ident' was from `croaring`, caused by
rust-lang/rust-bindgen#2312. We could fix this by switching to
`llvm@15`.
@ZhongRuoyu ZhongRuoyu changed the title grin: switch to llvm@15; use brewed lmdb grin: switch to llvm@15 May 9, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label May 9, 2023
@BrewTestBot BrewTestBot enabled auto-merge May 9, 2023 10:17
@BrewTestBot BrewTestBot added this pull request to the merge queue May 9, 2023
Merged via the queue into Homebrew:master with commit 2a6feef May 9, 2023
@ZhongRuoyu ZhongRuoyu deleted the grin-fix branch May 9, 2023 13:02
@github-actions github-actions bot added the outdated PR was locked due to age label Jun 9, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. outdated PR was locked due to age rust Rust use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants