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

[WIP] Bootstrappable FCMP++ #9440

Draft
wants to merge 118 commits into
base: master
Choose a base branch
from
Draft

Conversation

tobtoht
Copy link
Contributor

@tobtoht tobtoht commented Aug 17, 2024

This is a WIP (early stages) draft PR for reproducible release builds with Rust FFI. Please check back later.

Based on #9436 (FCMP++ integration) and #8929 (Bootstrappable builds).

Tools

  • Binutils 2.41
  • LLVM 17.0.6
  • Rust 1.77.1

Sub-PRs

The Road to FCMP++

trtf

(Updated: September 5)

To-do (incomplete):

  • Bump Android NDK to latest LTS
  • Bump FreeBSD SDK to 12.3
  • Bump Darwin llvm to 17
  • Bump binutils to 2.40
  • Don't build rustdoc
  • Get builds working for all targets
  • Remove blobs from rustc source
  • Fix non-determinism on aarch64
  • Bundle fcmp_pp_rust deps
  • Split into sub-PRs
  • Fix depends CI
  • Test all builds
Target Builds Reproducible Bootstrappable Tested
x86_64-linux-gnu 🮱 🮱 🮱
arm-linux-gnueabihf 🮱 🮱 🮱
aarch64-linux-gnu 🮱 🮱 🮱
riscv64-linux-gnu 🮱 🮱 🮱
i686-linux-gnu 🮱 🮱 🮱
i686-w64-mingw32 🮱 🮱 🮱
x86_64-w64-mingw32 🮱 🮱 🮱
x86_64-unknown-freebsd 🮱 🮱 🮱 [1]
x86_64-apple-darwin 🮱 🮱 🮱 [2]
aarch64-apple-darwin 🮱 🮱 🮱 [2]
arm-linux-androideabi 🮱 🮱 ❌ [3]
aarch64-linux-android 🮱 🮱 ❌ [3]

[1] = links against precompiled freebsd system libraries
[2] = links against precompiled libraries from the darwin SDK
[3] = built with a precompiled toolchain from the Android NDK (there is currently no way around this)

j-berman and others added 30 commits July 29, 2024 03:40
Identified by kayabaNerve, patch suggested by j-berman.
- When retrieving last chunks, set next_start_child_chunk_index
so can know the correct start index without needing to modify
the offset
- Other smaller cleanup
rm -rf src/llvm-project && \
find . -type f -regex ".*\.\(a\|dll\|exe\|lib\)$$$$" -delete && \
find . -type f -name ".cargo-checksum.json" -print0 | xargs -0 -I% sh -c 'echo "{\"files\":{}}" > "%"' && \
find . -type f -name "Cargo.lock" -delete && \

Choose a reason for hiding this comment

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

Does this line delete the lockfile which enables deterministic builds by specifying the exact versions of all Rust dependencies to use?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing the Cargo.lock file is necessary because we're removing binaries from the source code, causing checksum mismatches.

Builds are still reproducible. All dependencies are vendored, and we don't have network access here. Version numbers are included in Cargo.toml.

This PR isn't ready for review.

Choose a reason for hiding this comment

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

Sorry, I didn't mean to criticize a WIP. I just wanted clarity, or to point out an error which would presumably make your life more difficult. I now have the former.

My one other chime in is the version numbers in the toml aren't exact, yet ranges, but sounds like that won't be an issue.

@MrCyjaneK
Copy link

MrCyjaneK commented Aug 21, 2024

Hey - I've seen that NDK task is unchecked, you can grab latest NDK patch from here: https://github.com/MrCyjaneK/monero_c/blob/master/patches/monero/0013-android-ndk-version-bump.patch and https://github.com/MrCyjaneK/monero_c/blob/master/patches/monero/0013-rename-arm-armv7a.patch it cointains some hacks - but hopefully will be useful.

- @tobtoht reported err with size_t -> uint64_t
- Also address some PR comments (@vtnerd namespace comment +
@Boog900 freeing unallocated rust type)
- Some cleaning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants