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

VM-Packages: Auto-detection of MUSL is replaced by system properties #7921

Merged
merged 6 commits into from
May 26, 2022

Conversation

snoopcheri
Copy link
Contributor

This PR removes auto-detection of MUSL-based Linux systems in favor of system properties the user can set to configure a specific path for a native library.

At the moment, there's only a single library with the name xgboost4j that we need. A user who wants to configure a specific path, has to set the system property xgboostruntime.native.xgboost4j. If this system property is present, its value is used as a library path inside the JAR.

A user who runs xgboost4j on a MUSL-based Linux system, will get an additional error message Alternatively, if your Linux OS is musl-based, you should set the path for the native library xgboost4j via the system property xgboostruntime.native.xgboost4j.

Resolves #7915

…te class

In a subsequent commit, this class will check whether a system property is
set which overrides the name. And this can then easily be tested.
If the property xgboostruntime.native.<libName> is present, we are
using the value of this property as library path for the library libName.
No other processing is done.
In this case, the user now sees an error message suggesting to
manually set the library path of the native library via a specific
system property.
As this does not work in all scenarios anyway, we can get rid of
this logic here. Instead, a user using a MUSL-based Linux system
can now specify the exact path to the native library via a
system property.
Copy link
Member

@trivialfis trivialfis left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for working on this.

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.

Enhance detection of MUSL-based Linux systems (xgboost4j)
3 participants