Skip to content

M3 MacBook Pro / aarch64 unable to run java-tron node. #5815

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

Closed
vn7n24fzkq opened this issue May 6, 2024 · 4 comments
Closed

M3 MacBook Pro / aarch64 unable to run java-tron node. #5815

vn7n24fzkq opened this issue May 6, 2024 · 4 comments

Comments

@vn7n24fzkq
Copy link
Contributor

vn7n24fzkq commented May 6, 2024

While building a private Tron blockchain on my MacBook M3 Pro, it appears that the current version of java-tron does not support aarch64 architecture due to issues with rocksdb.
Are there any plans to upgrade rocksdb to support aarch64?
Alternatively, is there any other solution available?

Related to the following issues:

Software Versions

OS : M3 MacBook Pro
JVM : Oracle Corporation 1.8.0_161 aarch64
Git : b1fc2f0f2bd79527099bc3027b9aba165c2e20c2
Version : 4.7.4

Expected behaviour

No errors should occur.

Actual behaviour

Encountered the following error:

$ java -jar FullNode.jar
Exception in thread "main" java.lang.IllegalStateException: Unable to load cache item
        at org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:79)
        at org.springframework.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)
        at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:134)
        at org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:319)
        at org.springframework.cglib.proxy.Enhancer.createHelper(Enhancer.java:572)
        at org.springframework.cglib.proxy.Enhancer.createClass(Enhancer.java:419)
        at org.springframework.context.annotation.ConfigurationClassEnhancer.createClass(ConfigurationClassEnhancer.java:137)
        at org.springframework.context.annotation.ConfigurationClassEnhancer.enhance(ConfigurationClassEnhancer.java:109)
        at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:447)
        at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:268)
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:325)
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:147)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:746)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564)
        at org.tron.program.FullNode.main(FullNode.java:80)
Caused by: java.lang.UnsatisfiedLinkError: /tmp/librocksdbjni6528486483309799295.so: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /tmp/librocksdbjni6528486483309799295.so) (Possible cause: can't load AMD 64-bit .so on a AARCH64-bit platform)
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1946)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1828)
        at java.lang.Runtime.load0(Runtime.java:782)
        at java.lang.System.load(System.java:1100)
        at org.rocksdb.NativeLibraryLoader.loadLibraryFromJar(NativeLibraryLoader.java:78)
        at org.rocksdb.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:56)
        at org.rocksdb.RocksDB.loadLibrary(RocksDB.java:64)
        at org.rocksdb.RocksDB.<clinit>(RocksDB.java:35)
        at org.tron.core.config.DefaultConfig.<clinit>(DefaultConfig.java:29)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:593)
        at org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:363)
        at org.springframework.cglib.proxy.Enhancer.generate(Enhancer.java:585)
        at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:110)
        at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:108)
        at org.springframework.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61)
        ... 14 more
@halibobo1205
Copy link
Contributor

This is a known issue, please compile and run with x86 jdk8 for now.

@halibobo1205
Copy link
Contributor

@vn7n24fzkq does this answer your question? Closing but please continue the discussion thread if you are looking for more info.

@vn7n24fzkq
Copy link
Contributor Author

Yes, thank you for your answer.

@abn2357
Copy link

abn2357 commented Jun 16, 2024

Here is a way using rosetta to run a java-tron node on you macbook pro (amd arch)
Firstly, Install rosetta,Command line: softwareupdate --install-rosetta

Secondly, Open a terminal using rosetta: From a Finder window, navigate to /Applications/Utilities and right-click Terminal and select Get Info. In the General section, check Open using Rosetta. run echo $(arch), You should see the response i386.

Thirdly, Download and install jdk1.8 x86 on this terminal, For example my download is jdk-8u391-macosx-x64.dmg, Install it like this

  1. hdiutil attach jdk-8u391-macosx-x64.dmg
    2.sudo installer -pkg /Volumes/JDK\ 8\ Update\ 391/JDK\ 8\ Update\ 391.pkg -target /

After done all of the above, do the normal downloading building and running step of java-tron, You will be successful to run it on you macbook(amd arch)

Hope it can help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants