/usr/bin/perl5.12.4 tools/build/gen-cat.pl src/QRegex/P5Regex/Grammar.nqp src/QRegex/P5Regex/Actions.nqp src/QRegex/P5Regex/Compiler.nqp > src/stage2/gen/NQPP5QRegex.pm ./nqp --target=pir --output=src/stage2/gen/NQPP5QRegex.pir \ src/stage2/gen/NQPP5QRegex.pm make: *** [NQPP5QRegex.pbc] Segmentation fault emake failed [ebuild U ] dev-lang/nqp-2013.02 [2013.01] USE="-doc" Upstream seems to have advice about it. See the IRC log in the link below, user timotino and perl6 developer jnthn find a solution to their issue. http://irclog.perlgeek.de/perl6/2013-02-10 Reproducible: Always
Created attachment 340610 [details] emerge--info
Created attachment 340612 [details] Build log
Does this happen with perl 5.16 too? (Because for me on a full ~arch system it obviously works ...)
Now it won't find perl. I did run perl-cleaner after upgrade, and removed the nqp directory (from previous build) from the portage temp directory before building. >>> Emerging (1 of 1) dev-lang/nqp-2013.02 * nqp-2013.02.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking nqp-2013.02.tar.gz to /mnt/stockage/var-tmp-portage/portage/dev-lang/nqp-2013.02/work >>> Source unpacked in /mnt/stockage/var-tmp-portage/portage/dev-lang/nqp-2013.02/work >>> Preparing source in /mnt/stockage/var-tmp-portage/portage/dev-lang/nqp-2013.02/work ... >>> Source prepared. >>> Configuring source in /mnt/stockage/var-tmp-portage/portage/dev-lang/nqp-2013.02/work/nqp-2013.02 ... Verifying installation ... Using /usr/bin/parrot (version 0). * configure package dyncall guess operating system linux guess arch x64 guess tool gcc guess assembler as Creating Makefile ... Cleaning up ... /bin/sh: /usr/bin/perl5.12.4: No such file or directory
So it turns out perl-cleaner forgets about parrot (should I file a bug?). After rebuilding dev-lang/parrot-5.1.0, I can compile again and I get teh same thing: /usr/bin/perl5.16.2 tools/build/gen-cat.pl src/QRegex/P5Regex/Grammar.nqp src/QRegex/P5Regex/Actions.nqp src/QRegex/P5Regex/Compiler.nqp > src/stage2/gen/NQPP5QRegex.pm ./nqp --target=pir --output=src/stage2/gen/NQPP5QRegex.pir \ src/stage2/gen/NQPP5QRegex.pm make: *** [NQPP5QRegex.pbc] Erreur de segmentation emake failed
I have the same error.
I suppose that I have a clean perl-5.16.2 installation for more than one month. Additionally I was running today once more 'perl-cleaner --reallyall' and 'emerge -v1 parrot' but nevertheless 'emerge nqp' fails at the first system (impala) with: 86_64-pc-linux-gnu-gcc -o nqp.o -I"/usr/include/parrot/5.1.0" -march=amdfam10 -O2 -pipe -DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL -DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED -DHASATTRIBUTE_WARN_UNUSED_RESULT -DHASATTRIBUTE_HOT -DHASATTRIBUTE_COLD -DHAS_GETTEXT -I/usr/lib64/libffi-3.0.12/include -c nqp.c Compiled: nqp.o x86_64-pc-linux-gnu-gcc -o nqp "nqp.o" "/usr/lib64/parrot/5.1.0/parrot_config.o" -L"/usr/lib64" -lparrot -Wl,-E -Wl,-O1 -Wl,--as-needed -lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt -lgmp -lreadline -lffi -L/usr/lib64 -licuuc -licudata Linked: nqp /usr/bin/perl5.16.2 -MExtUtils::Command -e mkpath src/stage2/gen /usr/bin/perl5.16.2 tools/build/gen-cat.pl src/QRegex/P5Regex/Grammar.nqp src/QRegex/P5Regex/Actions.nqp src/QRegex/P5Regex/Compiler.nqp > src/stage2/gen/NQPP5QRegex.pm ./nqp --target=pir --output=src/stage2/gen/NQPP5QRegex.pir \ src/stage2/gen/NQPP5QRegex.pm src/call/context.c:737: failed assertion 'Parrot_pcc_get_regs_used(interp, ctx, REGNO_PMC) > idx' Backtrace - Obtained 23 stack frames (max trace depth is 32). /usr/lib64/libparrot.so.5.1.0(+0x8c324) [0x7f280f2bf324] /usr/lib64/libparrot.so.5.1.0(Parrot_confess+0x49) [0x7f280f2870bf] /usr/lib64/libparrot.so.5.1.0(Parrot_pcc_get_PMC_reg+0x7d) [0x7f280f2d2d6d] dynext/nqp_ops.so(Parrot_get_sub_code_object_p_p+0x20) [0x7f280aa63890] /usr/lib64/libparrot.so.5.1.0(+0xb85b1) [0x7f280f2eb5b1] /usr/lib64/libparrot.so.5.1.0(+0xb7bde) [0x7f280f2eabde] /usr/lib64/libparrot.so.5.1.0(+0x9f539) [0x7f280f2d2539] /usr/lib64/libparrot.so.5.1.0(Parrot_pcc_invoke_from_sig_object+0xc6) [0x7f280f2cd946] /usr/lib64/libparrot.so.5.1.0(Parrot_pcc_invoke_sub_from_c_args+0xf7) [0x7f280f2cdd07] /usr/lib64/libparrot.so.5.1.0(do_sub_pragmas+0x20d) [0x7f280f2f675d] /usr/lib64/libparrot.so.5.1.0(Parrot_load_bytecode+0x163) [0x7f280f2f8723] /usr/lib64/libparrot.so.5.1.0(+0x7d507) [0x7f280f2b0507] /usr/lib64/libparrot.so.5.1.0(+0xb85b1) [0x7f280f2eb5b1] /usr/lib64/libparrot.so.5.1.0(+0xb7bde) [0x7f280f2eabde] /usr/lib64/libparrot.so.5.1.0(+0x9f539) [0x7f280f2d2539] /usr/lib64/libparrot.so.5.1.0(Parrot_pcc_invoke_from_sig_object+0xc6) [0x7f280f2cd946] /usr/lib64/libparrot.so.5.1.0(Parrot_pcc_invoke_sub_from_c_args+0xf7) [0x7f280f2cdd07] /usr/lib64/libparrot.so.5.1.0(do_sub_pragmas+0x329) [0x7f280f2f6879] /usr/lib64/libparrot.so.5.1.0(Parrot_pf_execute_bytecode_program+0x71) [0x7f280f2f8a31] /usr/lib64/libparrot.so.5.1.0(Parrot_api_run_bytecode+0xd2) [0x7f280f2baec2] ./nqp(main+0x179) [0x401319] /lib64/libc.so.6(__libc_start_main+0xed) [0x7f280eea994d] ./nqp() [0x4013c9] Attempting to get PIR backtrace. No guarantees. Here goes... make: *** [NQPP5QRegex.pbc] Segmentation fault at the second system (condor) with: x86_64-pc-linux-gnu-gcc -o nqp.o -I"/usr/include/parrot/5.1.0" -march=native -O2 -pipe -DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL -DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED -DHASATTRIBUTE_WARN_UNUSED_RESULT -DHASATTRIBUTE_HOT -DHASATTRIBUTE_COLD -DHAS_GETTEXT -I/usr/lib64/libffi-3.0.12/include -c nqp.c Compiled: nqp.o x86_64-pc-linux-gnu-gcc -o nqp "nqp.o" "/usr/lib64/parrot/5.1.0/parrot_config.o" -L"/usr/lib64" -lparrot -Wl,-E -Wl,-O1 -Wl,--as-needed -lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt -lgmp -lreadline -lffi -L/usr/lib64 -licuuc -licudata Linked: nqp /usr/bin/perl5.16.2 -MExtUtils::Command -e mkpath src/stage2/gen /usr/bin/perl5.16.2 tools/build/gen-cat.pl src/QRegex/P5Regex/Grammar.nqp src/QRegex/P5Regex/Actions.nqp src/QRegex/P5Regex/Compiler.nqp > src/stage2/gen/NQPP5QRegex.pm ./nqp --target=pir --output=src/stage2/gen/NQPP5QRegex.pir \ src/stage2/gen/NQPP5QRegex.pm make: *** [NQPP5QRegex.pbc] Segmentation fault
Created attachment 340748 [details] emerge --info '=dev-lang/nqp-2013.02' at impala
Created attachment 340750 [details] emerge --info '=dev-lang/nqp-2013.02' at condor
I get a segfault like condor. I'm thinking loud while I try to debug this. Program received signal SIGSEGV, Segmentation fault. 0x0000003edd6bf8e7 in Parrot_sub_context_get_info (interp=0x8ad050, ctx=<optimized out>, info=0x7fffffffcac0) at src/sub.c:176 176 ADD_OP_VAR_PART(interp, sub->seg, pc, var_args); (gdb) bt #0 0x0000003edd6bf8e7 in Parrot_sub_context_get_info (interp=0x8ad050, ctx=<optimized out>, info=0x7fffffffcac0) at src/sub.c:176 #1 0x0000003edd6bfa63 in Parrot_sub_Context_infostr (interp=0x8ad050, ctx=<optimized out>, is_top=<optimized out>) at src/sub.c:295 #2 0x0000003edd67ebd7 in PDB_get_continuation_backtrace (interp=0x8ad050, ctx=0xaa53b0) at src/debug.c:3663 #3 0x0000003edd68bc50 in Parrot_ex_build_complete_backtrace_string (interp=0x8ad050, ex=0xaab7a0) at src/exceptions.c:702 #4 0x0000003edd6849fc in Parrot_api_get_exception_backtrace (interp_pmc=0x977b10, exception=0xaab7a0, bt=0x7fffffffccc0) at src/embed/api.c:101 #5 0x00000000004014c0 in show_last_error_and_exit (interp=0x977b10) at nqp.c:86738 #6 0x00000000004012bb in main (argc=4, argv=0x7fffffffce28) at nqp.c:86721 Unfortunately that source line is a rather complex macro: #define ADD_OP_VAR_PART(interp, seg, pc, n) do { \ op_lib_t *_core_ops = PARROT_GET_CORE_OPLIB(interp); \ if (… || … || … || …) { \ PMC * const sig = (seg)->const_table->pmc.constants[(pc)[1]]; \ (n) += VTABLE_elements((interp), sig); \ } \ } while (0) Looking at the assembly code: 0x0000003edd6bf8c5 <+549>: je 0x3edd6bf8d4 <…+564> 0x0000003edd6bf8c7 <+551>: cmp 0x118(%rcx),%rsi 0x0000003edd6bf8ce <+558>: jne 0x3edd6bf830 <…+400> 0x0000003edd6bf8d4 <+564>: mov 0x58(%rdx),%rax 0x0000003edd6bf8d8 <+568>: mov 0x8(%r13),%rdx 0x0000003edd6bf8dc <+572>: mov %rbx,%rdi 0x0000003edd6bf8df <+575>: mov 0x78(%rax),%rax 0x0000003edd6bf8e3 <+579>: mov (%rax,%rdx,8),%rsi => 0x0000003edd6bf8e7 <+583>: mov 0x8(%rsi),%rax 0x0000003edd6bf8eb <+587>: callq *0x158(%rax) There appear to be about four different jumps to that <+564> line, so I'd say that's the condition for the "if". <+568> should be the subscript "(pc)[1]". <+575> should compute the address of the "pmc" structure. Then <+579> would be the "constants[…]" subscript. Looking at the registers: rax 0xa9ab40 11119424 rbx 0x8ad050 9097296 rcx 0x3edda4a460 270006527072 rdx 0x51 81 rsi 0x17 23 […] r13 0xa967c0 11102144 […] So %rax looks like an address, %rdx like an offset, but the resulting %rsi doesn't seem to be a valid memory address for the subscript, thus resulting in the segmentation fault. This is likely due to an out of range index into the pmc.constants array: (gdb) p sub->seg->const_table->pmc.constants[((opcode_t *)$r13)[1]] $1 = (PMC *) 0x17 (gdb) p ((opcode_t *)$r13)[1] $2 = 81 (gdb) p sub->seg->const_table->pmc.const_count $3 = 55 Unfortunately the "pc" variable has been optimized out of my code. I guess I might have to recompile parrot without optimization in order to ease debugging.
I have the same problem. $ sudo emerge dev-lang/nqp ... /usr/bin/perl5.16.2 -MExtUtils::Command -e mkpath src/stage2/gen /usr/bin/perl5.16.2 tools/build/gen-cat.pl src/how/Archetypes.pm src/how/RoleToRoleApplier.pm src/how/NQPConcreteRoleHOW.pm src/how/RoleToClassApplier.pm src/how/NQPCurriedRoleHOW.pm src/how/NQPParametricRoleHOW.pm src/how/NQPClassHOW.pm src/how/NQPNativeHOW.pm src/how/NQPAttribute.pm src/how/NQPModuleHOW.pm src/how/EXPORTHOW.pm > src/stage2/gen/nqp-mo.pm /usr/bin/parrot -L. -X. --library=src/stage1 src/stage1/nqp.pbc \ --target=pir --output=src/stage2/gen/nqp-mo.pir \ --setting=NULL src/stage2/gen/nqp-mo.pm /usr/bin/parrot -L. -X. --include=src/stage2 -o src/stage2/nqpmo.pbc \ src/stage2/gen/nqp-mo.pir /usr/bin/parrot -L. -X. --library=src/stage1 src/stage1/nqp.pbc \ --target=pir --output=src/stage2/gen/module_loader.pir \ --setting=NULL src/ModuleLoader.pm /usr/bin/parrot -L. -X. --include=src/stage2 -o src/stage2/ModuleLoader.pbc \ src/stage2/gen/module_loader.pir /usr/bin/perl5.16.2 -MExtUtils::Command -e mkpath src/stage2/gen /usr/bin/perl5.16.2 tools/build/gen-cat.pl src/core/NativeTypes.pm src/core/NQPRoutine.pm src/core/NQPMu.pm src/core/NQPCapture.pm src/core/IO.pm src/core/Regex.pm src/core/Hash.pm src/core/testing.pm src/core/YOUAREHERE.pm > src/stage2/NQPCORE.setting /usr/bin/parrot -L. -X. --library=src/stage1 src/stage1/nqp.pbc \ --target=pir --output=src/stage2/gen/NQPCORE.setting.pir \ --module-path=src/stage2 --setting=NULL src/stage2/NQPCORE.setting /usr/bin/parrot -L. -X. -o src/stage2/NQPCORE.setting.pbc src/stage2/gen/NQPCORE.setting.pir /usr/bin/perl5.16.2 -MExtUtils::Command -e mkpath src/stage2/gen /usr/bin/perl5.16.2 tools/build/gen-cat.pl src/QAST/CompileTimeValue.nqp src/QAST/SpecialArg.nqp src/QAST/Node.nqp src/QAST/Regex.nqp src/QAST/IVal.nqp src/QAST/NVal.nqp src/QAST/SVal.nqp src/QAST/BVal.nqp src/QAST/WVal.nqp src/QAST/Want.nqp src/QAST/Var.nqp src/QAST/VarWithFallback.nqp src/QAST/Op.nqp src/QAST/VM.nqp src/QAST/Stmts.nqp src/QAST/Stmt.nqp src/QAST/Block.nqp src/QAST/Unquote.nqp src/QAST/CompUnit.nqp src/QAST/InlinePlaceholder.nqp > src/stage2/QASTNode.nqp /usr/bin/parrot -L. -X. --library=src/stage1 src/stage1/nqp.pbc \ --target=pir --output=src/stage2/QASTNode.pir --no-regex-lib \ --module-path=src/stage2 --setting-path=src/stage2 src/stage2/QASTNode.nqp /usr/bin/parrot -L. -X. -o src/stage2/QASTNode.pbc src/stage2/QASTNode.pir /usr/bin/perl5.16.2 -MExtUtils::Command -e mkpath src/stage2/gen /usr/bin/perl5.16.2 tools/build/gen-cat.pl src/QRegex/NFA.nqp src/QRegex/Cursor.nqp > src/stage2/QRegex.nqp /usr/bin/parrot -L. -X. --library=src/stage1 src/stage1/nqp.pbc \ --target=pir --output=src/stage2/QRegex.pir --no-regex-lib \ --module-path=src/stage2 --setting-path=src/stage2 src/stage2/QRegex.nqp /usr/bin/parrot -L. -X. -o src/stage2/QRegex.pbc src/stage2/QRegex.pir /usr/bin/perl5.16.2 -MExtUtils::Command -e mkpath src/stage2/gen /usr/bin/perl5.16.2 tools/build/gen-cat.pl src/HLL/Grammar.pm src/HLL/Actions.pm src/HLL/Compiler.pm src/HLL/CommandLine.pm src/HLL/World.pm > src/stage2/gen/NQPHLL.pm /usr/bin/parrot -L. -X. --library=src/stage1 src/stage1/nqp.pbc \ --target=pir --output=src/stage2/gen/NQPHLL.pir --no-regex-lib \ --module-path=src/stage2 --setting-path=src/stage2 src/stage2/gen/NQPHLL.pm /usr/bin/parrot -L. -X. --include=src/stage2 -o src/stage2/NQPHLL.pbc \ src/stage2/gen/NQPHLL.pir /usr/bin/perl5.16.2 -MExtUtils::Command -e mkpath src/stage2/gen /usr/bin/perl5.16.2 tools/build/gen-cat.pl src/QAST/PIRT.nqp src/QAST/Operations.nqp src/QAST/Compiler.nqp > src/stage2/QAST.nqp /usr/bin/parrot -L. -X. --library=src/stage1 src/stage1/nqp.pbc \ --target=pir --output=src/stage2/QAST.pir --no-regex-lib \ --module-path=src/stage2 --setting-path=src/stage2 src/stage2/QAST.nqp /usr/bin/parrot -L. -X. -o src/stage2/QAST.pbc src/stage2/QAST.pir /usr/bin/perl5.16.2 -MExtUtils::Command -e mkpath src/stage2/gen /usr/bin/perl5.16.2 tools/build/gen-cat.pl src/QRegex/P6Regex/Grammar.nqp src/QRegex/P6Regex/Actions.nqp src/QRegex/P6Regex/Compiler.nqp > src/stage2/gen/NQPP6QRegex.pm /usr/bin/parrot -L. -X. --library=src/stage1 src/stage1/nqp.pbc \ --target=pir --output=src/stage2/gen/NQPP6QRegex.pir --no-regex-lib \ --module-path=src/stage2 --setting-path=src/stage2 src/stage2/gen/NQPP6QRegex.pm /usr/bin/parrot -L. -X. --include=src/stage2 -o src/stage2/NQPP6QRegex.pbc \ src/stage2/gen/NQPP6QRegex.pir /usr/bin/perl5.16.2 -MExtUtils::Command -e mkpath src/stage2/gen /usr/bin/perl5.16.2 tools/build/gen-version.pl >src/gen/nqp-config.pm /usr/bin/perl5.16.2 tools/build/gen-cat.pl src/NQP/World.pm src/NQP/Grammar.pm src/NQP/Ops.pm src/NQP/Actions.pm src/NQP/Compiler.pm src/gen/nqp-config.pm > src/stage2/gen/NQP.pm /usr/bin/parrot -L. -X. --library=src/stage1 src/stage1/nqp.pbc \ --target=pir --output=src/stage2/gen/NQP.pir \ --module-path=src/stage2 --setting-path=src/stage2 src/stage2/gen/NQP.pm /usr/bin/parrot -L. -X. --include=src/stage2 -o src/stage2/nqp.pbc \ src/stage2/gen/NQP.pir /usr/bin/perl5.16.2 -MExtUtils::Command -e cp src/stage2/nqpmo.pbc . /usr/bin/perl5.16.2 -MExtUtils::Command -e cp src/stage2/ModuleLoader.pbc . /usr/bin/perl5.16.2 -MExtUtils::Command -e cp src/stage2/NQPCORE.setting.pbc . /usr/bin/perl5.16.2 -MExtUtils::Command -e cp src/stage2/QASTNode.pbc . /usr/bin/perl5.16.2 -MExtUtils::Command -e cp src/stage2/QRegex.pbc . /usr/bin/perl5.16.2 -MExtUtils::Command -e cp src/stage2/NQPHLL.pbc . /usr/bin/perl5.16.2 -MExtUtils::Command -e cp src/stage2/QAST.pbc . /usr/bin/perl5.16.2 -MExtUtils::Command -e cp src/stage2/NQPP6QRegex.pbc . /usr/bin/perl5.16.2 -MExtUtils::Command -e cp src/stage2/nqp.pbc . /usr/bin/pbc_to_exe nqp.pbc x86_64-pc-linux-gnu-gcc -o nqp.o -I"/usr/include/parrot/5.1.0" -march=core2 -O2 -pipe -DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL -DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED -DHASATTRIBUTE_WARN_UNUSED_RESULT -DHASATTRIBUTE_HOT -DHASATTRIBUTE_COLD -DHAS_GETTEXT -I/usr/lib64/libffi-3.0.12/include -c nqp.c Compiled: nqp.o x86_64-pc-linux-gnu-gcc -o nqp "nqp.o" "/usr/lib64/parrot/5.1.0/parrot_config.o" -L"/usr/lib64" -lparrot -Wl,-E -Wl,-O1 -Wl,--as-needed -lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt -lreadline -lffi -L/usr/lib64 -licuuc -licudata Linked: nqp /usr/bin/perl5.16.2 -MExtUtils::Command -e mkpath src/stage2/gen /usr/bin/perl5.16.2 tools/build/gen-cat.pl src/QRegex/P5Regex/Grammar.nqp src/QRegex/P5Regex/Actions.nqp src/QRegex/P5Regex/Compiler.nqp > src/stage2/gen/NQPP5QRegex.pm ./nqp --target=pir --output=src/stage2/gen/NQPP5QRegex.pir \ src/stage2/gen/NQPP5QRegex.pm make: *** [NQPP5QRegex.pbc] Segmentation fault emake failed * ERROR: dev-lang/nqp-2013.02 failed (compile phase): * (no error message) * * Call stack: * ebuild.sh, line 93: Called src_compile * environment, line 2018: Called die * The specific snippet of code: * emake -j1 || die * * If you need support, post the output of `emerge --info '=dev-lang/nqp-2013.02'`, * the complete build log and the output of `emerge -pqv '=dev-lang/nqp-2013.02'`. * The complete build log is located at '/var/tmp/portage/dev-lang/nqp-2013.02/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-lang/nqp-2013.02/temp/environment'. * Working directory: '/var/tmp/portage/dev-lang/nqp-2013.02/work/nqp-2013.02' * S: '/var/tmp/portage/dev-lang/nqp-2013.02/work/nqp-2013.02' >>> Failed to emerge dev-lang/nqp-2013.02, Log file: >>> '/var/tmp/portage/dev-lang/nqp-2013.02/temp/build.log' * Messages for package dev-lang/nqp-2013.02: * ERROR: dev-lang/nqp-2013.02 failed (compile phase): * (no error message) * * Call stack: * ebuild.sh, line 93: Called src_compile * environment, line 2018: Called die * The specific snippet of code: * emake -j1 || die * * If you need support, post the output of `emerge --info '=dev-lang/nqp-2013.02'`, * the complete build log and the output of `emerge -pqv '=dev-lang/nqp-2013.02'`. * The complete build log is located at '/var/tmp/portage/dev-lang/nqp-2013.02/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-lang/nqp-2013.02/temp/environment'. * Working directory: '/var/tmp/portage/dev-lang/nqp-2013.02/work/nqp-2013.02' * S: '/var/tmp/portage/dev-lang/nqp-2013.02/work/nqp-2013.02'
Also with perl5.16.3 I still get the error: /usr/bin/perl5.16.3 -MExtUtils::Command -e mkpath src/stage2/gen /usr/bin/perl5.16.3 tools/build/gen-cat.pl src/QRegex/P5Regex/Grammar.nqp src/QRegex/P5Regex/Actions.nqp src/QRegex/P5Regex/Compiler.nqp > src/stage2/gen/NQPP5QRegex.pm ./nqp --target=pir --output=src/stage2/gen/NQPP5QRegex.pir \ src/stage2/gen/NQPP5QRegex.pm make: *** [NQPP5QRegex.pbc] Segmentation fault
BTW., also nqp-2013.02.1 fails with the same error: root@impala:/usr/local/portage/sci-geosciences(41)# MAKEOPTS="-j1" emerge -v1 nqp .../usr/bin/perl5.16.3 -MExtUtils::Command -e mkpath src/stage2/gen /usr/bin/perl5.16.3 tools/build/gen-cat.pl src/QRegex/P5Regex/Grammar.nqp src/QRegex/P5Regex/Actions.nqp src/QRegex/P5Regex/Compiler.nqp > src/stage2/gen/NQPP5QRegex.pm ./nqp --target=pir --output=src/stage2/gen/NQPP5QRegex.pir \ src/stage2/gen/NQPP5QRegex.pm src/call/context.c:737: failed assertion 'Parrot_pcc_get_regs_used(interp, ctx, REGNO_PMC) > idx' Backtrace - Obtained 23 stack frames (max trace depth is 32). /usr/lib64/libparrot.so.5.1.0(+0x8bd84) [0x7fa374624d84] /usr/lib64/libparrot.so.5.1.0(Parrot_confess+0x49) [0x7fa3745ed1df] ... /usr/lib64/libparrot.so.5.1.0(Parrot_pf_execute_bytecode_program+0x71) [0x7fa37465f131] /usr/lib64/libparrot.so.5.1.0(Parrot_api_run_bytecode+0xd1) [0x7fa374620c21] ./nqp(main+0x170) [0x4013d0] /lib64/libc.so.6(__libc_start_main+0xf5) [0x7fa3742109d5] ./nqp() [0x401481] Attempting to get PIR backtrace. No guarantees. Here goes... make: *** [NQPP5QRegex.pbc] Segmentation fault emake failed * ERROR: dev-lang/nqp-2013.02.1 failed (compile phase):
Today I tried to debug this without going to the assembly level. It seems that this is more of a parrot issue than a nqp issue. If I grab the nqp sourcs from git, I can compile them all right against a manually compiled parrot in my home directory, but will fail to compile it against the system parrot installation. I tried to make the system install and the one in my home directory as similar as possible, in terms of arguments to Configure.pl, but so far the distinction remains. I'm not certain in what ways the ebuild-installed version still differs from my own one. It seems like FEATURE=nostrip won't solve this either. I guess next I'll try writing my own little ebuild for parrot, which does install to some completely different directory, and see how that behaves.
OK, I don't understand things any more. I could reproduce this issue perfectly well. Remerged parrot with CFLAGS="-O0 -ggdb" and it remained. FEATURES=nostrip, even a removal of the --disable-rpath configure switch, all didn't solve this problem. Then I created my own ebuild, unmerged the official parrot as well as nqp and rakudo, then merged my own. nqp did compile. Made my own ebuild increasingly more like the official one, until in the end it was identical. nqp compiled all right. Unmerged my package and emerged parrot again. nqp still compiled. So for anyone still encountering this, please try unmerging nqp, parrot and rakudo, then remerge parrot and see whether that allows nqp to compile. I can't reproduce this any more.
(In reply to comment #15) > So for anyone still encountering this, please try unmerging nqp, parrot and > rakudo, then remerge parrot and see whether that allows nqp to compile. So I tried, and I found nqp-2013.1 prevents the compilation of nqp-2013.02.1. When 2013.1 is present on the system, either freshly compiled or restored from a binary package (quickpkg), the more recent version of nqp won't compile. When nqp is completely removed from the system, nqp-2013.02.1 emerges. When then nqp-2013.02.1 is present on the system, both 2013.1 and 2013.02.1 emerge without problem.
(In reply to comment #16) It helps me too, thanks.
Now it fails with a new error: ... >>> Compiling source in /var/tmp/portage/dev-lang/nqp-2013.02.1/work/nqp-2013.02.1 ... make -j5 -j1 /usr/bin/perl5.16.3 /usr/lib64/parrot/5.1.0/tools/build/pmc2c.pl --no-lines --dump --include src/pmc --include /usr/src/parrot/5.1.0 --include /usr/src/parrot/5.1.0/pmc src/pmc/stable.pmc src/pmc/sixmodelobject.pmc src/pmc/nqplexinfo.pmc src/pmc/nqplexpad.pmc src/pmc/serializationcontext.pmc src/pmc/ownedhash.pmc src/pmc/ownedresizablepmcarray.pmc src/pmc/qrpa.pmc /usr/bin/perl5.16.3 /usr/lib64/parrot/5.1.0/tools/build/pmc2c.pl --no-lines --c --include src/pmc --include /usr/src/parrot/5.1.0 --include /usr/src/parrot/5.1.0/pmc src/pmc/stable.pmc src/pmc/sixmodelobject.pmc src/pmc/nqplexinfo.pmc src/pmc/nqplexpad.pmc src/pmc/serializationcontext.pmc src/pmc/ownedhash.pmc src/pmc/ownedresizablepmcarray.pmc src/pmc/qrpa.pmc /usr/bin/perl5.16.3 /usr/lib64/parrot/5.1.0/tools/build/pmc2c.pl --no-lines --library nqp_group --c src/pmc/stable.pmc src/pmc/sixmodelobject.pmc src/pmc/nqplexinfo.pmc src/pmc/nqplexpad.pmc src/pmc/serializationcontext.pmc src/pmc/ownedhash.pmc src/pmc/ownedresizablepmcarray.pmc src/pmc/qrpa.pmc x86_64-pc-linux-gnu-gcc -c -o nqp_group.o -Isrc/pmc -I/usr/include/parrot/5.1.0 -I/usr/include/parrot/5.1.0/pmc -march=amdfam10 -O2 -pipe -DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL -DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED -DHASATTRIBUTE_WARN_UNUSED_RESULT -DHASATTRIBUTE_HOT -DHASATTRIBUTE_COLD -DHAS_GETTEXT -I/usr/lib64/libffi-3.0.12/include -fPIC -g -falign-functions=16 -funit-at-a-time -fexcess-precision=standard -maccumulate-outgoing-args -Wall -Wextra -Waggregate-return -Wcast-qual -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimport -Winit-self -Winline -Winvalid-pch -Wjump-misses-init -Wlogical-op -Werror=missing-braces -Wmissing-declarations -Wno-missing-format-attribute -Wmissing-include-dirs -Wmultichar -Wpacked -Wpointer-arith -Wreturn-type -Wsequence-point -Wsign-compare -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Werror=undef -Wno-unused -Wvariadic-macros -Wwrite-strings -Wstack-usage=500 -Wc++-compat -Werror=declaration-after-statement -Werror=implicit-function-declaration -Wmissing-prototypes -Werror=nested-externs -Werror=old-style-definition -Werror=strict-prototypes -fvisibility=hidden nqp_group.c cc1: warning: /usr/lib64/libffi-3.0.12/include: No such file or directory [enabled by default] In file included from nqp_group.c:17:0: /usr/include/parrot/5.1.0/parrot/parrot.h:94:19: fatal error: ffi.h: No such file or directory compilation terminated. make: *** [src/pmc/nqp_group.so] Error 1
(In reply to comment #18) > Now it fails with a new error: > ... > >>> Compiling source in /var/tmp/portage/dev-lang/nqp-2013.02.1/work/nqp-2013.02.1 ... ... > cc1: warning: /usr/lib64/libffi-3.0.12/include: No such file or directory > [enabled by default] > In file included from nqp_group.c:17:0: > /usr/include/parrot/5.1.0/parrot/parrot.h:94:19: fatal error: ffi.h: No such > file or directory > compilation terminated. > make: *** [src/pmc/nqp_group.so] Error 1 After reemerging parrot it fails with again with: ./nqp --target=pir --output=src/stage2/gen/NQPP5QRegex.pir \ src/stage2/gen/NQPP5QRegex.pm src/call/context.c:737: failed assertion 'Parrot_pcc_get_regs_used(interp, ctx, REGNO_PMC) > idx' ... /usr/lib64/libparrot.so.5.1.0(Parrot_api_run_bytecode+0xd1) [0x7f5172b4dc21] ./nqp(main+0x170) [0x4013d0] /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f517273d9d5] ./nqp() [0x401481] Attempting to get PIR backtrace. No guarantees. Here goes... make: *** [NQPP5QRegex.pbc] Segmentation fault
Apparently the "condor-style" issue (without the assertion error) can be resolved by unmerging and remerging stuff, parrot and nqp in particular, whereas the "impala-style" issue with the failed assertion remains a mystery, particularly to those who can't reproduce it. But the failed exception lies within parrot as well, so it is unclear how much nqp is to blame.
Now with nqp-2013.03, I also get the failed assertion. ./nqp --target=pir --output=src/stage2/gen/NQPP5QRegex.pir \ src/stage2/gen/NQPP5QRegex.pm src/call/context.c:708: failed assertion 'Parrot_pcc_get_regs_used(interp, ctx, REGNO_STR) > idx' Backtrace - Obtained 23 stack frames (max trace depth is 32). /usr/lib64/libparrot.so.5.1.0(+0x94644) [0x7fb3abd53644] [...] /usr/lib64/libparrot.so.5.1.0(Parrot_api_run_bytecode+0xd2) [0x7fb3abd4f0b2] ./nqp(main+0x179) [0x401379] /lib64/libc.so.6(__libc_start_main+0xfd) [0x7fb3a8ed94bd] ./nqp() [0x401429] Attempting to get PIR backtrace. No guarantees. Here goes... make: *** [NQPP5QRegex.pbc] Erreur 1 emake failed
Thanks Martin (In reply to comment #15) ... > So for anyone still encountering this, please try unmerging nqp, parrot and > rakudo, then remerge parrot and see whether that allows nqp to compile. I > can't reproduce this any more. This helps me temporarily. After deleting the old nqp I could emerge nqp-2013.02.1 on all systems (condor, impala etc). But then today the upgrade to nqp-2013.03 fails again with "failed assertion 'Parrot_pcc_get_regs_used(interp, ctx, REGNO_STR) > idx'". Deleting nqp-2013.02.1 helps again to emerge nqp-2013.03.
(In reply to comment #22) > But then today the upgrade to nqp-2013.03 fails again with > "failed assertion 'Parrot_pcc_get_regs_used(interp, ctx, REGNO_STR) > idx'". Same here. Did an strace of the whole emerge process and its children, and had a look for access to files owned by the previous installation of nqp. This turned up: # grep -E '(^execv|ModuleLoader)' /tmp/nqpst.11079 execve("./nqp", ["./nqp", "--target=pir", "--output=src/stage2/gen/NQPP5QRegex.pir", "src/stage2/gen/NQPP5QRegex.pm"], [/* 279 vars */]) = 0 stat("/usr/lib64/parrot/5.1.0/library/ModuleLoader.pbc", {st_…}) = 0 [ stat call repeated 5 times, so executed 6 times over all ] open("/usr/lib64/parrot/5.1.0/library/ModuleLoader.pbc", O_RDONLY) = 3 So even though there is a file called ModuleLoader.pbc in the current source directory, the bootstrapping nqp will still load the version installed by a previous nqp installation. Renaming that file let the installation succeed. Sometimes I whish there was a way to use sandbox to simply hide the existence of installed files, i.e. have its stat and open calls return ENOENT. But I guess the proper solution would be figuring out how to fix the parrot library path in nqp so that it gives precedence to the current directory, at least in this case.
seems like too old