-
Notifications
You must be signed in to change notification settings - Fork 6
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
Building for macOS and Ubuntu arm64 #63
Comments
From @maxirmx : I have 11.00 x86 version working. As for arm version there is no arm runner on GHA It does not look too complex unless two caveats:
I have the package running locally on arm, so it is purely CI issue. If I have to build a workflow as described (build and package arm version on x86 GHA runner) I think it will take a week. |
Available SDK versions on 10.15: GH action to select version:
Testing macOS with arm64 won't work on GHA, so we can download it and test... |
Let it be arm64 architecture and #54 - x86_64 architecture |
It looks like this type of cross-compilation is not supprted by homebrew in a sense that there is no way to install arm64 libraries on x86_64 MacOS 11 Practiaclly it means cross-compilation of all libraries (3-4 hours per build on GHA) or some custom brew formula Maybe someone is able to help: |
@maxirmx wow, you already got your answer! That was fast. |
Dwarfs uses thrift which is essentially a compiler. So build script (1) builds thrift, then (2) uses it to create filesytem metadata definitions, then (3) builds a library that processes metadata definition reusing some of the object files created at step (1). In the case of arm64 build on x86_64 steps (1) and (2) need to be x86 while step (3) needs to be arm64 Similar ruby build script (1) builds miniruby (2) uses miniruby to generate some extra files (3) builds full ruby using some of the object files created at step (1) It is possible to create build scripts both for dwarfs and for ruby as described above. For dwarfs complexity is low, for Ruby complexity is high. Howeevr we need to accept the fact that our build scripts will diverge from baselines in both cases. |
If I attempt to package something bigger then trivial example I am getting error
Something like: jemalloc/jemalloc#467 We have to use jemalloc since otherwise dwarfs runs out of memory when metanorma is packaged |
We are facing similar issue |
Sound reasonable. |
Is this in packed-mn or in another implementation? The way to resolve it seems to be to add the platforms to Gemfile.lock or having platform specific Gemfile.lock s.
|
It looks like this feature is broken in bundler 2.3.2 and by unlucky coincedence this is the version I am testing with. |
When it comes to native extensions the only (partially ?) working approach is to build several versions of ruby and combine cross-compilation environment as described here: However, it requires extconf.rb for all Gems to honour cross-compile settings. That did not come true even for the first one: ffi/ffi#944 |
@maxirmx the issue in ffi gem seems to have been solved:
Can you revisit this, and close ffi/ffi#944 when appropriate? Thanks. |
@ronaldtse Thank you |
@maxirmx I have installed CIrrus CI now for this org. Thanks. |
There are now two target macOS architectures (arm64 vs x86), so we want to:
The text was updated successfully, but these errors were encountered: