Bug 1436000

Summary: Fail to find tests with rakudo but work correctly with rakudo-star
Product: [Fedora] Fedora Reporter: Julien Enselme <jujens>
Component: rakudoAssignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: bugzilla.redhat, gp, ppisar, steve
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rakudo-0.2017.01-7.fc27 rakudo-0.2017.01-6.fc25 rakudo-0.2017.01-7.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-01 00:25:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Julien Enselme 2017-03-26 15:24:36 UTC
Description of problem: when I update my system, rakudo-start is replaced by rakudo. After this replacement, I am not able to launch tests on a perl6 project. This always happen (tested on two computers and after a fresh clone).


Version-Release number of selected component (if applicable): 0.2017.01-5.fc25


How reproducible: Launch tests in the project folder with `prove -e perl6 -lrv t/`


Steps to Reproduce:
1. cd PROJECT_FOLDER
2. prove -e perl6 -lrv t/

Actual results:
t/interpreter.t .. ===SORRY!===
Could not find Test at line 2 in:
    /home/jenselme/.perl6
    /usr/share/perl6/site
    /usr/share/perl6/vendor
    /usr/share/perl6
    CompUnit::Repository::AbsolutePath<94551975258560>
    CompUnit::Repository::NQP<94551968869128>
    CompUnit::Repository::Perl5<94551968869168>
Dubious, test returned 1 (wstat 256, 0x100)
No subtests run 

Test Summary Report
-------------------
t/interpreter.t (Wstat: 256 Tests: 0 Failed: 0)
  Non-zero exit status: 1
  Parse errors: No plan found in TAP output
Files=1, Tests=0,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.06 cusr  0.01 csys =  0.08 CPU)
Result: FAIL


Expected results: All tests found and launched correctly
t/interpreter.t .. 
ok 1 - 
ok 2 - 
ok 3 - 
ok 4 - 
ok 5 - 
ok 6 - 
ok 7 - Invalid syntax
ok 8 - Invalid syntax
ok 9 - Invalid syntax
ok 10 - Invalid character
ok 11 - Invalid syntax
ok 12 - Invalid syntax
ok 13 - Invalid syntax
ok 14 - Invalid syntax
ok 15 - Invalid syntax
ok 16 - Invalid syntax
ok 17 - Invalid syntax
ok 18 - Invalid syntax
ok 19 - Invalid syntax
1..19
ok
All tests successful.
Files=1, Tests=19,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.28 cusr  0.02 csys =  0.31 CPU)
Result: PASS



Additional info:
- I am using these packages:
  - rakudo-0.2017.01-5.fc25 (x86_64)
  - rakudo-start-0.0.2017.01-2.fc25 (x86_64)
- The project is available here: https://framagit.org/Jenselme/pascal-interpreter-in-perl6
- I see no package named Test with `dnf search perl6`

Comment 1 Petr Pisar 2017-03-27 09:15:57 UTC
This is because rakudo provides rakudo only. No Perl6 modules. rakudo-star provides some Perl6 modules in addition (like the Test module). That's why I raised a warning when reviewing rakudo that rakudo should no obsolete rakudo-star because it's not a superset.

We should package those modules separately.

Comment 2 Julien Enselme 2017-03-27 11:25:09 UTC
This is expected then.

> We should package those modules separately.

I don't intend to maintain these packages, but if I can help with the review, let me know.

Comment 3 Petr Pisar 2017-03-28 14:32:07 UTC
Actually the modules are there. The problem is they are looked up in a wrong path. It looks like the /usr/share prefix is baked into more places:

$ head /usr/lib64/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E
use MONKEY-GUTS;          # Allow NQP ops.

unit module Test;
# Copyright (C) 2007 - 2017 The Perl Foundation.

# settable from outside
my int $perl6_test_times = ?%*ENV<PERL6_TEST_TIMES>;
my int $die_on_fail      = ?%*ENV<PERL6_TEST_DIE_ON_FAIL>;

# global state

while an attempt to use Test module reports:

$ perl6 -e 'use Test;'
===SORRY!===
Could not find Test at line 1 in:
    /home/test/.perl6
    /usr/share/perl6/site
    /usr/share/perl6/vendor
    /usr/share/perl6
    CompUnit::Repository::AbsolutePath<94424416308176>
    CompUnit::Repository::NQP<94424411272664>
    CompUnit::Repository::Perl5<94424411272704>

Comment 4 Petr Pisar 2017-03-28 15:37:48 UTC
The share constant comes from various places, usually as nqp::backendconfig<prefix>  ~ '/share/...'. The nqp::backendconfig<prefix> comes from nqp package, specifically from nqp's Configure.pl executed when building nqp.

I think we should use nqp::backendconfig<libdir> because it contains a value defined as %{_libdir} in the spec file.

Comment 5 Petr Pisar 2017-03-28 15:54:54 UTC
(In reply to Petr Pisar from comment #4)
> The nqp::backendconfig<prefix>
> comes from nqp package, specifically from nqp's Configure.pl executed when
> building nqp.
> 
Correction: It comes from moarvm package.

Comment 6 Andrew Savinykh 2017-03-29 05:30:22 UTC
What is the recommended method of getting modules with rakudo? We used to use zef and/panda with rakudo-star, but both zef and panda require Test, which is missing from rakudo. So how do I get Test on rakudo in the first place?

Note: this comment asks for a work around for this issue, until the time resolution / fix is agreed upon and enacted.

(In reply to Julien Enselme from comment #2)

> This is expected then.
> 
> > We should package those modules separately.
> 
> I don't intend to maintain these packages, but if I can help with the
> review, let me know.

It looks like unless the packages are created there is an issue; as it does not look like there is an easy alternate way to get these installed.

Comment 7 Petr Pisar 2017-03-29 12:22:39 UTC
I have a fix that patches rakudo sources to use the _libdir (moarvm only). It moves the Perl6 files from /usr/lib64/nqp/Perl6 to /usr/lib64/nqp/lib/Perl6 because the original location was /usr/share/nqp/lib/Perl6. I can install zef on top of it and I can install modules using the zef.

I will apply it to rawhide. If everything will be smooth, I'd like to apply it to older Fedoras too.

Comment 8 Fedora Update System 2017-03-30 14:52:31 UTC
rakudo-0.2017.01-7.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-e9485c6175

Comment 9 Fedora Update System 2017-03-30 14:52:38 UTC
rakudo-0.2017.01-7.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-e9485c6175

Comment 10 Fedora Update System 2017-03-30 15:22:38 UTC
rakudo-0.2017.01-6.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-73dd3661ef

Comment 11 Fedora Update System 2017-03-30 18:51:55 UTC
rakudo-0.2017.01-7.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-e9485c6175

Comment 12 Fedora Update System 2017-03-31 03:22:40 UTC
rakudo-0.2017.01-6.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-73dd3661ef

Comment 13 Fedora Update System 2017-04-01 00:25:07 UTC
rakudo-0.2017.01-6.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2017-04-04 16:02:38 UTC
rakudo-0.2017.01-7.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.