nqp
nqp copied to clipboard
NQP README instructions unclear
At least on MacOS as per instructions in the README
% perl Configure.pl --backends=moar
Updating submodules .................................... OK
===ATTENTION===
No --prefix supplied, building and installing to /Users/liz/Github/nqp/install
===SORRY!===
No moar executable found in /Users/liz/Github/nqp/install at /Users/liz/Github/nqp/3rdparty/nqp-configure/lib/NQP/Config.pm line 192.
at /Users/liz/Github/nqp/3rdparty/nqp-configure/lib/NQP/Config.pm line 34.
NQP::Config::__ANON__("===SORRY!===\x{a} No moar executable found in /Users/liz/Github/"...) called at /Users/liz/Github/nqp/3rdparty/nqp-configure/lib/NQP/Config.pm line 192
NQP::Config::sorry(NQP::Config::NQP=HASH(0x14500bdf0), "No moar executable found in /Users/liz/Github/nqp/install") called at /Users/liz/Github/nqp/tools/lib/NQP/Config/NQP.pm line 112
NQP::Config::NQP::configure_moar_backend(NQP::Config::NQP=HASH(0x14500bdf0)) called at /Users/liz/Github/nqp/3rdparty/nqp-configure/lib/NQP/Config.pm line 666
NQP::Config::configure_active_backends(NQP::Config::NQP=HASH(0x14500bdf0)) called at Configure.pl line 96
I think it has been resolved on IRC and the issue can be closed? It seems that you've built MoarVM without explicit prefix.
I've changed the title to point out the incorrect information in the README, so I still think it's an issue.
$ perl Configure.pl --backends=moar,jvm
$ make
does not work. You either have to add --gen-moar (in which case you can omit the --backends), or you must specify a prefix.
I still don't see where the problem is. With --backends moar is expected to be somewhere in $PATH or in --prefix. --gen-moar doesn't require --backends.
Ah, I'm still asleep and slow... You mean that the line from README does not build NQP as expected. This is true. An alternate paragraph is needed which would start with "If you want NQP with MoarVM backend ....".
I tried to address this issue with https://github.com/Raku/nqp/pull/798.
I have to admit, that I'm somewhat unsure how the combinations of options are supposed to work. To me it looks like --prefix works fine together with --gen-moar and --backends=moar. In so far --prefix could be used as an alternative to --with-moar.
But the combination of --prefix and --with-moar seems to be broken. That could just be a bug, though.
~/tmp/nqp$ perl Configure.pl --prefix=/home/christian/tmp/test_install_dir_2 --with-moar=/home/christian/tmp/test_install_dir/bin/moar --backends=moar
Found /home/christian/tmp/test_install_dir/bin/moar version 2022.12-15-g6b456a6c0, which is new enough.
Cleaning up ...
You can now use 'make' to build NQP.
After that, 'make test' will run some tests and
'make install' will install NQP.
~/tmp/nqp$ make
+++ Preparing MOAR build directories
++++++ Building MOAR backend
+++ Generating gen/moar/stage1/nqpmo.nqp
+++ Compiling gen/moar/stage1/nqpmo.moarvm
+++ Compiling gen/moar/stage1/ModuleLoader.moarvm
+++ Generating gen/moar/stage1/NQPCORE.setting
+++ Compiling gen/moar/stage1/NQPCORE.setting.moarvm
+++ Generating gen/moar/stage1/QASTNode.nqp
+++ Compiling gen/moar/stage1/QASTNode.moarvm
+++ Generating gen/moar/stage1/QRegex.nqp
+++ Compiling gen/moar/stage1/QRegex.moarvm
+++ Generating stage 1 nqp-config.nqp
Open failed: No such file or directory at /home/christian/tmp/nqp/tools/build/gen-version.pl line 38.
make: *** [Makefile:410: gen/moar/stage1/nqp-config.nqp] Error 2
#798 looked like a fine fix for this documentation issue to me. The reported issue with --prefix in combination with --with-moar should get its own ticket.