rakudo / rakudo.org

Code for rakudo.org website
https://rakudo.org/
Artistic License 2.0
8 stars 18 forks source link

moarvm fatal: not in a git directory (Rakudo.org instructions change request) #73

Open librasteve opened 2 years ago

librasteve commented 2 years ago

get an error on the make command on macOS Monterey I propose to add the line noted below to the build from source instructions

The exact steps required may differ, depending on your operating system:

mkdir ~/rakudo && cd $_ git init <====== this fixes the error curl -LJO https://rakudo.org/latest/rakudo/src tar -xvzf rakudo-.tar.gz cd rakudo-

perl Configure.pl --backend=moar --gen-moar make <====== here

# If you wish, you can run the tests # Depending on your machine, they could take over half an hour to run make test make spectest

make install

echo "export PATH=$(pwd)/install/bin:$(pwd)/install/share/perl6/site/bin:\$PATH" \

~/.bashrc source ~/.bashrc

patrickbkr commented 2 years ago

I'm pretty sure this is an ugly workaround and not a fix. I seem to recall that there are quite some warnings during make caused by not being located in a git repo (when building from a tar), but as as far as I know they didn't cause an abort. Do I understand correctly, that the make command actually aborts for you as a result of "not in a git directory"?

librasteve commented 2 years ago

hi @patrickbkr - this error goes away when I git init the folder (or parent) - this Issue was raised to fix the Rakudo.org website to add 'git init' to the installation instructions (sorry if I was not clear) - and, yes, requiring the build folder to be a (empty) git repo is an ugly workaround ;-)

on a secondary note I never did get this build from source to work natively on my M1 - I have tried (i) this (ie build from source per Rakudo.org instructions that gets to t/02-rakudo/v6.d-tests/01-deprecations.t ........................ ok and then hangs / make install also hangs), (ii) JJ Merelos alpine test build on an ARM64 alpine option and (iii) apt-get install rakudo on a full fat ARM64 ubuntu running on vftool - so I conclude that MOARVM is not ready for ARM64/M1 and will go back to perfectly good (but slower ;-() alpine x86 running on rosetta.

feel free to set me right if there is an idiot proof way to run Rakudo on M1 and I am just missing the mark!!

jonathanstowe commented 2 years ago

I'm pretty sure it will build on an M1 - it might be worth checking past issues on https://github.com/rakudo/rakudo/issues

patrickbkr commented 2 years ago

@p6steve There are pre built release archives for M1 Macs offered on rakudo.org. (Those are called "arm64".) Maybe those are helpful for you. (In case you are using rakubrew - that will automatically detect and use those files via the download subcommand.)

These archives are built on an actual M1 Mac with the exact commands as contained in https://github.com/rakudo/rakudo/blob/master/tools/build/binary-release/build-macos.sh So in principle it should work. I'd be interested to know why it fails on your machine...

librasteve commented 2 years ago

hi @patrickbkr - sorry I lost track of this issue a bit - fwiw my ugly hack of git init the parent now fails to suppress the fatal: not in a git directory warning ... probably better to fix the code so that it does not pretend to throw a fatal exception and yet survives as you suggest

I am currently funning atop vftools / ubuntu on macOS M1 to control other environment aspects - so I trust your 6/11 comments that rakudo[start] will build on an M1