Skip to content
Browse files

Install Rakudo NQP libs to Perl6 home

The Rakudo NQP files were previously installed into NQP_HOME/lib. That
creates problems when installing Rakudo and NQP into different prefixes.
In that case rakudo ends up putting the files into a separate folder from
NQP because of the different prefix. This in turn causes the concept of
NQP home and Perl6 home to fall apart, as the NQP libs in rakudos home are
neither in the NQP home folder, nor the Rakudo home folder.
We solve this by just installing Rakudos compiled NQP files into Perl6
home. The distinction is then not anymore "If it's written in NQP put it in
NQP home, if in Perl 6 into Perl6 home." but instead "If it's part of NQP
put it in NQP home, if it's part of Rakudo put it in Perl6 home." See
#2919 (comment)
and following for the discussion surrounding this change.
  • Loading branch information...
patzim committed May 31, 2019
1 parent 83f6256 commit 34476c3a95376d2a2846fadcfa875b0363cd2986
Showing with 5 additions and 6 deletions.
  1. +5 −6 tools/templates/moar/
@@ -14,8 +14,7 @@ MOAR_PREFIX = @nfp(@moar::prefix@)@
# MOAR and M_NQP are only used in command lines, ok to quote
MOAR = @nfpq(@moar::bindir@/moar@moar::exe@)@
M_NQP = @nfpq(@m_nqp@)@
M_LIBDEFPATH = $(PREFIX)@nfp(/share/nqp/lib)@
M_LIBPATH = $(LIBDIR)@nfp(/nqp/lib)@
M_LIBDIR = $(PERL6_HOME)@nfp(/lib)@
M_NQP_LIBDIR = @nqp::libdir@
M_INCPATH = $(MOAR_PREFIX)@nfp(/include)@
@@ -29,7 +28,7 @@ M_MOAR_INC_PATHS = \
$(M_CCINC)@nfpq($(M_INCPATH)/libtommath)@ \

M_RUN_PERL6 = $(MOAR) --libpath=@nfpq($(BASE_DIR)/blib)@ --libpath=@q($(M_NQP_LIBDIR))@ --libpath=@q($(M_LIBPATH))@ perl6.moarvm --nqp-lib=@nfpq($(BASE_DIR)/blib)@
M_RUN_PERL6 = $(MOAR) --libpath=@nfpq($(BASE_DIR)/blib)@ --libpath=@q($(M_NQP_LIBDIR))@ perl6.moarvm --nqp-lib=@nfpq($(BASE_DIR)/blib)@

M_BAT = @runner_suffix@
M_BAT_RUNNER = perl6-m@runner_suffix@
@@ -328,9 +327,9 @@ m-sometests: m-all

m-install: m-all @@script(install-core-dist.p6)@@ $(SETTING_MOAR)
$(MKPATH) @nfpq($(DESTDIR)$(PREFIX)/bin)@
$(MKPATH) @nfpq($(DESTDIR)$(M_LIBPATH)/Perl6)@
$(MKPATH) @nfpq($(DESTDIR)$(M_LIBDIR)/Perl6)@
$(CP) $(M_PERL6_LANG_OUTPUT) @nfpq($(DESTDIR)$(M_LIBDIR)/Perl6)@
$(MKPATH) @nfpq($(DESTDIR)$(PERL6_HOME)/lib)@
$(MKPATH) @nfpq($(DESTDIR)$(PERL6_HOME)/runtime)@
$(M_RUN_CLEAN_TARGET_FILES) $(SETTING_MOAR) @for_specs($(SETTING_@ucspec@_MOAR) )@$(R_SETTING_MOAR) @nfpq($(DESTDIR)$(PERL6_HOME)/runtime)@

0 comments on commit 34476c3

Please sign in to comment.
You can’t perform that action at this time.