GithubHelp home page GithubHelp logo

Support ARM64 / aarch64 [1 XMR] about haveno HOT 13 OPEN

woodser avatar woodser commented on August 16, 2024 1
Support ARM64 / aarch64 [1 XMR]

from haveno.

Comments (13)

github-actions avatar github-actions commented on August 16, 2024

There is a bounty on this issue, the amount is in the title. The reward will be awarded to the first person or group of people who resolves this issue.

If you are starting to work on this bounty, please write a comment, so that we can assign the issue to you. We expect contributors to provide a PR in a reasonable time frame or, in case of an extensive work, updates on their progresses. We will unassign the issue if we feel the assignee is not responsive or has abandoned the task.

Read the full conditions and details of our bounty system.

from haveno.

preland avatar preland commented on August 16, 2024

I believe upgrading JavaFX to a version above version 17-ea+8 will fix this issue, assuming it doesnโ€™t break anything else in the project (the current version of JavaFX in the project is 16)

from haveno.

preland avatar preland commented on August 16, 2024

(The reason for this is that javafx just doesn't exist for arm64 before 17)

Another large note is that JFoenix doesn't support any javafx version after 16 (what a coincidence). There appears to be some attempts to continue it past 17, (the most promising one I see is (this one)[https://github.com/ihmcrobotics/JFoenix-Group]; however I can't currently get it to work using jitpack

from haveno.

woodser avatar woodser commented on August 16, 2024

FYI we've updated to JDK and JFX 21 on the master branch.

The app is working for me as a native ARM64 app on macOS.

However getting an error on Ubuntu ARM64 VM running on macOS (even after updating TOR with #794):

Mar-12 13:04:36.567 [StartTor] INFO  o.b.netlayer.tor.Tor: Starting Tor 
Mar-12 13:04:36.585 [ERR] ERROR o.b.netlayer.tor.Tor: rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2 
Mar-12 13:04:36.685 [ERR] ERROR o.b.netlayer.tor.Tor:   
Mar-12 13:04:36.686 [StartTor] ERROR h.n.p2p.network.TorNetworkNode: Starting tor node failed org.berndpruenster.netlayer.tor.TorCtlException: Could not setup Tor
	at org.berndpruenster.netlayer.tor.NativeTor.<init>(NativeTor.kt:106)
	at org.berndpruenster.netlayer.tor.NativeTor.<init>(NativeTor.kt:55)
	at org.berndpruenster.netlayer.tor.NativeTor.<init>(NativeTor.kt)
	at haveno.network.p2p.network.NewTor.getTor(NewTor.java:107)
	at haveno.network.p2p.network.TorNetworkNode.lambda$createTorAndHiddenService$10(TorNetworkNode.java:172)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.io.IOException: java.io.IOException: Tor exited with value 133
	at org.berndpruenster.netlayer.tor.TorContext.installAndStartTorOp(TorContext.kt:392)
	at org.berndpruenster.netlayer.tor.NativeTor.<init>(NativeTor.kt:66)
	... 8 common frames omitted
Caused by: java.io.IOException: Tor exited with value 133
	at org.berndpruenster.netlayer.tor.TorContext.installAndStartTorOp(TorContext.kt:354)
	... 9 common frames omitted

This suggests something in the app is still using x86 version?

from haveno.

woodser avatar woodser commented on August 16, 2024

I created a new VM without x86 emulation, and now I'm getting this error on Ubuntu ARM64 from the master branch. Hopefully others will see the same:

Mar-14 19:19:40.523 [ERR] ERROR o.b.netlayer.tor.Tor: /home/woodser/.local/share/Haveno/xmr_stagenet/tor/tor: 2: Syntax error: Unterminated quoted string 
Mar-14 19:19:40.524 [StartTor] ERROR h.n.p2p.network.TorNetworkNode: Starting tor node failed org.berndpruenster.netlayer.tor.TorCtlException: Could not setup Tor
	at org.berndpruenster.netlayer.tor.NativeTor.<init>(NativeTor.kt:106)
	at org.berndpruenster.netlayer.tor.NativeTor.<init>(NativeTor.kt:55)
	at org.berndpruenster.netlayer.tor.NativeTor.<init>(NativeTor.kt)
	at haveno.network.p2p.network.NewTor.getTor(NewTor.java:107)
	at haveno.network.p2p.network.TorNetworkNode.lambda$createTorAndHiddenService$10(TorNetworkNode.java:172)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.io.IOException: java.io.IOException: Tor exited with value 2
	at org.berndpruenster.netlayer.tor.TorContext.installAndStartTorOp(TorContext.kt:392)
	at org.berndpruenster.netlayer.tor.NativeTor.<init>(NativeTor.kt:66)
	... 8 common frames omitted
Caused by: java.io.IOException: Tor exited with value 2
	at org.berndpruenster.netlayer.tor.TorContext.installAndStartTorOp(TorContext.kt:354)
	... 9 common frames omitted

from haveno.

preland avatar preland commented on August 16, 2024

Interesting; is that file (...../xmr_stagenet/tor/tor) a bash script? The reason I ask is that the error strongly implies that it is, but the equivalent file on my system is not a bash script.

from haveno.

woodser avatar woodser commented on August 16, 2024

Interesting; is that file (...../xmr_stagenet/tor/tor) a bash script? The reason I ask is that the error strongly implies that it is, but the equivalent file on my system is not a bash script.

It's a binary.

from haveno.

woodser avatar woodser commented on August 16, 2024

Very likely the wrong tor binary is being downloaded for arm64.

from haveno.

preland avatar preland commented on August 16, 2024

Looking into it, there actually isn't an official ARM64 tor-binary (see here).

There have been unofficial builds, and there have been several PRs attempting to add it, with none of them being accepted. Sadly, it seems the tor project has had reasons to avoid adding arm64 support in the past.

from haveno.

preland avatar preland commented on August 16, 2024

MacOS ARM64 is supported, and since the current tor-binary implementation grabs the universal binary, there (shouldn't) be any issues for MacOS Apple Silicon.

from haveno.

woodser avatar woodser commented on August 16, 2024

Can confirm it's working on macOS ARM64, but didn't know if the in-built rosetta translation is helping it work.

Whereas we get an error on Ubuntu ARM64 (virtualized on macOS), and yeah it seems they don't release the tor binary for that platform.

from haveno.

phytohydra avatar phytohydra commented on August 16, 2024

Most linux distributions have a tor daemon binary package already in the repos, including on arm64. Maintaining just the tor daemon is much easier than porting and packaging the entire Tor Browser.

Instead of getting your own copy directly from the Tor Project, you can make tor daemon a build/install dependency, have your install script set up the environment for the private instance you're going to be running, with your own data directory and torrc file, then at runtime invoke the system binary with --torrc-file <your torrc> to run your private instance with the config you need. I think that's the way you're supposed to be doing it.

from haveno.

NorrinRadd avatar NorrinRadd commented on August 16, 2024

FYI we've updated to JDK and JFX 21 on the master branch.

The app is working for me as a native ARM64 app on macOS.

However getting an error on Ubuntu ARM64 VM running on macOS (even after updating TOR with #794):

Mar-12 13:04:36.567 [StartTor] INFO  o.b.netlayer.tor.Tor: Starting Tor 
Mar-12 13:04:36.585 [ERR] ERROR o.b.netlayer.tor.Tor: rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2 
Mar-12 13:04:36.685 [ERR] ERROR o.b.netlayer.tor.Tor:   
Mar-12 13:04:36.686 [StartTor] ERROR h.n.p2p.network.TorNetworkNode: Starting tor node failed org.berndpruenster.netlayer.tor.TorCtlException: Could not setup Tor
	at org.berndpruenster.netlayer.tor.NativeTor.<init>(NativeTor.kt:106)
	at org.berndpruenster.netlayer.tor.NativeTor.<init>(NativeTor.kt:55)
	at org.berndpruenster.netlayer.tor.NativeTor.<init>(NativeTor.kt)
	at haveno.network.p2p.network.NewTor.getTor(NewTor.java:107)
	at haveno.network.p2p.network.TorNetworkNode.lambda$createTorAndHiddenService$10(TorNetworkNode.java:172)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.io.IOException: java.io.IOException: Tor exited with value 133
	at org.berndpruenster.netlayer.tor.TorContext.installAndStartTorOp(TorContext.kt:392)
	at org.berndpruenster.netlayer.tor.NativeTor.<init>(NativeTor.kt:66)
	... 8 common frames omitted
Caused by: java.io.IOException: Tor exited with value 133
	at org.berndpruenster.netlayer.tor.TorContext.installAndStartTorOp(TorContext.kt:354)
	... 9 common frames omitted

This suggests something in the app is still using x86 version?

The commit to upgrade to jfx 21 did not resolve the prism error for me.

WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @66f57048' Loading library prism_es2 from resource failed: java.lang.UnsatisfiedLinkError: /Users/user/.openjfx/cache/21.0.2+5/aarch64/libprism_es2.dylib: dlopen(/Users/user/.openjfx/cache/21.0.2+5/aarch64/libprism_es2.dylib, 0x0001): tried: '/Users/user/.openjfx/cache/21.0.2+5/aarch64/libprism_es2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/user/.openjfx/cache/21.0.2+5/aarch64/libprism_es2.dylib' (no such file), '/Users/user/.openjfx/cache/21.0.2+5/aarch64/libprism_es2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

However, the file seems to be aarm64

$ otool -h /Users/user/.openjfx/cache/21.0.2+5/aarch64/libprism_es2.dylib /Users/user/.openjfx/cache/21.0.2+5/aarch64/libprism_es2.dylib: Mach header magic cputype cpusubtype caps filetype ncmds sizeofcmds flags 0xfeedfacf 16777223 3 0x00 6 23 2560 0x00100085

from haveno.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.