9

I'm trying to install Raku on a Debian 11 x64. I never installed it before (perl5 too)

It's a server with some Perl5 scripts, and I want to "use" it in Raku with the Inline::Perl5 (also I want to use Perl5 Module if I don't find what I want in Raku Module) but I can't.

The perl5 is installed by APT, rakudo too.

When running zef install Inline::Perl5, I get the following:

===> Searching for: Inline::Perl5
===> Searching for missing dependencies: Distribution::Builder::MakeFromJSON:ver<0.6+>
===> Searching for missing dependencies: System::Query
===> Failed to find dependencies: System::Query Failed to resolve some missing dependencies

If I try to install System::Query with zef, I obtain :

===> Searching for: System::Query
No candidates found matching identity: System::Query

Do you have some idea to help me ?

Thank's a lot

Koedlt
  • 4,286
  • 8
  • 15
  • 33
  • 1
    Usual origin of these "not found" errors is using an old version of `zef`. Did you upgrade to the latest one? – jjmerelo Jan 11 '23 at 16:27

2 Answers2

4

The rakudo version you've installed probably does not have that one baked in. You can upgrade zef via zef upgrade zef. My version of zef, 0.14.5, is able to find System::Query without a glitch.

> zef search System::Query
===> Updating fez mirror: https://360.zef.pm/
===> Updated fez mirror: https://360.zef.pm/
===> Updating rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
===> Updated rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
===> Found 8 results
---------------------------------------------------------------------------------------------------------------------------------------------------------------
ID|From                            |Package                                     |Description                                                                   
---------------------------------------------------------------------------------------------------------------------------------------------------------------
0 |Zef::Repository::Ecosystems<fez>|System::Query:ver<0.1.6>:auth<zef:tony-o>   |A utility for collapsing JSON dependent upon certain environmental information
1 |Zef::Repository::Ecosystems<fez>|System::Query:ver<0.1.5>:auth<zef:tony-o>   |A utility for collapsing JSON dependent upon certain environmental information
2 |Zef::Repository::Ecosystems<fez>|System::Query:ver<0.1.4>:auth<zef:tony-o>   |A utility for collapsing JSON dependent upon certain environmental information
3 |Zef::Repository::Ecosystems<rea>|System::Query:ver<0.1.6>:auth<zef:tony-o>   |A utility for collapsing JSON dependent upon certain environmental information
4 |Zef::Repository::Ecosystems<rea>|System::Query:ver<0.1.5>:auth<zef:tony-o>   |A utility for collapsing JSON dependent upon certain environmental information
5 |Zef::Repository::Ecosystems<rea>|System::Query:ver<0.1.4>:auth<zef:tony-o>   |A utility for collapsing JSON dependent upon certain environmental information
6 |Zef::Repository::LocalCache     |System::Query:ver<0.1.6>:auth<zef:tony-o>   |A utility for collapsing JSON dependent upon certain environmental information
7 |Zef::Repository::LocalCache     |System::Query:ver<0.1.4>:auth<github:tony-o>|A utility for collapsing JSON dependent upon certain environmental information
---------------------------------------------------------------------------------------------------------------------------------------------------------------
jjmerelo
  • 22,578
  • 8
  • 40
  • 86
  • Hi, Thank's for your reply. Have try to upgrade ZEF, but is already the last version: >All requested distributions are already at their latest versions – Jeremie CORBION Jan 12 '23 at 07:57
  • 1
    @JeremieCORBION did you do `zef update` afterwards? – jjmerelo Jan 12 '23 at 16:41
  • Yes, not better... If I do "zef search System::Query" return 0 results – Jeremie CORBION Jan 16 '23 at 14:39
  • @JeremieCORBION can you please run it with -v and show the whole output? Is it updating correctly the indices? – jjmerelo Jan 18 '23 at 06:19
  • @jjimerelo don't sure what do you want.. if running `zef search System::Query -v` Obtain `===> Found 0 results` If I do `zef update -v` obtain ` ---------------------------------------------------- Content Storage |Distribution Count ---------------------------------------------------- Zef::Repository::LocalCache |4 Zef::Repository::Ecosystems |707 Zef::Repository::Ecosystems|1909 ----------------------------------------------------` – Jeremie CORBION Jan 19 '23 at 13:38
  • @JeremieCORBION pretty much that. Looks like it's not searching the REA, which is where that would be hosted. Did you disable it for some reason? Could it have been disabled when installing it from the OS repos? – jjmerelo Jan 20 '23 at 08:25
  • I don't disable something (or I don't know how I do that...). Yes Have install Rakudo With Debian 11 package – Jeremie CORBION Jan 23 '23 at 13:53
  • After an other `zef` install zef` have other error, I installed System::Queries but not Inline::Perl5... Now I obtain : `[Inline::Perl5] /usr/bin/ld: /usr/local/lib/perl5/5.36.0/x86_64-linux/CORE/libperl.a(op.o): warning: relocation against `PL_modcount' in read-only section `.text'` `[Inline::Perl5] /usr/bin/ld: /usr/local/lib/perl5/5.36.0/x86_64-linux/CORE/libperl.a(op.o): relocation R_X86_64_PC32 against symbol `PL_compcv' can not be used when making a shared object; recompile with -fPIC` – Jeremie CORBION Jan 23 '23 at 14:25
  • I only just saw your latest comment. You need to address the errors in the error message. At the very least, you need to "recompile with `-fPIC`" per the very end of the message you pasted. For instructions about that, see [the BUILDING section of the README](https://github.com/niner/Inline-Perl5#building). I see it includes Debian; hopefully you can follow those instructions and make progress. If you get stuck, please post another comment *making sure to .@mention me*. Good luck. – raiph Mar 31 '23 at 20:07
2

I occasionally reach for apt-get like this:

`sudo apt-get install rakudo -y`;
`sudo git clone https://github.com/ugexe/zef.git`;
`sudo raku -I./zef zef/bin/zef install ./zef --/test`;

It is handy and works up to a point - but (as just checked) it does not do the job for Inline::Perl5. Notoriously within the raku community, the last pickup for the apt-get build pipeline coincided with a half completed move of zef into core - so, as you can see you need to install zef by hand for now (only if you go the apt-get route).

The reason for Inline::Perl5 to fail is set out in the Inline::Perl5 README.md documents is:

If you use the perl that comes with a Linux distribution, you may need to install a separate package containing the perl library.

This section of the documents gives instructions of how to do this build.

Having been here before, I put this all into a Dockerfile that you are welcome to scavenge / use directly.

I have also just pushed an amd64 image p6steve/raku-dan:paddle to docker hub, so you can just go:

docker run -it p6steve/raku-dan:paddle
zef install Inline::Perl5

This has cpanm too so you can grab any cpan modules you want.

librasteve
  • 6,832
  • 8
  • 30
  • Hi Thank's for your answer but the problem is not really install Inline::Perl5 for me, it's ZEF 0.14.6 doesn't know the module "System::Query" and I don't know how to install it manually – Jeremie CORBION Jan 12 '23 at 08:06
  • In your question you say ```The perl5 is installed by APT, rakudo too```. In my answer I say ```this will not work```. So did you at least try (i) a rakudo installation that is known to work, (ii) running ```Inline::Perl5/configure.pl6``` and (iii) installing ```libperl-dev``` as set out in the instructions? – librasteve Feb 03 '23 at 21:30
  • ... I say this because my guess is that System::Query is bundled with the standard rakudo/zef defaults (which ```apt-get rakudo``` is missing) and therefore it is not findable by zef in the module repos because it is in the standard bundle. – librasteve Feb 03 '23 at 21:33