Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 510706 - dev-lang/rakudo - moarvm hardcodes wrong paths
Summary: dev-lang/rakudo - moarvm hardcodes wrong paths
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-19 05:06 UTC by OGINO Masanori
Modified: 2016-12-28 15:11 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
A patched moarvm live ebuild. (moarvm-9999.ebuild,748 bytes, text/plain)
2014-08-22 07:38 UTC, FireFish5000
Details
A patched moarvm 2014.07 ebuild. (moarvm-2014.07.ebuild,682 bytes, text/plain)
2014-08-22 07:58 UTC, FireFish5000
Details
A patch for moarvm-2014.09.ebuild to address the problem (moarvm.patch,379 bytes, patch)
2014-09-20 22:25 UTC, OGINO Masanori
Details | Diff
A patch for nqp-2014.09.ebuild to use ${EPREFIX} (nqp.patch,723 bytes, patch)
2014-10-16 13:22 UTC, OGINO Masanori
Details | Diff
A patch for rakudo-2014.09.ebuild to use ${EPREFIX} (rakudo.patch,627 bytes, patch)
2014-10-16 13:23 UTC, OGINO Masanori
Details | Diff
A patch for moarvm-2015.06 to fix the bug. (moarvm-2015.06.patch,386 bytes, patch)
2015-06-20 03:18 UTC, OGINO Masanori
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description OGINO Masanori 2014-05-19 05:06:43 UTC
Latest version (2014.04) of Rakudo Star supports MoarVM backend. However, on Portage, nqp already has had moar USE flag but Rakudo hasn't. It's nice if we can run Rakudo + MoarVM on Gentoo.

(Note: I tried to build Rakudo + MoarVM with modified rakudo-2014.04.ebuild, but the installed binary is broken; paths to ${D}/usr/... are embedded somewhere.)

Reproducible: Always
Comment 1 Patrick Lauer gentoo-dev 2014-05-26 03:39:55 UTC
+  26 May 2014; Patrick Lauer <patrick@gentoo.org> +rakudo-2014.05.ebuild,
+  metadata.xml:
+  Bump, add moarvm support


I've also noticed the broken paths with moar, so that's a bit annoying ...
Comment 2 FireFish5000 2014-08-22 07:38:28 UTC
Created attachment 383318 [details]
A patched moarvm live ebuild.

I believe this bug report belongs to dev-lang/moarvm.
Both of the ebuilds for dev-lang/moarvm have 
    perl Configure.pl --prefix="${D}/usr"|| die
in their src_configure. which should(probably) be 
    perl Configure.pl --prefix="/usr"|| die
The attached moarvm live ebuild has been working for me (minimal testing).
Note, however, that I am using live ebuilds for rakudo, nqp, and moarvm. So further changes may be needed for non-live installs. (assuming that I am not mistaking this bug for another one).
Comment 3 FireFish5000 2014-08-22 07:58:29 UTC
Created attachment 383320 [details]
A patched moarvm 2014.07 ebuild.

Tested with rakudo and nqp 2014.07 ebuilds.
Correction on the problem, it is both the src_configure and src_install.
the src_install needed DESTDIR to be set to the temporary install location.
## dev-lang/moarvm
src_configure() {
    perl Configure.pl --prefix="/usr"|| die
}
src_install() {
    emake DESTDIR="${ED}" install
}
Comment 4 OGINO Masanori 2014-08-25 02:22:05 UTC
(In reply to FireFish5000 from comment #2)
>     perl Configure.pl --prefix="/usr"|| die

For Gentoo Prefix, --prefix="${EPREFIX}/usr" might be better, right?
Comment 5 FireFish5000 2014-08-25 07:37:38 UTC
(In reply to OGINO Masanori from comment #4)
> (In reply to FireFish5000 from comment #2)
> >     perl Configure.pl --prefix="/usr"|| die
> 
> For Gentoo Prefix, --prefix="${EPREFIX}/usr" might be better, right?

I would imagine so, however, a similar change would be needed for the nqp and rakudo ebuilds (If they haven't been changed already on your portage tree).

Although I am not a Gentoo developer(nor a Prefix user), I would suggest that you try it and see. (It sounds correct to me)
Comment 6 OGINO Masanori 2014-09-20 22:25:16 UTC
Created attachment 385206 [details, diff]
A patch for moarvm-2014.09.ebuild to address the problem
Comment 7 OGINO Masanori 2014-09-20 22:28:07 UTC
I confirmed that src_configure with ${EPREFIX} and src_install with ${D} (used in the default src_install) works with both Gentoo Linux (amd64) and Gentoo Prefix (on amd64 Linux).
Comment 8 OGINO Masanori 2014-09-20 22:31:22 UTC
(In reply to OGINO Masanori from comment #7)
> I confirmed that src_configure with ${EPREFIX} and src_install with ${D}
> (used in the default src_install) works with both Gentoo Linux (amd64) and
> Gentoo Prefix (on amd64 Linux).

As FireFish5000 said, NQP and Rakudo also need to patch to work with Prefix. Should I make separated issues to fix the problems in NQP and Rakudo, or is it ok to attach patches for them to this issue too?
Comment 9 mephinet 2014-10-10 22:26:13 UTC
(In reply to OGINO Masanori from comment #6)
> Created attachment 385206 [details, diff] [details, diff]

The attached patch fixed the issue, at least for me, a non-prefix-user.
Comment 10 OGINO Masanori 2014-10-16 13:22:41 UTC
Created attachment 386764 [details, diff]
A patch for nqp-2014.09.ebuild to use ${EPREFIX}
Comment 11 OGINO Masanori 2014-10-16 13:23:15 UTC
Created attachment 386766 [details, diff]
A patch for rakudo-2014.09.ebuild to use ${EPREFIX}
Comment 12 OGINO Masanori 2014-10-16 13:25:27 UTC
I attached patches for NQP and Rakudo. (Let me know if I should create new bugs for them)
Comment 13 OGINO Masanori 2015-06-20 03:18:51 UTC
Created attachment 405392 [details, diff]
A patch for moarvm-2015.06 to fix the bug.
Comment 14 OGINO Masanori 2015-06-20 03:24:55 UTC
(In reply to OGINO Masanori from comment #13)
> Created attachment 405392 [details, diff] [details, diff]
> A patch for moarvm-2015.06 to fix the bug.

NQP and Rakudo use /usr on configure phase and ${ED} on install phase, so new patch also does. Does it make sense?
Comment 15 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2015-10-17 15:16:57 UTC
Tis a bit unfortunate.

 $ perl6-m -e 'say <<ok>>' 
Could not find Perl6::BOOTSTRAP in any of:
  .
  blib
  /var/tmp/portage/dev-lang/moarvm-2015.07/image/usr/share/perl6/lib
  /var/tmp/portage/dev-lang/moarvm-2015.07/image/usr/share/nqp/lib
...
Comment 16 Patrick Lauer gentoo-dev 2016-02-09 09:40:54 UTC
Applied to 2016.01. Looks good to me, thanks for figuring this out
Comment 17 Ruslan Osmanov 2016-02-22 05:38:08 UTC
(In reply to Patrick Lauer from comment #16)
> Applied to 2016.01. Looks good to me, thanks for figuring this out

$ perl6-m -e 'say <<ok>>' 
While looking for '/var/tmp/portage/dev-lang/moarvm-2016.01/image/usr/share/nqp/lib/Perl6/BOOTSTRAP.moarvm': no such file or directory
   at gen/moar/m-ModuleLoader.nqp:93  (/usr/share/nqp/lib/Perl6/ModuleLoader.moarvm::69)
Comment 18 Ruslan Osmanov 2016-03-07 04:12:18 UTC
Hmm, I've depclean'd dev-lang/moarvm, dev-lang/nqp and dev-lang/rakudo, then emerged virtual/perl6-0. Then it worked!

Previously, I had installed dev-lang/moarvm, dev-lang/nqp and dev-lang/rakudo manually. There should be some sort of issue with the emerge order.
Comment 19 Ruslan Osmanov 2016-03-08 18:07:19 UTC
Oops, virtual/perl6 was from perl6 overlay (which seems outdated, btw).
Comment 20 OGINO Masanori 2016-03-25 10:49:41 UTC
The problem has been fixed now, so I guess it is time to fix this bug, isn't it?

$ perl6 --version
This is Rakudo version 2016.03 built on MoarVM version 2016.03
implementing Perl 6.c.
$ perl6 -e 'say <<ok>>'
ok
Comment 21 Andreas K. Hüttel archtester gentoo-dev 2016-12-28 15:11:45 UTC
(In reply to OGINO Masanori from comment #20)
> The problem has been fixed now, so I guess it is time to fix this bug, isn't
> it?
> 
> $ perl6 --version
> This is Rakudo version 2016.03 built on MoarVM version 2016.03
> implementing Perl 6.c.
> $ perl6 -e 'say <<ok>>'
> ok

OK, acting on this. Otherwise please reopen.