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

Request: prebuilt rakudo binary for arm64 macos #4364

Closed
skaji opened this issue May 13, 2021 · 15 comments
Closed

Request: prebuilt rakudo binary for arm64 macos #4364

skaji opened this issue May 13, 2021 · 15 comments

Comments

@skaji
Copy link
Contributor

skaji commented May 13, 2021

The Problem

I hope we have prebuilt rakudo binaries for arm64 macos in https://rakudo.org/downloads/rakudo

Expected Behavior

There is prebuilt rakudo binaries for arm64 macos.

Actual Behavior

There is no prebuilt rakudo binary for arm64 macos.

Steps to Reproduce

See https://rakudo.org/downloads/rakudo

Environment

  • Operating system: N/A
  • Compiler version (perl6 -v or raku -v): N/A
@patrickbkr
Copy link
Contributor

Currently the pre built binaries are compiled on Azure pipelines. They currently don't offer M1 build hosts and don't plan to do so soon. So for now we either have to live with not having M1 builds, or we will need to find a way to get access to some M1 hardware to use for building. 🙁

@skaji
Copy link
Contributor Author

skaji commented May 18, 2021

@patrickbkr Thanks for your comment.

Currently the pre built binaries are compiled on Azure pipelines. They currently don't offer M1 build hosts and don't plan to do so soon.

Fair enough.

By the way, it would be really nice if everyone can see how pre built binaries are built (build steps, compile options, ... etc).

@patrickbkr
Copy link
Contributor

It's these scripts triggered by this Azure CI stage. Does that answer your question?

@skaji
Copy link
Contributor Author

skaji commented May 18, 2021

Wow, that's exactly what i'm looking for. Not sure why I didn't check that.
@patrickbkr Thanks!

@Zer0-Tolerance
Copy link

it would be good to have native build or at least have a procedure to build it ourselves.

@patrickbkr
Copy link
Contributor

@Zer0-Tolerance Do you own an M1 Mac? Can you try whether building according to the following instructions works for you and indeed creates native M1 binaries?

  1. Make sure you have XCode and Perl installed.
  2. Download and extract the latest sources of Rakudo (2021.05 as of writing) from https://rakudo.org/downloads
  3. Open a console and cd to that extracted folder (should be named rakudo-2021-05` or similar)
  4. Run ./Configure.pl --gen-moar --gen-nqp. This should download, build and install MoarVM and NQP to the install/ subdirectory.
  5. Run make install. This should build and install Rakudo to the install/ subdirectory.
  6. The final executables can be found in install/bin/.

@Zer0-Tolerance
Copy link

@Zer0-Tolerance Do you own an M1 Mac? Can you try whether building according to the following instructions works for you and indeed creates native M1 binaries?

  1. Make sure you have XCode and Perl installed.
  2. Download and extract the latest sources of Rakudo (2021.05 as of writing) from https://rakudo.org/downloads
  3. Open a console and cd to that extracted folder (should be named rakudo-2021-05` or similar)
  4. Run ./Configure.pl --gen-moar --gen-nqp. This should download, build and install MoarVM and NQP to the install/ subdirectory.
  5. Run make install. This should build and install Rakudo to the install/ subdirectory.
  6. The final executables can be found in install/bin/.

Yes I do and I'm happy to help if I can ! Ok I'll follow this procedure and let you know but I remember that I got some issue with the "unsafe way to use libcrypto" when trying to zef install OpenSSL. Will post the result here in a few minutes !

@Zer0-Tolerance
Copy link

build was successful but make test fails:

+++ Checking for moar NQP version
'/Users/xxx/perl5/perlbrew/perls/perl-5.24.4/bin/perl' -I'/Users/xxx/install/raku/rakudo-2021.05/tools/lib' -I'/Users/xxx/install/raku/rakudo-2021.05/3rdparty/nqp-configure/lib' t/harness5 --moar t/01-sanity t/02-rakudo t/04-nativecall t/05-messages t/06-telemetry t/07-pod-to-text t/08-performance t/10-qast t/09-moar
t/01-sanity/03-op-logic.t ....................................... ok
t/01-sanity/02-op-math.t ........................................ ok
t/01-sanity/04-op-cmp.t ......................................... ok
t/01-sanity/01-literals.t ....................................... ok
t/01-sanity/05-var.t ............................................ ok
t/01-sanity/06-op-inplace.t ..................................... ok
t/01-sanity/09-end-blocks.t ..................................... ok
t/01-sanity/12-counter.t ........................................ ok
t/01-sanity/11-tap.t ............................................ ok
t/01-sanity/10-regex.t .......................................... ok
t/01-sanity/08-var-array.t ...................................... ok
t/01-sanity/13-equal.t .......................................... ok
t/01-sanity/07-op-string.t ...................................... ok
t/01-sanity/15-sub.t ............................................ ok
t/01-sanity/17-isa.t ............................................ ok
t/01-sanity/16-eqv.t ............................................ ok
t/01-sanity/19-say.t ............................................ ok
t/01-sanity/21-try.t ............................................ ok
t/01-sanity/20-defined.t ........................................ ok
t/01-sanity/18-simple-multisubs.t ............................... ok
t/01-sanity/14-if.t ............................................. ok
t/01-sanity/98-test-deprecated.t ................................ ok
t/01-sanity/53-transpose.t ...................................... ok
t/02-rakudo/01-is_approx.t ...................................... ok
t/01-sanity/56-use-isms.t ....................................... ok
t/01-sanity/55-use-trace.t ...................................... ok
t/01-sanity/99-test-basic.t ..................................... ok
t/02-rakudo/03-corekeys-6d.t .................................... ok
t/02-rakudo/03-corekeys.t ....................................... ok
t/02-rakudo/03-corekeys-6c.t .................................... ok
t/02-rakudo/03-corekeys-6e.t .................................... ok
t/02-rakudo/04-diag.t ........................................... ok
t/02-rakudo/04-settingkeys-6d.t ................................. ok
t/02-rakudo/05-range-in-range.t ................................. ok
t/02-rakudo/06-is.t ............................................. ok
t/02-rakudo/07-implementation-detail-6.c.t ...................... ok
t/02-rakudo/07-implementation-detail-6.d.t ...................... ok
t/02-rakudo/04-settingkeys-6e.t ................................. ok
t/02-rakudo/04-settingkeys-6c.t ................................. ok
t/02-rakudo/07-implementation-detail-6.e.t ...................... ok
t/02-rakudo/08-repeat.t ......................................... ok
t/02-rakudo/08-inline-native-arith.t ............................ ok
t/02-rakudo/09-thread-id-after-await.t .......................... ok
t/02-rakudo/10-nqp-ops.t ........................................ ok
t/02-rakudo/13-exceptions.t ..................................... ok
t/02-rakudo/11-deprecated.t ..................................... ok
t/02-rakudo/08-slangs.t ......................................... ok
t/02-rakudo/12-proto-arity-count.t .............................. ok
t/02-rakudo/17-cli.t ............................................ ok
t/02-rakudo/18-pseudostash.t .................................... ok
t/02-rakudo/dd.t ................................................ ok
t/02-rakudo/dump.t .............................................. ok
t/02-rakudo/14-revisions.t ...................................... ok
t/02-rakudo/03-cmp-ok.t ......................................... ok
t/02-rakudo/99-misc.t ........................................... ok
t/02-rakudo/v6.d-tests/01-deprecations.t ........................ ok
t/02-rakudo/16-begin-time-eval.t ................................ ok
t/02-rakudo/15-gh_1202.t ........................................ ok
t/04-nativecall/01-argless.t .................................... ok
t/04-nativecall/00-misc.t ....................................... ok
t/04-nativecall/03-simple-returns.t ............................. ok
t/04-nativecall/02-simple-args.t ................................ Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/14 subtests
	(less 1 skipped subtest: 12 okay)
t/04-nativecall/04-pointers.t ................................... ok
t/04-nativecall/07-writebarrier.t ............................... ok
t/02-rakudo/repl.t .............................................. ok
t/04-nativecall/08-callbacks.t .................................. ok
t/04-nativecall/05-arrays.t ..................................... ok
t/04-nativecall/06-struct.t ..................................... ok
t/04-nativecall/10-cglobals.t ................................... ok
t/04-nativecall/09-nativecast.t ................................. ok
t/04-nativecall/11-cpp.t ........................................ ok
t/04-nativecall/14-rw-attrs.t ................................... ok
t/02-rakudo/reproducible-builds.t ............................... ok
t/04-nativecall/13-union.t ...................................... ok
t/04-nativecall/16-rt125408.t ................................... ok
t/04-nativecall/12-sizeof.t ..................................... ok
t/04-nativecall/16-rt125729.t ................................... ok
t/04-nativecall/17-libnames.t ................................... ok
t/04-nativecall/19-function-pointers.t .......................... ok
t/04-nativecall/13-cpp-mangling.t ............................... ok
t/04-nativecall/21-callback-other-thread.t ...................... ok
t/04-nativecall/20-concurrent.t ................................. ok
t/04-nativecall/23-incomplete-types.t ........................... ok
t/04-nativecall/18-routine-sig-sanity.t ......................... ok
t/04-nativecall/22-method.t ..................................... ok
t/05-messages/11-overflow.t ..................................... ok
t/05-messages/moar/01-errors.t .................................. ok
t/04-nativecall/15-rw-args.t .................................... ok
t/05-messages/v6.d-tests/01-errors.t ............................ ok
t/05-messages/03-errors.t ....................................... ok
t/05-messages/10-warnings.t ..................................... ok
t/06-telemetry/03-thread.t ...................................... ok
t/06-telemetry/02-usage.t ....................................... ok
t/06-telemetry/04-threadpool.t .................................. ok
t/08-performance/01-iterators.t ................................. ok
t/07-pod-to-text/02-input-output.t .............................. ok
t/07-pod-to-text/01-whitespace.t ................................ ok
t/08-performance/05-processkeys.t ............................... ok
t/08-performance/99-misc.t ...................................... ok
t/05-messages/01-errors.t ....................................... ok
t/08-performance/02-qast-rewrites.t ............................. ok
t/05-messages/02-errors.t ....................................... ok
t/09-moar/00-misc.t ............................................. ok
t/09-moar/01-profilers.t ........................................ ok
t/10-qast/00-misc.t ............................................. ok
t/09-moar/Line_Break__LineBreak.t ............................... ok
t/09-moar/General_Category__UnicodeData__2.t .................... ok
t/09-moar/NAME__UnicodeData.t ................................... ok
t/09-moar/General_Category__extracted-DerivedGeneralCategory.t .. ok
t/06-telemetry/01-basic.t ....................................... ok

Test Summary Report
-------------------
t/04-nativecall/02-simple-args.t                              (Wstat: 256 Tests: 14 Failed: 1)
  Failed test:  10
  Non-zero exit status: 1
Files=110, Tests=1842, 28 wallclock secs ( 0.34 usr  0.16 sys + 162.31 cusr 13.54 csys = 176.35 CPU)
Result: FAIL
make: *** [m-coretest5] Error 1

Here you can find the 2021.05 M1 binaries:

rakudo-moar-2021-05-macos-arm64-clang.zip
Hope this is useful.

@jonathanstowe
Copy link
Contributor

That test commonly fails on ARM processors, it should be good if you pass --has-libffi to the MoarVM Configure - e.g.

./Configure.pl --gen-moar --gen-nqp --moar-option="--has-libffi"

You may need to install libffi

@Zer0-Tolerance
Copy link

ok just tested the build, I must say it seems to works quite fast, but I'm still getting terminated by signal SIGSEGV (Address boundary error) when doing massive connect scan with IO::Socket::Async but I've opened another issue on this topic. @jonathanstowe will test your option for the test.

@Zer0-Tolerance
Copy link

That test commonly fails on ARM processors, it should be good if you pass --has-libffi to the MoarVM Configure - e.g.

./Configure.pl --gen-moar --gen-nqp --moar-option="--has-libffi"

You may need to install libffi

same result ...

@patrickbkr
Copy link
Contributor

@Zer0-Tolerance Thanks for trying this out. Can you open a separate issue for the test failure as well?

@jonathanstowe
Copy link
Contributor

That's strange because on the similarly arm64 RPi4 that test consistently fails without the ffi, but consistently passes with it.

@patrickbkr
Copy link
Contributor

There is now an M1 pre-built 2021.07 release archive available on https://rakudo.org/
I plan to provide these regularly from now on. Thus I'm closing this issue.

@skaji
Copy link
Contributor Author

skaji commented Jul 25, 2021

@patrickbkr Thank you!

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

No branches or pull requests

4 participants