-
Notifications
You must be signed in to change notification settings - Fork 27
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
amd64 shared library loaded on M1 Mac running in Rosetta (needing amd64 libraries) #99
Comments
@tnull spent a bit of time trying to repro, and wasn't able to. What JVM are you using here? |
Oh awesome! Just trying out a different JVM actually fixed the issue. I guess that's both good and bad for you though, since it's harder to reproduce I guess. I was using Temurin I can close the issue, unless you'd like to keep it live to keep digging. I'm happy to try and help debugging like we did on Discord last week, or to send you the extra long error file that gets printed when the errors happen. |
Huh! That's....strange, but glad it works? Is the Temurin 11.0.14 release actually x86_64 running with rosetta or is it native arm64? |
Oh good question. Turns out my 11.0.4 is an x86_64 so must have been running on Rosetta, whereas my 17.0.2 is arm64. ❯ file /Users/tb/.sdkman/candidates/java/17.0.2-tem/bin/java
/Users/tb/.sdkman/candidates/java/17.0.2-tem/bin/java: Mach-O 64-bit executable arm64
❯ file /Users/tb/.sdkman/candidates/java/11.0.14-tem/bin/java
/Users/tb/.sdkman/candidates/java/11.0.14-tem/bin/java: Mach-O 64-bit executable x86_64 |
It gets confusing because whether you download the right or the wrong JDK for your architecture it adapts by running it on Rosetta and you don't even notice... Anyway that's probably where the problems stem from. |
Ah! Okay, so I guess then we incorrectly load the amd64 library on x86 (well, rosetta) and that causes a crash, okay, well at least we (probably) know the bug, then. |
For me they don't work with either jvm architecture ( And it seems to be an issue with binding to a couple of native methods missing java.lang.UnsatisfiedLinkError: 'void org.ldk.enums.Network.init()'
at org.ldk.enums.Network.init(Native Method)
at org.ldk.enums.Network.<clinit>(Network.java:24)
at lightning.NetworkGraphKt.<clinit>(NetworkGraph.kt:6) NetworkGraphpackage lightning
import org.ldk.enums.Network
import org.ldk.structs.NetworkGraph
val network = Network.LDKNetwork_Regtest
val networkGraph = NetworkGraph.of(network, logger) JDK 0.0.118.0 in
|
@TheBlueMatt Do you think the above is rather a separate issue? I'll provide more details and file a new one if you confirm 👍🏻 |
Hey, sorry for the delay. Can you check that the .nativelib file(s) from the original LDK jar are being included in your built JAR? I'm not sure that gradle does that by default. |
Yeah, they are included. It's more likely the same issue pointed in discord under |
Ah, okay, your issue was unrelated, then, tracking as #149 |
@TheBlueMatt Clear, that makes sense! |
A few of the methods seem to create problems on the native side of things. Here is an example of an error I get:
To reproduce, simply fire up the
kdlk
node here on an M1 and run thestartnode
command.The error above happens at the
networkGraph
initialization step, but commenting that out allows us to find similar errors happening on theuserConfig
or thetransactionFilter
steps:The text was updated successfully, but these errors were encountered: