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

running xgboost on apple silicon (aarm64) fails due to lack of native library #7706

Closed
xelax opened this issue Feb 27, 2022 · 9 comments
Closed

Comments

@xelax
Copy link

xelax commented Feb 27, 2022

running xgboost on spark (package ml.dmlc:xgboost4j_2.12:1.5.1:jar) on a Mac with Apple silicon fails with:

Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: File /lib/macos/aarch64/libxgboost4j.dylib was not found inside JAR.
at ml.dmlc.xgboost4j.java.XGBoostJNI.(XGBoostJNI.java:37)
... 23 more
Caused by: java.io.FileNotFoundException: File /lib/macos/aarch64/libxgboost4j.dylib was not found inside JAR.
at ml.dmlc.xgboost4j.java.NativeLibLoader.createTempFileFromResource(NativeLibLoader.java:233)
at ml.dmlc.xgboost4j.java.NativeLibLoader.loadLibraryFromJar(NativeLibLoader.java:176)
at ml.dmlc.xgboost4j.java.NativeLibLoader.initXGBoost(NativeLibLoader.java:130)
at ml.dmlc.xgboost4j.java.XGBoostJNI.(XGBoostJNI.java:34)
... 23 more

@trivialfis
Copy link
Member

Closing as duplicated to #6408 .

@xelax
Copy link
Author

xelax commented Feb 28, 2022

but this is about the maven artifacts, I think #6408 is about the python packages?

@trivialfis
Copy link
Member

It's not package-specific, we don't have the machine to build binary packages for apple silicon, nor does GitHub Action provide such instance. @hcho3 found a way to build it for the Python package using cross-platform compilation. But for JVM packages we haven't found a way yet.

You can compile XGBoost from the source.

@xelax
Copy link
Author

xelax commented Feb 28, 2022

ok. Would it help if build it on my computer and upload the libraries somewhere? If the instruction are not too complex I can try

@trivialfis
Copy link
Member

Thank you for the offer. But if we were to support it I think we need to find an automated solution instead of pinging you everytime we want to build it. ;-)

Right now all the builds are running on the CI, either on Github action or on Jenkins.

@xelax
Copy link
Author

xelax commented Feb 28, 2022

make sense. Hopefully arm64 instances will become more common soon.

@xelax
Copy link
Author

xelax commented Mar 3, 2022

Support of M1 mac might come soon for github actions:
https://github.com/actions/runner/blob/main/docs/start/envosx.md

@kmate
Copy link

kmate commented Jun 9, 2022

Can't we simply cross-compile using an x86 linux box? Never mind, I see it above.

@hcho3
Copy link
Collaborator

hcho3 commented Oct 25, 2023

Hi everyone, XGBoost JVM package now ships with native binary for Apple Silicon, starting from version 2.0.1.

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

No branches or pull requests

4 participants