Github user amaya382 commented on a diff in the pull request:
https://github.com/apache/incubator-hivemall/pull/80#discussion_r117665318
--- Diff: xgboost/src/main/java/hivemall/xgboost/NativeLibLoader.java ---
@@ -54,15 +55,47 @@ private static boolean hasResource(String path) {
}
private static String getOSName() {
- return System.getProperty("os.name");
+ return System.getProperty("os.name").toLowerCase();
+ }
+
+ private static String getOSArch() {
+ return System.getProperty("os.arch").toLowerCase();
+ }
+
+ private static String getOSArchString() {
+ String os = getOSName();
+ if(os.startsWith("linux")) {
+ os = "linux";
+ } else if(os.startsWith("mac")) {
+ os = "darwin";
+ } else if(os.startsWith("windows")) {
+ os = "windows";
+ }
+
+ String arch = getOSArch();
+ if(arch.equals("amd64") || arch.equals("x86_64")) {
+ arch = "x64";
+ } else if(arch.endsWith("86")) {
+ arch = "x86";
+ } else if(arch.indexOf("arm64") != -1) {
+ arch = "arm64";
+ } else if(arch.indexOf("armv6") != -1) {
+ arch = "armv6";
+ } else if(arch.indexOf("armv7") != -1) {
+ arch = "armv7";
+ } else if(arch.indexOf("ppc") != -1) {
+ arch = "ppc64le";
+ }
+
+ return os + "-" + arch;
--- End diff --
that's so, I'll mod it
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---