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

Support for os.name=Linux, os.arch=aarch64 #219

Closed
lanmaoxinqing opened this issue Sep 10, 2021 · 2 comments · May be fixed by gnodet/jansi#1
Closed

Support for os.name=Linux, os.arch=aarch64 #219

lanmaoxinqing opened this issue Sep 10, 2021 · 2 comments · May be fixed by gnodet/jansi#1
Milestone

Comments

@lanmaoxinqing
Copy link
Contributor

The os.arch system variable may be aarch64 in some linux arm64 machines like below and OSInfo.java in native module doesn't recognize it.

$ uname -a
Linux xxx xxx.aarch64 #1 SMP Fri Aug 9 04:09:13 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux

caused by

    public static String getArchName() {
        String osArch = System.getProperty("os.arch");
        // For Android
        if (isAndroid()) {
            return "android-arm";
        }

        if (osArch.startsWith("arm")) {    //  <-- linux arch named `aarch64` can not go into this
            osArch = resolveArmArchType();
        } else {
            String lc = osArch.toLowerCase(Locale.US);
            if (archMapping.containsKey(lc))
                return archMapping.get(lc);
        }
        return translateArchNameToFolderName(osArch);
    }

And arm64 and aarch64 should be same according to differences-between-arm64-and-aarch64

lanmaoxinqing added a commit to lanmaoxinqing/jansi that referenced this issue Sep 10, 2021
@gnodet gnodet closed this as completed in 1ab54ca Oct 4, 2021
@martin-g
Copy link

Thank you for fixing this, @lanmaoxinqing !
Looking forward for a new release with this improvement!

@somera
Copy link

somera commented Sep 5, 2024

Looks like this is not fixed:

[Do Sep 05][17:01:50][pi]@[pi-4-node-1]:[~]$ uname -a
Linux pi-4-node-1 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux
[Do Sep 05][17:02:06][pi]@[pi-4-node-1]:[~]$ mvn --version
Failed to load native library:jansi-2.4.1-39fb7f55cc8b7210-libjansi.so. osinfo: Linux/arm
java.lang.UnsatisfiedLinkError: /tmp/jansi-2.4.1-39fb7f55cc8b7210-libjansi.so: /tmp/jansi-2.4.1-39fb7f55cc8b7210-libjansi.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: /data-files/tools/maven/apache-maven
Java version: 17.0.12, vendor: Eclipse Adoptium, runtime: /usr/lib/jvm/temurin-17-jdk-armhf
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux", version: "6.1.21-v8+", arch: "arm", family: "unix"

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 a pull request may close this issue.

4 participants