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

link libcrypt statically #20

Merged
merged 1 commit into from
Oct 7, 2024
Merged

link libcrypt statically #20

merged 1 commit into from
Oct 7, 2024

Conversation

skaji
Copy link
Owner

@skaji skaji commented Oct 7, 2024

Fix #19

Summary

RHEL9 removes libcrypt.so.1, so we cannot run relocatable-perl on RHEL9:

❯ perl -v
perl: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory

To fix this issue, we link libcrypt statically.

Detail

Although glibc-static package provides libcrypt.a on centos7, it seems that its libcrypt.a is broken:

❯ ./Configure ...
...
❯ make
...
cc -fstack-protector-strong -L/usr/local/lib -o miniperl \
    opmini.o perlmini.o universalmini.o av.o builtin.o caretx.o class.o deb.o doio.o doop.o dquote.o dump.o globals.o gv.o hv.o keywords.o locale.o mathoms.o mg.o mro_core.o numeric.o pad.o peep.o perlio.o perly.o pp.o pp_ctl.o pp_hot.o pp_pack.o pp_sort.o pp_sys.o reentr.o regcomp.o regcomp_debug.o regcomp_invlist.o regcomp_study.o regcomp_trie.o regexec.o run.o scope.o sv.o taint.o time64.o toke.o utf8.o util.o   miniperlmain.o  -lpthread -ldl -lm -lcrypt -lutil -lc
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libcrypt.a(md5-crypt.o): In function `__md5_crypt_r':
(.text+0x10c): undefined reference to `NSSLOW_Init'
...

So, we use libcrypt.a in ubuntu libc6-dev package.

Note

This issue was originally reported by @gugod

@skaji skaji merged commit 136d24e into main Oct 7, 2024
8 checks passed
@skaji skaji deleted the static-libcrypt branch October 7, 2024 07:35
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

Successfully merging this pull request may close these issues.

libcrypt.so.1: No such file or directory
1 participant