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 against to the libcrypt.so.2 #703

Closed
floating-cat opened this issue Feb 17, 2022 · 1 comment · Fixed by #758
Closed

Link against to the libcrypt.so.2 #703

floating-cat opened this issue Feb 17, 2022 · 1 comment · Fixed by #758
Milestone

Comments

@floating-cat
Copy link

floating-cat commented Feb 17, 2022

OS: Linux
Library: netty-tcnative-*-static

I just noticed that I am unable to run a Netty app in ArchLinux because Arch's glibc package has removed the libcrypt.so.1: https://bbs.archlinux.org/viewtopic.php?id=274160
So I need to install the libxcrypt-compat to run it.
From my checking, this is the same in the Fedora, and I think there would be more distro to remove it in the future.

To build a libcrypt.so.1 from besser82/libxcrypt, the package need to not use the --disable-obsolete-api flag when building which is not used by some distros, and we need to install the libxcrypt-compat additionally.

Would it better if the netty-tcnative-*-static link against to the libcrypt.so.2 and recommend the users to install the libxcrypt package instead if they don't have the libcrypt.so.2 installed?

Thanks.

Some reference links:
pypa/manylinux#305 (comment)
https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt

@arloor
Copy link

arloor commented May 21, 2022

I ran into this problem on RHEL9 too.

Caused by: java.lang.UnsatisfiedLinkError: /tmp/libnetty_tcnative_linux_x86_641905760841177269486.so: libcrypt.so.1: cannot open shared object file: No such file or directory
        at jdk.internal.loader.NativeLibraries.load(Native Method) ~[?:?]
        at jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388) ~[?:?]
        at jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232) ~[?:?]
        at jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174) ~[?:?]
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389) ~[?:?]
        at java.lang.Runtime.load0(Runtime.java:755) ~[?:?]
        at java.lang.System.load(System.java:1953) ~[?:?]
        at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36) ~[forwardproxy-1.0-jar-with-dependencies.jar:?]
        ... 23 more

Updating: I installed libxcrypt-compat and solved this problem too

normanmaurer added a commit that referenced this issue Jan 9, 2023
Motivation:

We dont use any APR features that uses libcrypt so we can safely not link against it. This resolves various issues as some distributions otherwise need the extra installation of libxcrypt-compat etc.

Modifications:

- Add patchfile for APR configure.in to remove linking against libcrypt
- Patch APR during build

Result:

Fixes #703
@normanmaurer normanmaurer added this to the 2.0.56.Final milestone Jan 9, 2023
normanmaurer added a commit that referenced this issue Jan 9, 2023
Motivation:

We dont use any APR features that uses libcrypt so we can safely not link against it. This resolves various issues as some distributions otherwise need the extra installation of libxcrypt-compat etc.

Modifications:

- Add patchfile for APR configure.in to remove linking against libcrypt
- Patch APR during build

Result:

Fixes #703
normanmaurer added a commit that referenced this issue Jan 10, 2023
Motivation:

We dont use any APR features that uses libcrypt so we can safely not link against it. This resolves various issues as some distributions otherwise need the extra installation of libxcrypt-compat etc.

Modifications:

- Add patchfile for APR configure.in to remove linking against libcrypt
- Patch APR during build

Result:

Fixes #703
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 a pull request may close this issue.

3 participants