question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support to osx-aarch_64

See original GitHub issue

A lot of libraries like Wiremock needs conscrypt to work in a native in the new mac books with m1 chip. In this moment when I execute this library I got this error: Suppressed: java.lang.UnsatisfiedLinkError: no conscrypt_openjdk_jni-osx-aarch_64 in java.library.path please add support to it. Thanks!

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:33
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
prbprbprbcommented, Mar 30, 2022

I thought this would be straightforward, but it turned out otherwise… Legacy Gradle config in Conscrypt and gaps in Gradle itself, e.g. https://github.com/gradle/gradle/pull/20310 mean it’s taken a big chunk of time.

Anyway, I’ve made enough progress to share for people willing to download and build locally, e.g. @adaladam above

Work in progress is at https://github.com/prbprbprb/conscrypt/tree/m1_gradle - It builds and the tests pass on both Intel and ARM Macs - Each case will build for both architectures but only test the host one. Which also means you need to build BoringSSL for both architectures before you start (I’ll make this a bit more flexible before we finally merge it).

Something like:

cd $BORINGSSL_HOME
mkdir build.arm
cd build.arm
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_ASM_FLAGS=-Wa,--noexecstack -DCMAKE_OSX_ARCHITECTURES=arm64 -GNinja ..
ninja
cd ..

mkdir build.x86
cd build.x86
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_ASM_FLAGS=-Wa,--noexecstack -DCMAKE_OSX_ARCHITECTURES=x86_64 -GNinja ..
ninja
cd ..

BoringSSL tests for both architectures should pass on MacOS ARM if you have Rosetta. Note that for now the BoringSSL build directory names have to exactly match what’s in the Gradle config (see NativeBuildInfo.libDir() in openjdk/build.gradle)

Once that’s done, ./gradlew check should just work…

This doesn’t solve for Linux/ARM but it lays the groundwork by removing a lot of assumptions that the only differences between targets were x86 and x86_64. Once thing that’s different is that on Linux we can’t assume that x86 hosts can always cross-compile for ARM (and vice versa), as we can on Mac, so it’ll need a bit more smarts about whether to build for the “other” architecture. Or maybe just a flag. I’ll do some more work in that direction but I don’t currently access to a Linux/ARM box for testing. Presumably a VM on an M1 Mac would do.

3reactions
svichkarcommented, Oct 27, 2021

I promise to buy MacBook on M1 once it is fixed 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add Aarch64 support for macOS · Issue #10066 · crystal-lang ...
Crystal already supports AArch64 for Linux and Darwin on x86_64, so achieve Tier 3 support as a first step should be feasible without...
Read more >
Building a Universal macOS Binary - Apple Developer
Create macOS apps and other executables that run natively on both Apple silicon and Intel-based Mac computers.
Read more >
GCC support for Apple Silicon (Arm64) on macOS requested
I'm running macOS 11.0 beta 1 on Apple Silicon. ... The abi support for aarch64 Darwin has not been added by anyone yet...
Read more >
Transitioning from x86 to arm64 on macOS - Patrick Schratz
If you are installing brew on a arm64 Mac, homebrew will add the ... There are two options how to get gfortran support...
Read more >
Can't able to install RHEL 8.3 ARM 64 on MAC with Apple ...
Resolution Only RHEL >= 9 for aarch64 can run in the M1 processor. Root Cause RHEL 7 and 8 for aarch64 are compiled...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found