Skip to content
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

How to build for the aarch64? #102

Open
huangtianhua opened this issue May 25, 2019 · 8 comments
Open

How to build for the aarch64? #102

huangtianhua opened this issue May 25, 2019 · 8 comments

Comments

@huangtianhua
Copy link

When I execute 'mvn test' for apache/spark project, I receive an error like:
[ERROR] copyIndexDescendingWithStart(org.apache.spark.util.kvstore.LevelDBIteratorSuite) Time elapsed: 0.2 s <<< ERROR!
java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no leveldbjni64-1.8 in java.library.path, no leveldbjni-1.8 in java.library.path, no leveldbjni in java.library.path, /usr/local/src/spark/common/kvstore/target/tmp/libleveldbjni-64-1-610267671268036503.8: /usr/local/src/spark/common/kvstore/target/tmp/libleveldbjni-64-1-610267671268036503.8: cannot open shared object file: No such file or directory (Possible cause: can't load AMD 64-bit .so on a AARCH64-bit platform)]
at org.apache.spark.util.kvstore.LevelDBIteratorSuite.createStore(LevelDBIteratorSuite.java:44)

and the detail in http://paste.openstack.org/show/752063/, seems there is no native package for aarch64 in leveldbjni-1.8(all) .jar, I found aarch64 is supported after pr #82, but it was not in the 1.8 release, right? And I can't find any update or release after that. How I can fix this, or how to build it for aarch64? Ask for help, thank you !

@ZhengZhenyu
Copy link

@chirino @johnmark @JunHe77

@huangtianhua
Copy link
Author

@JunHe77 I have already deploy the leveldbjni-all-1.8.jar which support aarch64, see https://search.maven.org/search?q=g:org.openlabtesting.leveldbjni :) I based on the master. The details you can find theopenlab@aa6b14a

@ZhengZhenyu
Copy link

@JunHe77 Hi Jun, thanks for the info and your previous helps. We are trying to making bigdata ecosystem more compatible with ARM architecture natively from upstream. I know that you and your team are really experienced in this area, I wonder if we can cooperate ion this goal. We have sent out maillists and reported issues in projects like Hadoop, Spark, Flink etc, is it possible for you guys to show some supports in those mails and issues? :)

@KaloyanTanev
Copy link

KaloyanTanev commented Sep 1, 2021

Did somebody try running @huangtianhua's solution on Apple M1 chip? It should be the same architecture (64-bit ARM), but still got the same error: Could not load any of the factory classes: org.openlabtesting.leveldbjni.JniDBFactory, org.iq80.leveldb.impl.Iq80DBFactory.

I am using sbt and add as a dependency "org.openlabtesting.leveldbjni" % "leveldbjni-linux64-aarch64" % "1.8". Then in my class LevelDBFactory I have:
private val nativeFactory = "org.openlabtesting.leveldbjni.JniDBFactory"
private val javaFactory = "org.iq80.leveldb.impl.Iq80DBFactory".

@csaltos
Copy link

csaltos commented May 14, 2022

Did somebody try running @huangtianhua's solution on Apple M1 chip? It should be the same architecture (64-bit ARM), but still got the same error: Could not load any of the factory classes: org.openlabtesting.leveldbjni.JniDBFactory, org.iq80.leveldb.impl.Iq80DBFactory.

Sadly they are a different target, while they are based on the same architecture (ARM64) they are different operating systems ... is like having a computer running Windows on an Intel chip and a Macintosh running on an Intel chip ... it's the same chip but totally different operating systems where a Windows executable will not work on a Macintosh machine or a Linux on a Mac (at least directly in native mode)

@csaltos
Copy link

csaltos commented May 14, 2022

@JunHe77 I have already deploy the leveldbjni-all-1.8.jar which support aarch64, see https://search.maven.org/search?q=g:org.openlabtesting.leveldbjni :) I based on the master. The details you can find theopenlab@aa6b14a

Thank you very much !! ... You are a big data hero !! ;) :)

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

No branches or pull requests

5 participants