nxadm / rakudo-pkg

Pre-compiled OS packages for Rakudo
GNU General Public License v3.0
71 stars 22 forks source link

zef install fails for rakudo-pkg Leap 15.5 #99

Closed bazzaar closed 10 months ago

bazzaar commented 1 year ago

Hi @nxadm , many thanks for the quick turn around in making the Leap 15.5 rakudo-pkg available.

Unfortunately I'm having a similar bother with the zef (first time install as non-root user) install that was the case with Leap 15.4 and documented in issue #91. The upshot of the latter issue was to add a work-around (with patch f6ef163). Does this work-around need to be applied to the Leap 15.5 package also?

The specific error messages I got, are as follows :

bazzaar@localhost:~> curl -1sLf \
>   'https://dl.cloudsmith.io/public/nxadm-pkgs/rakudo-pkg/setup.rpm.sh' \
>   | sudo -E bash
[sudo] password for root:
Executing the  setup script for the 'nxadm-pkgs/rakudo-pkg' repository ...

   OK: Checking for required executable 'curl' ...
   OK: Checking for required executable 'rpm' ...
   OK: Detecting your OS distribution and release using system methods ...
 ^^^^: ... Detected/provided for your OS/distribution, version and architecture:
 >>>>:
 >>>>: ... distro=opensuse-leap  version=15.5  codename=15.5  arch=x86_64
 >>>>:
   OK: Importing 'nxadm-pkgs/rakudo-pkg' repository GPG keys into rpm ...
   OK: Checking for available package manager (DNF/Microdnf/YUM/Zypper) ...
 ^^^^: ... Detected package manager as 'zypper'
   OK: Checking if upstream install config is OK ...
   OK: Fetching 'nxadm-pkgs/rakudo-pkg' repository configuration ...
   OK: Installing 'nxadm-pkgs/rakudo-pkg' repository via zypper ...
   OK: Updating the zypper cache to fetch the new repository metadata ...
   OK: The repository has been installed successfully - You're ready to rock!

# Then installed rakudo-pkg with Yast2, no problems ...

# then as just plain user :

bazzaar@localhost:~> /opt/rakudo-pkg/bin/install-zef
/opt/rakudo-pkg/bin/install-zef: line 6: raku: command not found
===> Testing: zef:ver<0.19.1>:auth<github:ugexe>:api<0>
[zef]     # Failed test 'Zef::Client module can be use-d ok'
[zef]     # at t/00-load.rakutest line 15
[zef]     # Redeclaration of symbol 'Zef::Fetch'.
[zef]     # Failed test 'Zef::Repository module can be use-d ok'
[zef]     # at t/00-load.rakutest line 17
[zef]     # Redeclaration of symbol 'Zef::Repository'.
[zef]     # Failed test 'Zef::Distribution module can be use-d ok'
[zef]     # at t/00-load.rakutest line 21
[zef]     # Redeclaration of symbol 'Zef::Distribution'.
[zef]     # Failed test 'Zef::Distribution::DependencySpecification module can be use-d ok'
[zef]     # at t/00-load.rakutest line 22
[zef]     # Redeclaration of symbol
[zef]     # 'Zef::Distribution::DependencySpecification::Any'.
[zef]     # Failed test 'Zef::Distribution::Local module can be use-d ok'
[zef]     # at t/00-load.rakutest line 23
[zef]     # Redeclaration of symbol 'Zef::Distribution::Local'.
[zef]     # You failed 5 tests of 18
[zef] # Failed test 'Core'
[zef] # at t/00-load.rakutest line 4
[zef] # You failed 1 test of 2
[zef] ===SORRY!=== Error while compiling /opt/rakudo-pkg/var/zef/t/build.rakutest
[zef] Merging GLOBAL symbols failed: duplicate definition of symbol Zef
[zef] at /opt/rakudo-pkg/var/zef/t/build.rakutest:5
[zef] ===SORRY!=== Error while compiling /opt/rakudo-pkg/var/zef/t/distribution-depends-parsing.rakutest
[zef] Merging GLOBAL symbols failed: duplicate definition of symbol Zef
[zef] at /opt/rakudo-pkg/var/zef/t/distribution-depends-parsing.rakutest:5
[zef] ===SORRY!=== Error while compiling /opt/rakudo-pkg/var/zef/t/extract.rakutest
[zef] Merging GLOBAL symbols failed: duplicate definition of symbol Zef
[zef] at /opt/rakudo-pkg/var/zef/t/extract.rakutest:5
[zef] ===SORRY!=== Error while compiling /opt/rakudo-pkg/var/zef/t/fetch.rakutest
[zef] Merging GLOBAL symbols failed: duplicate definition of symbol Zef
[zef] at /opt/rakudo-pkg/var/zef/t/fetch.rakutest:5
[zef] ===SORRY!=== Error while compiling /opt/rakudo-pkg/var/zef/t/install.rakutest
[zef] Merging GLOBAL symbols failed: duplicate definition of symbol Zef
[zef] at /opt/rakudo-pkg/var/zef/t/install.rakutest:5
[zef] ===SORRY!=== Error while compiling /opt/rakudo-pkg/var/zef/t/repository.rakutest
[zef] Merging GLOBAL symbols failed: duplicate definition of symbol Zef
[zef] at /opt/rakudo-pkg/var/zef/t/repository.rakutest:5
[zef] ===SORRY!=== Error while compiling /opt/rakudo-pkg/var/zef/t/test.rakutest
[zef] Merging GLOBAL symbols failed: duplicate definition of symbol Zef
[zef] at /opt/rakudo-pkg/var/zef/t/test.rakutest:5
===> Testing [FAIL]: zef:ver<0.19.1>:auth<github:ugexe>:api<0>
Aborting due to test failure: zef:ver<0.19.1>:auth<github:ugexe>:api<0> (use --force-test to override)
Don't forget to add '~/.raku/bin' to your PATH,
e.g. by adding this to .profile:
export PATH=~/.raku/bin:$PATH
bazzaar@localhost:~>
bazzaar commented 1 year ago

Ah, I see that the workaround was indeed applied.

Perhaps I needed to add the raku install dir to my $PATH before running the install-zef command ... I will try that now.

bazzaar@localhost:~> cd /opt/rakudo-pkg/bin
bazzaar@localhost:/opt/rakudo-pkg/bin> ls
add-rakudo-to-path  install-zef  nqp    perl6        perl6-debug-m  perl6-lldb-m  perl6-valgrind-m  raku-debug  rakudo-debug    rakudo-gdb-m   rakudo-m            rakudo-valgrind-m
fix-windows10       moar         nqp-m  perl6-debug  perl6-gdb-m    perl6-m       raku              rakudo      rakudo-debug-m  rakudo-lldb-m  rakudo-pkg_path.sh  zef-as-root

bazzaar@localhost:/opt/rakudo-pkg/bin> head install-zef
#!/bin/sh

cd /opt/rakudo-pkg/var/zef

# Workaround for issue #91, usev6++
raku -e 'use NativeCall'

/opt/rakudo-pkg/bin/raku -I. bin/zef --install-to=home --force-install install .

echo "Don't forget to add '~/.raku/bin' to your PATH,"
bazzaar commented 1 year ago

Well I tried a couple of simple solutions :

  1. just edited the install-zef script in the /opt/rakudo-pkg/bin directory, prepending raku -e with the full /opt path, but that didn't work (though it didn't report raku command not found)
  2. instead edited my $PATH in .profile, and logging out / in, but again no luck, and I got exactly the same errors as in solution 1 :
    
    bazzaar@localhost:~> echo $PATH
    /opt/rakudo-pkg/bin:/opt/rakudo-pkg/share/perl6/site/bin:/home/bazzaar/bin:/usr/local/bin:/usr/bin:/bin:/opt/rakudo-pkg/bin:/opt/rakudo-pkg/share/perl6/bin

bazzaar@localhost:~> /opt/rakudo-pkg/bin/install-zef ===> Testing: zef:ver<0.19.1>:auth:api<0> [zef] # Failed test 'Zef::Client module can be use-d ok' [zef] # at t/00-load.rakutest line 15 [zef] # Redeclaration of symbol 'Zef::Fetch'. [zef] # Failed test 'Zef::Repository module can be use-d ok' [zef] # at t/00-load.rakutest line 17 [zef] # Redeclaration of symbol 'Zef::Repository'. [zef] # Failed test 'Zef::Distribution module can be use-d ok' [zef] # at t/00-load.rakutest line 21 [zef] # Redeclaration of symbol 'Zef::Distribution'. [zef] # Failed test 'Zef::Distribution::DependencySpecification module can be use-d ok' [zef] # at t/00-load.rakutest line 22 [zef] # Redeclaration of symbol [zef] # 'Zef::Distribution::DependencySpecification::Any'. [zef] # Failed test 'Zef::Distribution::Local module can be use-d ok' [zef] # at t/00-load.rakutest line 23 [zef] # Redeclaration of symbol 'Zef::Distribution::Local'. [zef] # You failed 5 tests of 18 [zef] # Failed test 'Core' [zef] # at t/00-load.rakutest line 4 [zef] # You failed 1 test of 2 [zef] ===SORRY!=== Error while compiling /opt/rakudo-pkg/var/zef/t/build.rakutest [zef] Merging GLOBAL symbols failed: duplicate definition of symbol Zef [zef] at /opt/rakudo-pkg/var/zef/t/build.rakutest:5 [zef] ===SORRY!=== Error while compiling /opt/rakudo-pkg/var/zef/t/distribution-depends-parsing.rakutest [zef] Merging GLOBAL symbols failed: duplicate definition of symbol Zef [zef] at /opt/rakudo-pkg/var/zef/t/distribution-depends-parsing.rakutest:5 [zef] ===SORRY!=== Error while compiling /opt/rakudo-pkg/var/zef/t/extract.rakutest [zef] Merging GLOBAL symbols failed: duplicate definition of symbol Zef [zef] at /opt/rakudo-pkg/var/zef/t/extract.rakutest:5 [zef] ===SORRY!=== Error while compiling /opt/rakudo-pkg/var/zef/t/fetch.rakutest [zef] Merging GLOBAL symbols failed: duplicate definition of symbol Zef [zef] at /opt/rakudo-pkg/var/zef/t/fetch.rakutest:5 [zef] ===SORRY!=== Error while compiling /opt/rakudo-pkg/var/zef/t/install.rakutest [zef] Merging GLOBAL symbols failed: duplicate definition of symbol Zef [zef] at /opt/rakudo-pkg/var/zef/t/install.rakutest:5 [zef] ===SORRY!=== Error while compiling /opt/rakudo-pkg/var/zef/t/repository.rakutest [zef] Merging GLOBAL symbols failed: duplicate definition of symbol Zef [zef] at /opt/rakudo-pkg/var/zef/t/repository.rakutest:5 [zef] ===SORRY!=== Error while compiling /opt/rakudo-pkg/var/zef/t/test.rakutest [zef] Merging GLOBAL symbols failed: duplicate definition of symbol Zef [zef] at /opt/rakudo-pkg/var/zef/t/test.rakutest:5 ===> Testing [FAIL]: zef:ver<0.19.1>:auth:api<0> Aborting due to test failure: zef:ver<0.19.1>:auth:api<0> (use --force-test to override)

Don't forget to add '~/.raku/bin' to your PATH, e.g. by adding this to .profile: export PATH=~/.raku/bin:$PATH bazzaar@localhost:~>

bazzaar commented 1 year ago

Removing the workaround raku -e ... , didn't work either, and in fact gave the same errors ..

bazzaar commented 1 year ago

Installing zef separately, according to ugexe's instructions, does work :

bazzaar@localhost:~> git clone https://github.com/ugexe/zef.git
Cloning into 'zef'...
remote: Enumerating objects: 11491, done.
remote: Counting objects: 100% (892/892), done.
remote: Compressing objects: 100% (419/419), done.
remote: Total 11491 (delta 538), reused 795 (delta 459), pack-reused 10599
Receiving objects: 100% (11491/11491), 2.29 MiB | 4.54 MiB/s, done.
Resolving deltas: 100% (7063/7063), done.
bazzaar@localhost:~> cd zef
bazzaar@localhost:~/zef> raku -I. bin/zef install .
===> Testing: zef:ver<0.19.1>:auth<github:ugexe>:api<0>
===> Testing [OK] for zef:ver<0.19.1>:auth<github:ugexe>:api<0>
===> Installing: zef:ver<0.19.1>:auth<github:ugexe>:api<0>

1 bin/ script [zef] installed to:
/home/bazzaar/.raku/bin
bazzaar@localhost:~/zef>

#

bazzaar@localhost:~> raku
Welcome to Rakudo™ v2023.08.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2023.08.

You may want to `zef install Readline`, `zef install Linenoise`, or `zef install Terminal::LineEditor` or use rlwrap for a line editor

To exit type 'exit' or '^D'
[0] > 

#

bazzaar@localhost:~> zef install Readline
===> Searching for: Readline
===> 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
===> Searching for missing dependencies: LibraryCheck
===> Testing: LibraryCheck:ver<0.0.12>:auth<zef:jonathanstowe>:api<1.0>
===> Testing [OK] for LibraryCheck:ver<0.0.12>:auth<zef:jonathanstowe>:api<1.0>
===> Testing: Readline:ver<0.1.6>:auth<cpan:fooist>
[Readline] 
===> Testing [OK] for Readline:ver<0.1.6>:auth<cpan:fooist>
===> Installing: LibraryCheck:ver<0.0.12>:auth<zef:jonathanstowe>:api<1.0>
===> Installing: Readline:ver<0.1.6>:auth<cpan:fooist>
bazzaar@localhost:~> 
nxadm commented 10 months ago

I just did a 1 line fix to find the new lib of zef: https://github.com/nxadm/rakudo-pkg/compare/master...miscFixes

Tested on Debian and it finds everything now. If not please re-open.

The change will be merged very soon (just seeing if there are other fixes to be added).