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

[GR-41675] Only require libmanagement_ext if it's actually needed. #5122

Merged

Conversation

jerboaa
Copy link
Collaborator

@jerboaa jerboaa commented Sep 30, 2022

On some systems/apps, libawt_headless gets pulled in. This currently brings in libmanagement_ext unconditionally. However, libmanagement_ext should only be present for linking iff
com.sun.management.internal.OperatingSystemImpl class becomes reachable. The fix is to only add management_ext as a dependency for awt_headless when class OperatingSystemImpl is actually reachable.

Closes: #5119

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 30, 2022
Copy link
Collaborator

@zakkak zakkak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although I don't really understand why we need to add management_ext twice in the first place.

@jerboaa jerboaa force-pushed the libmanagement_ext_awt_headless_fix_v2 branch from 1024220 to 8522603 Compare October 3, 2022 09:01
On some systems/apps, libawt_headless gets pulled in. This currently
brings in libmanagement_ext unconditionally. However, libmanagement_ext
should only be present for linking iff
com.sun.management.internal.OperatingSystemImpl class becomes reachable.

Closes: oracle#5119
@jerboaa jerboaa force-pushed the libmanagement_ext_awt_headless_fix_v2 branch from 8522603 to 84c9266 Compare October 5, 2022 20:20
@jerboaa
Copy link
Collaborator Author

jerboaa commented Oct 6, 2022

Thanks for the reviews!

@jerboaa
Copy link
Collaborator Author

jerboaa commented Oct 6, 2022

If somebody could help with getting it integrated, I'd appreciate it.

@jerboaa
Copy link
Collaborator Author

jerboaa commented Oct 10, 2022

@fniephaus Could you please help getting this fix integrated? Thank you!

@fniephaus
Copy link
Member

Sure, but I'm afraid this won't make it into 22.3.

@fniephaus fniephaus self-assigned this Oct 10, 2022
@jerboaa
Copy link
Collaborator Author

jerboaa commented Oct 10, 2022

Sure, but I'm afraid this won't make it into 22.3.

That's fine. Thanks!

@fniephaus
Copy link
Member

You got it!

@fniephaus fniephaus changed the title Only require libmanagement_ext if it's actually needed. [GR-41675] Only require libmanagement_ext if it's actually needed. Oct 11, 2022
@fniephaus
Copy link
Member

Internal PR is at #5195.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[GR-41675] libmanagement_ext.a unconditionally being added when libawt_headless.a is linked in
5 participants