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

Cross-compiled build for macOS/aarch64 #1076

Merged
merged 3 commits into from
Mar 26, 2022
Merged

Cross-compiled build for macOS/aarch64 #1076

merged 3 commits into from
Mar 26, 2022

Conversation

Kha
Copy link
Member

@Kha Kha commented Mar 26, 2022

This is our first platform released using USE_GMP=OFF, as sourcing libraries for foreign platforms from Homebrew is not nearly as simple as with Nix.

I haven't tested the artifact yet as the SSH connection to the Mac Mini in my office intermittently freezes even with caffeinate 😶 .

@Kha Kha merged commit 4a9bc88 into leanprover:master Mar 26, 2022
@alcides
Copy link

alcides commented Mar 27, 2022

I report that the darwin arm64 works in my machine (mbp m1 max) for simple files. If you'd like, I can run more specific tests.

@Kha
Copy link
Member Author

Kha commented Mar 27, 2022

@alcides Thanks! The other interesting part would be native compilation, e.g. lake init hello; lake build; ./build/bin/hello

@alcides
Copy link

alcides commented Mar 27, 2022

Yes, that small example also works, despite the (scary for beginners) warnings bellow:

 alcides@PowerBook.local  /Users/alcides/Desktop/TestArm   master ✘ ✭  lake build                             11:34:16 
> LEAN_PATH=./build/lib /Users/alcides/.elan/toolchains/leanprover--lean4---nightly-2022-03-27/bin/lean ././TestARm.lean -R ./. -o ./build/lib/TestARm.olean -i ./build/lib/TestARm.ilean -c ./build/ir/TestARm.c
> /Users/alcides/.elan/toolchains/leanprover--lean4---nightly-2022-03-27/bin/leanc -c -o ./build/ir/TestARm.o ./build/ir/TestARm.c -O3 -DNDEBUG
> LEAN_PATH=./build/lib /Users/alcides/.elan/toolchains/leanprover--lean4---nightly-2022-03-27/bin/lean ././Main.lean -R ./. -o ./build/lib/Main.olean -i ./build/lib/Main.ilean -c ./build/ir/Main.c
> /Users/alcides/.elan/toolchains/leanprover--lean4---nightly-2022-03-27/bin/leanc -c -o ./build/ir/Main.o ./build/ir/Main.c -O3 -DNDEBUG
> /Users/alcides/.elan/toolchains/leanprover--lean4---nightly-2022-03-27/bin/leanc -o ./build/bin/TestARm ./build/ir/Main.o ./build/ir/TestARm.o
error: ld64.lld: warning: /usr/lib/system/libsystem_kernel.dylib has version 12.3.0, which is newer than target minimum of 12.0.0
ld64.lld: warning: /usr/lib/system/libsystem_platform.dylib has version 12.3.0, which is newer than target minimum of 12.0.0
ld64.lld: warning: /usr/lib/system/libsystem_pthread.dylib has version 12.3.0, which is newer than target minimum of 12.0.0
``

I'm available to run other tests (and I'm around the zulip if that reduces noise around here).

@Kha
Copy link
Member Author

Kha commented Mar 27, 2022

Thanks, looks good then! I haven't really investigated where these warnings are coming from yet.

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