Skip to content

Add necessary native-image configuration files for epoll#13158

Merged
normanmaurer merged 1 commit into
netty:4.1from
gradinac:gradinac/tweak-epoll-native-image-configuration
Jan 31, 2023
Merged

Add necessary native-image configuration files for epoll#13158
normanmaurer merged 1 commit into
netty:4.1from
gradinac:gradinac/tweak-epoll-native-image-configuration

Conversation

@gradinac

Copy link
Copy Markdown
Contributor

Motivation:

Epoll currently doesn't work out of the box on native-image without passing in additional flags and metadata.

Modification:

This PR adds the necessary metadata so that epoll works out of the box with native-image. The metadata is conditional - it should only be included in an image if epoll is actually used.

Result:

Fixes #10616

@normanmaurer

Copy link
Copy Markdown
Member

Do we also need the same for kqueue and our native resolver ?

@violetagg

violetagg commented Jan 26, 2023

Copy link
Copy Markdown
Member

@gradinac @normanmaurer We have native-image configuration for Netty MacOS specific nameserver resolution in the graalvm-reachability-metadata
Do we want to move it here?
oracle/graalvm-reachability-metadata#103

@gradinac

Copy link
Copy Markdown
Contributor Author

@normanmaurer I think you are right, at the very least we would need the resource-config.json for bundling up the native libraries, and probably some additional JNI metadata

@violetagg This is very nice, thank you for listing it here! :) I think it would make sense to move it to Netty itself - in this way, these features will work out of the box with Netty. It may make sense to keep them in the metadata repo for now also so that older versions of Netty can still work properly

Should these 2 be done as part of this or a follow-up PR?

@mostroverkhov

Copy link
Copy Markdown
Contributor

@normanmaurer epoll support for graal native is useful on its own as I dont think people often deploy on macos hosts - and if they do, they can use nio instead of kqueue.

@normanmaurer

Copy link
Copy Markdown
Member

Let me pull in this first. We can do the rest as a followup

@normanmaurer normanmaurer added this to the 4.1.88.Final milestone Jan 31, 2023
@normanmaurer normanmaurer merged commit 79b3472 into netty:4.1 Jan 31, 2023
@normanmaurer

Copy link
Copy Markdown
Member

@gradinac can you also do a PR for main ?

@gradinac

gradinac commented Feb 1, 2023

Copy link
Copy Markdown
Contributor Author

Sounds good :) I think we won't need the same thing for Netty 5 on main - it shouldn't need the initialize-at-run-time flags though we may need to tweak the metadata - do you by any chance have a Netty 5 example with Epoll that I could test out with native-image?

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.

native-image compilation of epoll transport fails

4 participants