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

HOL-Light: Add support for MacOS #716

Merged
merged 1 commit into from
Jan 29, 2025
Merged

HOL-Light: Add support for MacOS #716

merged 1 commit into from
Jan 29, 2025

Conversation

hanno-becker
Copy link
Contributor

@hanno-becker hanno-becker commented Jan 29, 2025

The HOL-Light/s2n-bignum proofs expect ELF formatted object files, but compilation on MacOS produces Mach-O object files.

This commit modifies the makefile for the HOL-Light proofs in mlkem-native to explicitly convert from Mach-O to ELF using gobjcopy.

Unfortunately, there does not seem to be a way to get a version of objcopy through nix that supports the required conversion, hence we need to fall back to documentation and expressive error messages to nudge the user to manually install gobjcopy via brew install binutils when it cannot be found.

@hanno-becker hanno-becker marked this pull request as ready for review January 29, 2025 10:15
@hanno-becker hanno-becker requested a review from a team January 29, 2025 10:15
Copy link
Contributor

@rod-chapman rod-chapman left a comment

Choose a reason for hiding this comment

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

Looks good.

proofs/hol_light/arm/Makefile Outdated Show resolved Hide resolved
proofs/hol_light/arm/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@rod-chapman rod-chapman left a comment

Choose a reason for hiding this comment

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

Nearly there...

proofs/hol_light/arm/README.md Outdated Show resolved Hide resolved
proofs/hol_light/arm/Makefile Outdated Show resolved Hide resolved
The HOL-Light/s2n-bignum proofs expect ELF formatted object files,
but compilation on MacOS produces Mach-O object files.

This commit modifies the makefile for the HOL-Light proofs in mlkem-native
to explicitly convert from Mach-O to ELF using gobjcopy.

Unfortunately, there does not seem to be a way to get a version of
`objcopy` through `nix` that supports the required conversion, hence
we need to fall back to documentation and expressive error messages
to nudge the user to manually install `gobjcopy` via `brew install binutils`
when it cannot be found.

Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
Copy link
Contributor

@rod-chapman rod-chapman left a comment

Choose a reason for hiding this comment

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

Looks good. Merge please.

@hanno-becker hanno-becker merged commit 3da5027 into main Jan 29, 2025
191 checks passed
@hanno-becker hanno-becker deleted the hol_light_mac branch January 29, 2025 18:28
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