nqp
nqp copied to clipboard
Building inside a chroot fails with "Unhandled exception: All positional args must appear first"
I'm trying to build Rakudo under Debian Buster using the recommended perl Configure.pl --gen-moar --gen-nqp --backends=moar
command and it fails, apparently during the nqp build stage, with the following error:
ATTENTION: no --prefix supplied, building and installing to /some/where/rakudo/install
No pre-existing installed file found at /some/where/rakudo/install/bin/nqp-m
HEAD is now at 4494e7049... Pre-release MOAR_REVISION bump
Building NQP ...
/usr/bin/perl Configure.pl --prefix=/some/where/rakudo/install --backends=moar --make-install --git-protocol=https --gen-moar
Creating tools/build/install-jvm-runner.pl ...
Unhandled exception: All positional args must appear first
Cleaning up ...
/usr/bin/perl -MExtUtils::Command -e mkpath gen/moar/stage1/gen
/usr/bin/perl tools/build/gen-cat.pl moar src/how/Archetypes.nqp src/how/RoleToRoleApplier.nqp src/how/NQPConcreteRoleHOW.nqp src/how/RoleToClassApplier.nqp src/how/NQPCurriedRoleHOW.nqp src/how/NQPParametricRoleHOW.nqp src/how/NQPClassHOW.nqp src/how/NQPNativeHOW.nqp src/how/NQPAttribute.nqp src/how/NQPModuleHOW.nqp src/how/EXPORTHOW.nqp > gen/moar/stage1/nqpmo.nqp
/some/where/rakudo/install/bin/moar --libpath=src/vm/moar/stage0 src/vm/moar/stage0/nqp.moarvm --bootstrap --setting=NULL --no-regex-lib --target=mbc \
--output=gen/moar/stage1/nqpmo.moarvm gen/moar/stage1/nqpmo.nqp
Unhandled exception: All positional args must appear first
Makefile:240: recipe for target 'gen/moar/stage1/nqpmo.moarvm' failed
make: *** [gen/moar/stage1/nqpmo.moarvm] Error 1
Command failed (status 512): make
Command failed (status 512): /usr/bin/perl Configure.pl --prefix=/some/where/rakudo/install --backends=moar --make-install --git-protocol=https --gen-moar
I don't really know anything about nqp and I don't really know how to debug this, so I'd be grateful for any hints. FWIW I'm getting this both with the latest Rakudo master (2017.09-498-ge4a5bb17c) which corresponds to nqp 2017.09-119-g4494e7049 commit and 2017.09 version.
Can't reproduce on Bodhi Linux. Can you try with a fresh clone and provide full output:
cd $(mktemp -d) &&
git clone https://github.com/rakudo/rakudo/ . &&
perl Configure.pl --gen-moar --gen-nqp --backends=moar
Can't reproduce on Debian Unstable.
Is it a 32-bit or 64-bit system? What if you make a fresh clone of rakudo repo and try again?
This is definitely very mysterious because it used to build fine for me, but it doesn't any more. I should have mentioned that I had done git clean -fdx
before building initially, but, just to be totally sure, here is the result of running the command given by @zoffixznet
This is a 64 bit system and the only peculiarity is that it's a chroot inside another Debian system, but I don't really see how could it matter...
Huh...
it's a chroot inside another Debian system, but I don't really see how could it matter
Yet it does. I've just redid the same thing in the host system and it builds fine (well, it didn't finish yet, but at least the configure step passed). This is really weird, why (and how?) would the build process depend on being in a chroot or not? But I guess this does explain why nobody else sees it.
I stumbled upon this old issue and tried to reproduce it with current versions of Debian and Rakudo. Everything worked fine, though.
My steps:
host# mkdir -p /opt/chroot/bullseye
host# debootstrap --arch amd64 bullseye /opt/chroot/bullseye http://deb.debian.org/debian
host# mount -t proc proc /opt/chroot/bullseye/proc
host# mount -t devpts devpts /opt/chroot/bullseye/dev/pts
host# chroot /opt/chroot/bullseye
chroot# apt install locales
chroot# dpkg-reconfigure locales
chroot# apt install libfindbin-libs-perl git make gcc
[...]
chroot# git clone https://github.com/rakudo/rakudo.git
[...]
chroot# cd rakudo
chroot# perl Configure.pl --gen-moar --gen-nqp --backends=moar
[...]
chroot# make
[...]
chroot# ./rakudo-m -e 'say "Hello world"'
Hello world
Just for the records: There is one strange thing that I noticed: The error message All positional args must appear first
has been replaced with something different back in 2015: https://github.com/MoarVM/MoarVM/commit/79865be1f3#diff-9ca67daabc501e0b492ede716305adb9951c672f652c389ee9d5e508fd83129e -- while the issue mentioned NQP commit 4494e7049 from 2017. So maybe there was some old moar
executable called which caused the problesm?
Anyway, I'm going to close the issue now.