Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.29: perl is not installed #22

Open
bes-internal opened this issue May 14, 2023 · 4 comments
Open

0.29: perl is not installed #22

bes-internal opened this issue May 14, 2023 · 4 comments

Comments

@bes-internal
Copy link

bes-internal commented May 14, 2023

wsl2 ubuntu 22

$ mechacpan perl 5.34.1
logging to 'local/logs/mecha_log.20230514_132313.Nhsh'...

logging to 'local/logs/mecha_log.20230514_132313.Nhsh'...

Fetching perl 5.34.1

s: /mnt/c/dev/url2x/psgi/local/tmp/mecha_mecha_perl-v5.34.1-x86_64-linux-glibc-2.35.tar.xz.20230514_132313.3QJl.20230514_132328.BuZJ/v5.34.1 (see below)
Fetching perl 5.34.1
Installing 5.34.1

$ ls -l local/
drwxrwxrwx 1 bes bes 4096 May 14 13:23 logs
drwxrwxrwx 1 bes bes 4096 May 14 13:24 tmp
$ cat local/logs/mecha_log.20230514_132313.Nhsh
logging to 'local/logs/mecha_log.20230514_132313.Nhsh'...
Fetching perl 5.34.1
Running: xz -dc /mnt/c/dev/url2x/psgi/local/tmp/mecha_perl-v5.34.1-x86_64-linux-glibc-2.35.tar.xz.20230514_132313.3QJl | tar xf -                                                                                       Installing 5.34.1
Binary in https://dnld.mechacpan.us/dist/perl-v5.34.1-x86_64-linux-glibc-2.35.tar.xz does not appear to be usable: Binary versions mismatch expectations: "" (found) ne "5.34.1" (expected) at /usr/local/share/perl/5.34.0/App/MechaCPAN/Perl.pm line 490.
$ ls -l local/tmp/
total 0     
@bes-internal
Copy link
Author

OK, I gave it a second chance.

$ mechacpan --verbose --no-log perl 5.36.0

/usr/bin/perl   /mnt/c/dev/url2x/psgi/local/tmp/mecha_.20230515_003017.JCIL     v5.36.0

Fetching perl 5.36.0
tar     --version
xz -dc /mnt/c/dev/url2x/psgi/local/tmp/mecha_perl-v5.36.0-x86_64-linux-glibc-2.35.tar.xz.20230515_003017.8gor | tar xf -    s: /mnt/c/dev/url2x/psgi/local/tmp/mecha_mecha_perl-v5.36.0-x86_64-linux-glibc-2.35.tar.xz.20230515_003017.8gor.20230515_003107.7qL_/v5.36.0

Installing 5.36.0
chdir /mnt/c/dev/url2x/psgi/local (my debug)

This is end of output of mechacpan and there is no "Binary does not appear to be usable:" messages according to code.

Then I download and unpack https://dnld.mechacpan.us/dist/perl-v5.36.0-x86_64-linux-glibc-2.35.tar.xz

$ ldd ./test/v5.36.0/bin/perl
linux-vdso.so.1 (0x00007ffca37fc000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f28580da000)
libcrypt.so.2 => not found
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2857eb2000)
/lib64/ld-linux-x86-64.so.2 (0x00007f28581cd000)

 $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy 

Also, I have not seen a code that would download archives for operating systems like "os-ubuntu:22.04-perl-5.36.0". Is it still in progress?

@atrodo
Copy link
Owner

atrodo commented May 15, 2023

Thank you for the report. This particular issue I will investigate more deeply. At the very least, the process should have proceeded and built perl from sources. That said, ideally the binary should have worked, but I have a suspicion that a Fedora version shares the same glibc version, built the perl binary but with a different libcrypt dependency. The building and using of binaries is still a bit new and I'm trying to figure out the exact pieces needed.

The os-:-perl-* pieces is not for the downloading by MechaCPAN, its purpose is more for tracking of the build process of what OS combinations have been built as well as a convenience for people looking at what's available. Underneath they are just symlinks to the perl--linux- versions. Determining the OS to build that slug is quite complicated, and the names provided in the os- version are built based on the build process, not by MechaCPAN. So the process, right now, is built based upon the operating conditions of how perl was built, which currently only looks at libc.

@bes-internal
Copy link
Author

bes-internal commented May 16, 2023

Now mechacpan perl install precompiled "build-reusable" version (with -Duserelocatableinc ) but mechacpan perl --source-only generate non-movable version. It's misleading.
I would like use and build "reusable" version by default. May be --build-reusable just for confugure and something like --build-tarball for archive file?

@atrodo
Copy link
Owner

atrodo commented Jul 28, 2023

The perl command is meant to compile perl to be used in a local directory. The build-reusable option is meant as an optimization for some workflows by pre-building perl in such a way that it can later be installed using the perl command. The build-reusable was designed to be a two step process: build once, use many times. If you're only building once to be used in a local/ directory, the non-relocatable version is preferred since there are less issues compared to relocatable builds. It is not a normal option to have enabled, and modules are not always coded in such a way that works, which I found out recently in #23.

I have made a couple changes that are going out in v0.30:

  1. I have added what libraries a reusable perl was built with to the slugline. This should help with the initial Ubuntu vs Fedora issue
  2. When a binary is fetched from the pre-build collection, not being able to download it will not cause an error
  3. The default has temporarily changed so source builds are the default instead of binary downloads. This can be changed with --no-source-only. This will change again in a future version
  4. I have moved --build-reusable out of the perl command and made it the global option --build-reusable-perl to try and help reduce confusion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants