Raku / nqp-configure

Configuration and build modules for NQP
Artistic License 2.0
4 stars 8 forks source link

Fix `./Configure.pl --prefix=../install` #5

Closed patrickbkr closed 5 years ago

patrickbkr commented 5 years ago

When calling NQP ./Configure.pl --prefix=../install I get the following error: Can't use an undefined value as an ARRAY reference at ... This change fixes that.

vrurg commented 5 years ago

I thought I had this fixed. Do you get it when configuring rakudo?

patrickbkr commented 5 years ago

I got it when configuring NQP.

patrickbkr commented 5 years ago

Full error message:

Can't use an undefined value as an ARRAY reference at /home/patrick/p6-repos/nqp/3rdparty/nqp-configure/lib/NQP/Config.pm line 302.                                    
 at /home/patrick/p6-repos/nqp/3rdparty/nqp-configure/lib/NQP/Config.pm line 34.                                                                                                
        NQP::Config::__ANON__("Can't use an undefined value as an ARRAY reference at /home/p"...) called at /home/patrick/p6-repos/nqp/3rdparty/nqp-configure/lib/NQP/Config.pm line 302
        NQP::Config::active_backends(NQP::Config::NQP=HASH(0x1b88188)) called at /home/patrick/p6-repos/nqp/tools/lib/NQP/Config/NQP.pm line 26       
        NQP::Config::NQP::configure_backends(NQP::Config::NQP=HASH(0x1b88188)) called at ./Configure.pl line 87
vrurg commented 5 years ago

Ok, confirm. That was similar but different problem.

I think it has to be a different fix. We assume moar if no backends defined. So, it has to be added implicitly. active_backend method must then die if corresponding key is not defined. Would act as a trap for bugs like this.

vrurg commented 5 years ago

Unfortunately, I have no access to nqp yet. So, PR is submitted to address your issue.

Thank you!

vrurg commented 5 years ago

@patzim I've merged own PR into NQP. Would you give it a try when you can?

patrickbkr commented 5 years ago

I confirm it's fixed. Thanks!