ValdemarGr / mezel

Scala BSP implementation for Bazel.
Apache License 2.0
17 stars 2 forks source link

UnsatisfiedLinkError "(fat file, but missing compatible architecture (have (i386,x86_64), need (arm64e)))" #37

Closed eed3si9n closed 2 months ago

eed3si9n commented 2 months ago

steps

  1. set up Mezel on an ARM macOS
  2. open a Scala file in VS Code

problem

2024.08.29 18:46:41 INFO  BSP server: Exception in thread "io-compute-9" java.lang.UnsatisfiedLinkError: /Users/xxx/Library/Caches/JNA/temp/jna8912403222870258070.tmp: dlopen(/Users/xxx/Library/Caches/JNA/temp/jna8912403222870258070.tmp, 0x0001): tried: '/Users/xxx/Library/Caches/JNA/temp/jna8912403222870258070.tmp' (fat file, but missing compatible architecture (have (i386,x86_64), need (arm64e)))
2024.08.29 18:46:41 INFO  BSP server:   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
2024.08.29 18:46:41 INFO  BSP server:   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1950)
2024.08.29 18:46:41 INFO  BSP server:   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1832)
2024.08.29 18:46:41 INFO  BSP server:   at java.lang.Runtime.load0(Runtime.java:811)
2024.08.29 18:46:41 INFO  BSP server:   at java.lang.System.load(System.java:1088)
2024.08.29 18:46:41 INFO  BSP server:   at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1018)
2024.08.29 18:46:41 INFO  BSP server:   at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:988)
2024.08.29 18:46:41 INFO  BSP server:   at com.sun.jna.Native.<clinit>(Native.java:195)
2024.08.29 18:46:41 INFO  BSP server:   at com.sun.jna.NativeLibrary.<clinit>(NativeLibrary.java:87)
2024.08.29 18:46:41 INFO  BSP server:   at com.zaxxer.nuprocess.internal.LibC.<clinit>(LibC.java:38)
2024.08.29 18:46:41 INFO  BSP server:   at com.zaxxer.nuprocess.osx.ProcessKqueue.<clinit>(ProcessKqueue.java:58)
2024.08.29 18:46:41 INFO  BSP server:   at com.zaxxer.nuprocess.osx.OsxProcess.<clinit>(OsxProcess.java:42)
2024.08.29 18:46:41 INFO  BSP server:   at com.zaxxer.nuprocess.osx.OsxProcessFactory.createProcess(OsxProcessFactory.java:33)
2024.08.29 18:46:41 INFO  BSP server:   at com.zaxxer.nuprocess.NuProcessBuilder.start(NuProcessBuilder.java:259)
2024.08.29 18:46:41 INFO  BSP server:   at mezel.CatsProcess$.$anonfun$1$$anonfun$1$$anonfun$1$$anonfun$1$$anonfun$2$$anonfun$2$$anonfun$1(CatsProcess.scala:80)
2024.08.29 18:46:41 INFO  BSP server:   at cats.effect.IOFiber.runLoop(IOFiber.scala:396)
2024.08.29 18:46:41 INFO  BSP server:   at cats.effect.IOFiber.execR(IOFiber.scala:1364)
2024.08.29 18:46:41 INFO  BSP server:   at cats.effect.IOFiber.run(IOFiber.scala:112)
2024.08.29 18:46:41 INFO  BSP server:   at cats.effect.unsafe.WorkerThread.run(WorkerThread.scala:743)
2024.08.29 18:46:41 INFO  BSP server: java.lang.UnsatisfiedLinkError: /Users/xxx/Library/Caches/JNA/temp/jna8912403222870258070.tmp: dlopen(/Users/xxx/Library/Caches/JNA/temp/jna8912403222870258070.tmp, 0x0001): tried: '/Users/xxx/Library/Caches/JNA/temp/jna8912403222870258070.tmp' (fat file, but missing compatible architecture (have (i386,x86_64), need (arm64e)))

expectation

It works.

note

See https://github.com/brettwooldridge/NuProcess/issues/129. Updating to the latest nuprocess might fix this?

ValdemarGr commented 2 months ago

I deployed your PR (v0.2.7). Do tell if you bump into any more issues :)

eed3si9n commented 2 months ago

Thanks. I think this particular issue is now resolved.