Opened 10 years ago
Closed 9 years ago
#47015 closed defect (invalid)
Usage of perl variant for a perl application
Reported by: | nortcele | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.3 |
Keywords: | Cc: | Ionic (Mihai Moldovan) | |
Port: | auto-multiple-choice |
Description (last modified by mf2k (Frank Schima))
Hi,
Using informations from ticket:46570 I tried to modify port x11/auto-multiple-choice to use perl variants. I added the lines:
PortGroup perl5 1.0 ... perl5.require_variant yes perl5.conflict_variants yes perl5.branches 5.16 5.18 5.20 perl5.create_variants ${perl5.branches}
and changed all "port:p5.16" to "port:p${perl5.major}"
All my tests where done after having "sudo port uninstall installed" before .
If I do
sudo port install auto-multiple-choice auto-multiple-choice
All works fine, the application is built, installed and works.
If I do
sudo port install perl5 sudo port install auto-multiple-choice auto-multiple-choice
All works fine too, the application is built, installed and works.
But if I do
sudo port install perl5 +perl5_20 sudo port install auto-multiple-choice auto-multiple-choice
The application is built, installed but when launched I get the error:
Can't locate AMC/Basic.pm in @INC (you may need to install the AMC::Basic module) (@INC contains: /opt/local/lib/perl5/site_perl/5.20/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.20 /opt/local/lib/perl5/vendor_perl/5.20/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.20 /opt/local/lib/perl5/5.20/darwin-thread-multi-2level /opt/local/lib/perl5/5.20 .) at /opt/local/lib/AMC/perl/AMC-gui.pl line 45. BEGIN failed--compilation aborted at /opt/local/lib/AMC/perl/AMC-gui.pl line 45.
I get the same error when I install perl5_18. All auto-multiple-choice files stays at the same places, whatever perl variant is installed. The unreachable file is in "/opt/local/lib/perl5/vendor_perl/AMC/Basic.pm". With the default perl5 install (perl5_16), it seems that @INC contains the path "/opt/local/lib/perl5/vendor_perl' but not with perl5_18 and perl5_20.
Are there other informations I should have added for the application to work with perl5_18 or perl5_20 variants?
Change History (9)
comment:1 Changed 10 years ago by nortcele
comment:2 Changed 10 years ago by mf2k (Frank Schima)
Description: | modified (diff) |
---|---|
Keywords: | perl removed |
comment:3 Changed 9 years ago by nortcele
When I install PERL with:
sudo port install perl5 +perl5_16
@INC contains:
/opt/local/lib/perl5/site_perl/5.16.3/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.16.3 /opt/local/lib/perl5/vendor_perl/5.16.3/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.16.3 /opt/local/lib/perl5/5.16.3/darwin-thread-multi-2level /opt/local/lib/perl5/5.16.3 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl
but when I install PERL with:
sudo port install perl5 +perl5_22
@INC contains:
/opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.22 /opt/local/lib/perl5/vendor_perl/5.22/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.22 /opt/local/lib/perl5/5.22/darwin-thread-multi-2level /opt/local/lib/perl5/5.22
In the last case, as "/opt/local/lib/perl5/vendor_perl" is not in @INC, auto-multiple-choice can't find his files.
comment:4 Changed 9 years ago by nortcele
I found the source of the problem. After 5.16, the PERL_VENDORLIB_STEM changed from "/opt/local/lib/perl5/vendor_perl" to "/opt/local/lib/perl5/vendor_perl/5.xx". I'll make a patch to adapt the port.
comment:5 Changed 9 years ago by Ionic (Mihai Moldovan)
Cc: | ionic@… added |
---|
That's bad. What does the application install? It's obviously also installing a perl module, which should probably be split up as p5-acm-basic
(or whatever else there is. ACM::Basic
is probably not the only module.)
Afterwards, auto-multiple-choice
should depend on p5.xx-acm-basic
based on its selected variant and not install any modules by itself (so as not to conflict with p5.xx-acm-basic
.)
comment:6 Changed 9 years ago by nortcele
The application install it's own modules in a "AMC" folder inside the perl vendor lib folder. How could I get the path for this folder from Macports?
comment:7 Changed 9 years ago by nortcele
I found a solution in the perl5-1.0.tcl group file:
perl -V:vendorlib
comment:9 Changed 9 years ago by Ionic (Mihai Moldovan)
Resolution: | → invalid |
---|---|
Status: | new → closed |
Sorry, I forgot to do some adaptation after my paste.
Using informations from ticket:46570 I tried to modify port x11/auto-multiple-choice to user perl variants. I added the lines:
and changed all "{{(port:p5.16}}}" to "
port:p${perl5.major}"
All my tests where done after having "
sudo port uninstall installed
" before .If I do
All works fine, the application is built, installed and works.
If I do
All works fine too, the application is built, installed and works.
But if I do
The application is built, installed but when launched I get the error:
I get the same error when I install perl5_18. All auto-multiple-choice files stays at the same places, whatever perl variant is installed. The unreachable file is in "
/opt/local/lib/perl5/vendor_perl/AMC/Basic.pm
". With the default perl5 install (perl5_16), it seems that@INC
contains the path "/opt/local/lib/perl5/vendor_perl
" but not with perl5_18 and perl5_20.Are there other informations I should have added for the application to work with perl5_18 or perl5_20 variants?