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

Some classes loaders are not ARM compatible #43415

Open
rcjverhoef opened this issue Sep 20, 2024 · 2 comments
Open

Some classes loaders are not ARM compatible #43415

rcjverhoef opened this issue Sep 20, 2024 · 2 comments
Labels
area/kotlin kind/bug Something isn't working triage/needs-reproducer We are waiting for a reproducer.

Comments

@rcjverhoef
Copy link

Describe the bug

I run on apple silicon with a kotlin code base. I get an exception that comes down to fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e' or 'arm64').

The JVM I run is ARM based. The freaky thing: I call a library A that calls another library B, where this breaks with above error. However, if I do the identical call to library B from my code it does not break.

Expected behavior

When on apple silicon, everything should work the same in different class loaders

Actual behavior

it does not

How to Reproduce?

This might be a bit cumbersome.

The problem is with apache-ranger. This for some reason calls library kstruct to get a hostname.

I have below test-case. This breaks on call RangerAdminRESTClient(), which does the same call as my code does one line before. If I remove @QuarkusTest, everything works. This looks like the same behavior I see when running my app.

import com.kstruct.gethostname4j.Hostname
import io.quarkus.test.junit.QuarkusTest
import org.apache.ranger.admin.client.RangerAdminRESTClient
import org.junit.jupiter.api.Test

@QuarkusTest
class TestKsctruc {
    @Test
    fun test() {
        val x = Hostname.getHostname()
        println(x)
        val client = RangerAdminRESTClient()
    }
}

Output of uname -a or ver

23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6030 arm64

Output of java -version

openjdk version "23" 2024-09-17 OpenJDK Runtime Environment Homebrew (build 23) OpenJDK 64-Bit Server VM Homebrew (build 23, mixed mode, sharing)

Quarkus version or git rev

3.10.2

Build tool (ie. output of mvnw --version or gradlew --version)

------------------------------------------------------------ Gradle 8.7 ------------------------------------------------------------ Build time: 2024-03-22 15:52:46 UTC Revision: 650af14d7653aa949fce5e886e685efc9cf97c10 Kotlin: 1.9.22 Groovy: 3.0.17 Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023 JVM: 23 (Homebrew 23) OS: Mac OS X 14.6.1 aarch64

Additional information

No response

@rcjverhoef rcjverhoef added the kind/bug Something isn't working label Sep 20, 2024
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 20, 2024

/cc @geoand (kotlin)

@geoand
Copy link
Contributor

geoand commented Sep 20, 2024

Any chance you can attach a sample project that exhibits the problem?

Thanks

@geoand geoand added the triage/needs-reproducer We are waiting for a reproducer. label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kotlin kind/bug Something isn't working triage/needs-reproducer We are waiting for a reproducer.
Projects
None yet
Development

No branches or pull requests

2 participants