Closed hakonhagland closed 4 years ago
No, libcrypt and libcrypto aren't the same. The latter is comes from OpenSSL (together with libssl) while the former used to be part of libc (the original passwd hash) and nowadays contains several other hash functions.
But that's not what the error messages are about. Your perl (or stuff that it's linked to) uses stuff from libc that is too "new" for the libc of your target system (libm, libcrypt, too). Ubuntu 16.04 uses libc 2.23 so the highest symbol version in its libc is GLIBC_2.23. You're out of luck here - it's the same reason why an arbitrary binary from Ubuntu 20.04 (libc 2.31) won't run on Ubuntu 16.04. If you have wildly different libc versions on source and target you must pack on the older version.
@shawnlaffan: Is it really a good idea for autolink to pp --link
libm, libphtread and libdl from the source system?
pp_autolink should probably not be packing anything from system dirs that are expected to be on all machines. I'll add an exclude for /lib/x86_64-linux-gnu
, or perhaps /lib
to be more complete.
@hakonhagland - I've pushed a change to the github repo to exclude /lib
, followed by a version bump in https://github.com/shawnlaffan/perl-pp-autolink/commit/2ae0b1279e43f930cbbc56c7b6fe16f297eaa2c4
Can you give that a test?
@rschupp
you must pack on the older version
Interesting. Can you explain a little bit more? I would think the packing the newer version (not the older) would work..
Read about symbol versioning, e.g. this blog or in depth (chapter 3). That's one of the reasons why Python chose CentOS 6 as OS baseline ("manylinux2014") for their binary package format ("wheel").
@rschupp Thanks, I will check it out. BTW the last link in your previous comment refers to the same blog post as the first link.
Thanks, corrected.
I am still testing
PAR::Packer
to generate an exe from the Perl script in issue #21:This time I am using
perl
version 5.30.0 on Ubuntu 20.04. I run:If I now transfer the
p2.exe
to a docker container running Ubuntu 16.04 andperl
version 5.22.1 and execute it:So this did not work. Seems like
pp_autolink
detectedlibcrypto.so.1.1
but is this the same aslibcrypt.so
(note the missingo
) from the error message? For the other error fromlibm.so.6
, does it mean that--link /lib/x86_64-linux-gnu/libm.so.6
somehow did not work properly? Or that it should also link withlibc.so
? Any ideas?