apache / apache/pulsar

[Bug] Some netty native libraries are not relocated

Open
#19,652 6 comments 0 reactions 0 assignees View on GitHub
Stale type/bug
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.

### Version

All of them

### Minimal reproduce step

Download a `pulsar-client-all.jar`, then view the `META-INF/native/` directory.

### What did you expect to see?

Properly relocated binaries.

### What did you see instead?

```
META-INF/native/
META-INF/native/liborg_apache_pulsar_shade_netty_tcnative_linux_x86_64.so
META-INF/native/liborg_apache_pulsar_shade_netty_resolver_dns_native_macos_aarch_64.jnilib
META-INF/native/libnetty_tcnative_osx_aarch_64.jnilib
META-INF/native/liborg_apache_pulsar_shade_netty_transport_native_epoll_x86_64.so
META-INF/native/include/
META-INF/native/include/netty_unix_jni.h
META-INF/native/include/netty_jni_util.h
META-INF/native/include/netty_unix_limits.h
META-INF/native/include/netty_unix_util.h
META-INF/native/include/netty_unix_filedescriptor.h
META-INF/native/include/netty_unix_errors.h
META-INF/native/include/netty_unix_buffer.h
META-INF/native/include/netty_unix.h
META-INF/native/include/netty_unix_socket.h
META-INF/native/netty_tcnative_windows_x86_64.dll
META-INF/native/liborg_apache_pulsar_shade_netty_resolver_dns_native_macos_x86_64.jnilib
META-INF/native/lib/
META-INF/native/lib/libnetty-unix-common.a
META-INF/native/libnetty_transport_native_io_uring_aarch_64.so
META-INF/native/libnetty_tcnative_linux_aarch_64.so
META-INF/native/libnetty_transport_native_io_uring_x86_64.so
META-INF/native/libnetty_tcnative_osx_x86_64.jnilib
```

### Anything else?

See https://github.com/apache/pulsar/pull/18646#pullrequestreview-1201600977 for more context.

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Inspect the downloaded pulsar-client-all.jar and compare every entry under META-INF/native/ with the expected relocated naming. Read the context in pull request 18646 and trace the packaging or shading configuration that produces these native libraries. Done means all bundled Netty native binaries and related resources are consistently relocated without unshaded entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.