Installation of Perl6 fails, no registered operation handler - raku

I'm trying to install Perl6 thus:
perl Configure.pl --backend=jvm --gen-nqp
and then the traditional make & make install
the latter-most of which gives this error:
== Installing modules for JVM
cd modules/zef && sh -c "PATH='/illumina/runs/Scripts/perl6/rakudo-star-2018.10/install/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/illumina/runs/RNASeq/stringtie-1.3.3b.Linux_x86_64:/illumina/runs/RNASeq/subread-1.6.0-Linux-x86_64/bin:/illumina/runs/RNASeq/STAR-master/bin/Linux_x86_64:/illumina/runs/RNASeq/hisat2-2.1.0:/home/703404669/Scripts/vcftools-vcftools-ea875e2/src/cpp:/illumina/runs/RNASeq/FastQC:/home/703404669/.local/bin:/home/703404669/bin' /illumina/runs/Scripts/perl6/rakudo-star-2018.10/install/bin/perl6-j -Ilib bin/zef install ."
===SORRY!===
Error while compiling op nativecallinvoke, no registered operation handler
make: *** [modules-install-j] Error 1
I am still a newbie with Perl6, I have no idea how to deal with this error, and it doesn't show up on search engines.
How can I get past this error to install perl6?

The JVM backend has not received quite the amount of love that the MoarVM backend has and is known to have problems (although I'm surprised to see it is this bad).
Is there a reason why you would not like to use the MoarVM backend? If you don't have a reason, you could try changing the --backend=jvm parameter to --gen-moar, which would then fetch and build the MoarVM backend for you automagically.

Related

`Missing or wrong version of dependency` after recompiling nqp

I am trying to learn myself how to debug rakudo and nqp. So this is my first attempt:
cd $HOME/debug
git clone https://github.com/rakudo/rakudo.git
cd rakudo
perl Configure.pl --gen-moar --gen-nqp --backends=moar
make
make install # installs into ./install/bin
export PATH=${PWD}/install/bin:$PATH
export PATH=${PWD}/install/share/perl6/site/bin:$PATH
# Testing executable:
perl6 --version
# This is Rakudo version 2018.12-256-g9517c3779 built on MoarVM version 2018.12-36-g34fac5f4e
# implementing Perl 6.d.
#
# Now modifying an nqp file:
cd nqp
# Change a file: E.g. : vim src/HLL/Compiler.nqp
# I added a line after line 293 in src/HLL/Compiler.nqp:
# nqp::say("*** Debugging message: HLL::Compiler::command_eval() ***");
# and save it
make
make install
# Testing perl6 again..
perl6 --version
The last command now gives the following exception:
Unhandled exception: Missing or wrong version of dependency 'gen/moar/stage2/NQPHLL.nqp' (from 'src/Perl6/Pod.nqp')
at <unknown>:1 (/home/hakon/debug/rakudo/install/share/nqp/lib/Perl6/Pod.moarvm:<dependencies+deserialize>)
from src/vm/moar/ModuleLoader.nqp:47 (/home/hakon/debug/rakudo/install/share/nqp/lib/ModuleLoader.moarvm:)
from src/vm/moar/ModuleLoader.nqp:40 (/home/hakon/debug/rakudo/install/share/nqp/lib/ModuleLoader.moarvm:load_module)
from <unknown>:1 (/home/hakon/debug/rakudo/install/share/nqp/lib/Perl6/Actions.moarvm:<dependencies+deserialize>)
from src/vm/moar/ModuleLoader.nqp:47 (/home/hakon/debug/rakudo/install/share/nqp/lib/ModuleLoader.moarvm:)
from src/vm/moar/ModuleLoader.nqp:40 (/home/hakon/debug/rakudo/install/share/nqp/lib/ModuleLoader.moarvm:load_module)
from <unknown>:1 (/home/hakon/debug/rakudo/install/share/nqp/lib/Perl6/Grammar.moarvm:<dependencies+deserialize>)
from src/vm/moar/ModuleLoader.nqp:47 (/home/hakon/debug/rakudo/install/share/nqp/lib/ModuleLoader.moarvm:)
from src/vm/moar/ModuleLoader.nqp:40 (/home/hakon/debug/rakudo/install/share/nqp/lib/ModuleLoader.moarvm:load_module)
from <unknown>:1 (/home/hakon/debug/rakudo/install/share/perl6/runtime/perl6.moarvm:<dependencies+deserialize>)
h
So I thought, maybe I need to run make on rakudo also:
cd ..
make
but here make fails with:
/home/hakon/perlbrew/perls/perl-5.29.3/bin/perl5.29.3 tools/build/check-nqp-version.pl /home/hakon/debug/rakudo/install/bin/nqp-m
/home/hakon/debug/rakudo/install/bin/nqp-m tools/build/gen-cat.nqp moar src/vm/moar/ModuleLoaderVMConfig.nqp src/Perl6/ModuleLoader.nqp > gen/moar/ModuleLoader.nqp
/home/hakon/debug/rakudo/install/bin/nqp-m --module-path=blib --target=mbc --output=blib/Perl6/ModuleLoader.moarvm \
gen/moar/ModuleLoader.nqp
*** Debugging message: HLL::Compiler::command_eval() ***
Confused at line 2, near "*** Debugg"
at gen/moar/stage2/NQPHLL.nqp:811 (/home/hakon/debug/rakudo/install/share/nqp/lib/NQPHLL.moarvm:panic)
from gen/moar/stage2/NQP.nqp:921 (/home/hakon/debug/rakudo/install/share/nqp/lib/nqp.moarvm:comp_unit)
from gen/moar/stage2/NQP.nqp:782 (/home/hakon/debug/rakudo/install/share/nqp/lib/nqp.moarvm:TOP)
from gen/moar/stage2/QRegex.nqp:2300 (/home/hakon/debug/rakudo/install/share/nqp/lib/QRegex.moarvm:parse)
from gen/moar/stage2/NQPHLL.nqp:2031 (/home/hakon/debug/rakudo/install/share/nqp/lib/NQPHLL.moarvm:parse)
from gen/moar/stage2/NQPHLL.nqp:1951 (/home/hakon/debug/rakudo/install/share/nqp/lib/NQPHLL.moarvm:execute_stage)
from gen/moar/stage2/NQPHLL.nqp:1984 (/home/hakon/debug/rakudo/install/share/nqp/lib/NQPHLL.moarvm:run)
from gen/moar/stage2/NQPHLL.nqp:1976 (/home/hakon/debug/rakudo/install/share/nqp/lib/NQPHLL.moarvm:)
from gen/moar/stage2/NQPHLL.nqp:1971 (/home/hakon/debug/rakudo/install/share/nqp/lib/NQPHLL.moarvm:compile)
from gen/moar/stage2/NQPHLL.nqp:1666 (/home/hakon/debug/rakudo/install/share/nqp/lib/NQPHLL.moarvm:eval)
from gen/moar/stage2/NQPHLL.nqp:1889 (/home/hakon/debug/rakudo/install/share/nqp/lib/NQPHLL.moarvm:evalfiles)
from gen/moar/stage2/NQPHLL.nqp:1849 (/home/hakon/debug/rakudo/install/share/nqp/lib/NQPHLL.moarvm:command_eval)
from gen/moar/stage2/NQPHLL.nqp:1773 (/home/hakon/debug/rakudo/install/share/nqp/lib/NQPHLL.moarvm:command_line)
from gen/moar/stage2/NQP.nqp:4135 (/home/hakon/debug/rakudo/install/share/nqp/lib/nqp.moarvm:MAIN)
from gen/moar/stage2/NQP.nqp:1 (/home/hakon/debug/rakudo/install/share/nqp/lib/nqp.moarvm:<mainline>)
from <unknown>:1 (/home/hakon/debug/rakudo/install/share/nqp/lib/nqp.moarvm:<main>)
from <unknown>:1 (/home/hakon/debug/rakudo/install/share/nqp/lib/nqp.moarvm:<entry>)
make: *** [Makefile:457: blib/Perl6/ModuleLoader.moarvm] Error 1
A Rakudo build is statically "linked" against libraries in the NQP build used to produce it, and therefore Rakudo will need to be rebuilt after modifying NQP. Hashing is used to ensure that the wrong version of a dependency is never used; if this situation was not detected, there's a high chance of extremely strange failure modes.
The second failure is because the Rakudo build uses some NQP scripts to preprocess some source files, which are then fed to the NQP of Perl 6 compiler. It uses > to redirect the output into a file. Therefore, your debug output will be redirected into that file, and then - since it is not valid source code - cause a build error. The solution is to always produce debug output on stderr instead, for example using note.

Version number mismatch: inconsistency between gmp.h and libgmp

I was trying to install NTL library on ubuntu, and after using "make", I get this error :
GMP version check (6.0.0/6.1.0)
*** version number mismatch: inconsistency between gmp.h and libgmp
Aborted (core dumped)
makefile:346: recipe for target 'setup3' failed
make[1]: *** [setup3] Error 134
make[1]: Leaving directory '/mnt/c/Users/pc-admin/ntl-11.0.0/ntl-11.0.0/src'
makefile:310: recipe for target 'setup-phase' failed
make: *** [setup-phase] Error 2
I saw the posts
https://gmplib.org/list-archives/gmp-discuss/2009-March/003663.html
http://www.mpfr.org/faq.html#undef_ref1
But still that didnt quite help.
Currently my usr/local/lib has
XXX#SECURE2:/usr/local/lib$ ls
libgmp.a libgmp.so libgmp.so.23.0.3 libmpfr.la libmpfr.so.6 libmpir.a libmpir.so libmpir.so.23.0.3 python3.5
libgmp.la libgmp.so.23 libmpfr.a libmpfr.so libmpfr.so.6.0.1 libmpir.la libmpir.so.23 pkgconfig
and /usr/local/include has
XXX#SECURE2:/usr/local/include$ ls
gmp.h mpf2mpfr.h mpfr.h mpir.h
Tried changing environment paths as
C_INCLUDE_PATH=usr/local/include
LIBRARY_PATH=usr/local/lib
LD_LIBRARY_PATH=usr/local/lib
Somehow I don't understand how to solve. Any help would be highly appreciated! Thanks for your patience
I encountered this problem today when I installed GMP after NTL Makefile lets me do so.
The following command seems to help:
sudo ldconfig
I met the same problem.It was because of the library's version.
First I installed gmp-6.1.2(using configure,make,make install command),and then I downloaded ntl-11.3.2,input configure and make commands.And the problem appeared:
GMP version check (6.1.2/6.1.0)
*** version number mismatch: inconsistency between gmp.h and libgmp
Aborted (core dumped)
makefile:353: recipe for target 'setup3' failed
I guessed maybe I need to install gmp 6.1.0.So I first entered gmp-6.1.2 directory,using command sudo make uninstall,then downloaded gmp-6.1.0 and the problem was solved.
Maybe you can have a try uninstalling gmp 6.0.0,installing 6.1.0.
I figured out a solution, start again and let the Wizard figure it out.
First, get rid of everything we did before
make clobber
./configure
Then edit the makefile and enable the wizard (around line 128)
#WIZARD=off
WIZARD=on

Missing linux/types.h failing to install gem

I'm getting an error trying to install eventmachine on my ubuntu 12.04 server. Any ideas?
bundle exec gem install eventmachine
Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
/opt/ruby-enterprise-1.8.7-2012.02/bin/ruby extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... no
checking for inotify_init() in sys/inotify.h... yes
checking for writev() in sys/uio.h... yes
checking for rb_thread_check_ints()... no
checking for rb_time_new()... yes
checking for sys/event.h... no
checking for epoll_create() in sys/epoll.h... yes
creating Makefile
make
g++ -I. -I/opt/local/include -I. -I/opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/1.8/i686-linux -I. -DWITH_SSL -DBUILD_FOR_RUBY -DHAVE_INOTIFY_INIT -DHAVE_INOTIFY -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_EPOLL_CREATE -DHAVE_EPOLL -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -c binder.cpp
In file included from /usr/include/i386-linux-gnu/bits/sigcontext.h:28:0,
from /usr/include/signal.h:339,
from project.h:40,
from binder.cpp:20:
/usr/include/i386-linux-gnu/asm/sigcontext.h:5:25: fatal error: linux/types.h: No such file or directory
compilation terminated.
make: *** [binder.o] Error 1
I've just run into the same problem. Either the path for types.h is different on your distribution, or it does not exist at all. Try to manually include it.
http://linux.die.net/include/sys/types.h
Your program is going to give you a file, and line number error where it is trying to "include" types.h. What I did to solve the problem, was add types.h into the same folder as the file requesting it. Then you go into the file, on the line that the include error is, and replace the path of (for example) "/linux/types.h", with "types.h" since you have it in the same directory. Now, make, make install. If you receive another include issue, you might want to consider either changing flavors, or if you feel up to it, keep adding includes. Welcome to the wonderful world of hacking. :)

How to compile rabbitmq-c library on Mac OS X?

I'm failing to compiled the rabbitmq-c library on Mac OS 10.6.6
I intend to build the php-ampq extension against it.
I've tried both the latest branch of rabbitmq-c and rabbitmq-codegen according to the instructions here and the specific branches according to the instructions here.
Running autoreconf -i as per instructions I get:
glibtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
glibtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
glibtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:12: installing `./config.sub'
configure.ac:12: required file `./ltmain.sh' not found
configure.ac:3: installing `./missing'
configure.ac:3: installing `./install-sh'
configure.ac:12: installing `./config.guess'
examples/Makefile.am: installing `./depcomp'
autoreconf: automake failed with exit status: 1
Running simply autoconf I get:
configure.ac:3: error: possibly undefined macro: AM_INIT_AUTOMAKE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:12: error: possibly undefined macro: AM_PROG_LIBTOOL
configure.ac:90: error: possibly undefined macro: AM_CONDITIONAL
Most of what I can find by searching online suggests I don't have libtool or automake. I have both.
I'm afraid I'm out of my depth with autoconf, so I don't know how/where to alter configure.ac, or whether the warning is anything do with the missing ltmain.sh file.
I solved the same problem by installing pkg-config:
sudo port install pkgconfig

How do i build cassandra-pdo (cassandra pdo driver)?

I have studied the document http://code.google.com/a/apache-extras.org/p/cassandra-pdo/source/browse/README.md. When I build config.m4 I get this error:
./config.m4: line 1: syntax error near unexpected token `pdo-cassandra,'
./config.m4: line 1: `PHP_ARG_WITH(pdo-cassandra, whether to enable PDO cassandra support,'
Why? Should I use another parser to read config.m4?
These steps work for me on Ubuntu:
apt-get install libboost-all-dev php5-dev libpcre3-dev pkg-config libthrift-dev
phpize
./configure
make
make install
I'll get the docs updated to include these steps. Hopefully we can put together some binary packages some time soon.