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

Raspberry Pi 4 B java.lang.UnsatisfiedLinkError #9096

Closed
loziniak opened this issue Oct 29, 2021 · 1 comment
Closed

Raspberry Pi 4 B java.lang.UnsatisfiedLinkError #9096

loziniak opened this issue Oct 29, 2021 · 1 comment
Labels

Comments

@loziniak
Copy link

Hello. I've described my problem in hyperledger/besu#2974 . I have problems running Hyperledger Besu on Raspberry Pi 4 B.

I suspect the problem is caused by improper architecture detection. In rocksdb/java/src/main/java/org/rocksdb/util/Environment.java there's isAarch64() method, which expects "aarch64" string. Unfortunately, Raspberry Pi's system reports "arm":

pi@rpi1:~ $ echo "public class Arch { public static void main(String[] args) { System.out.println(System.getProperty(\"os.arch\")); } }" > Arch.java 
pi@rpi1:~ $ javac Arch.java 
pi@rpi1:~ $ java Arch
arm

Expected behavior

no errors

Actual behavior

I get this error:

java.lang.UnsatisfiedLinkError: /tmp/librocksdbjni10400974045892340195.so: /tmp/librocksdbjni10400974045892340195.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
	at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
	at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
	at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
	at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2627)
	at java.base/java.lang.Runtime.load0(Runtime.java:768)
	at java.base/java.lang.System.load(System.java:1837)
	at org.rocksdb.NativeLibraryLoader.loadLibraryFromJar(NativeLibraryLoader.java:79)
	at org.rocksdb.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:57)
	at org.rocksdb.RocksDB.loadLibrary(RocksDB.java:69)
	at org.rocksdb.RocksDB.<clinit>(RocksDB.java:38)
	at org.hyperledger.besu.plugin.services.storage.rocksdb.RocksDbUtil.loadNativeLibrary(RocksDbUtil.java:30)
	at org.hyperledger.besu.plugin.services.storage.rocksdb.segmented.RocksDBColumnarKeyValueStorage.<clinit>(RocksDBColumnarKeyValueStorage.java:66)
	at org.hyperledger.besu.plugin.services.storage.rocksdb.RocksDBKeyValueStorageFactory.create(RocksDBKeyValueStorageFactory.java:124)
	at org.hyperledger.besu.ethereum.storage.keyvalue.KeyValueStorageProviderBuilder.build(KeyValueStorageProviderBuilder.java:71)
	at org.hyperledger.besu.cli.BesuCommand.keyValueStorageProvider(BesuCommand.java:2281)
	at org.hyperledger.besu.cli.BesuCommand.getControllerBuilder(BesuCommand.java:1697)
	at org.hyperledger.besu.cli.BesuCommand.buildController(BesuCommand.java:1690)
	at org.hyperledger.besu.cli.BesuCommand.initController(BesuCommand.java:1685)
	at org.hyperledger.besu.cli.BesuCommand.run(BesuCommand.java:1223)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
	at picocli.CommandLine.access$1300(CommandLine.java:145)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
	at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:2172)
	at picocli.CommandLine.parseWithHandlers(CommandLine.java:2550)
	at org.hyperledger.besu.cli.util.ConfigOptionSearchAndRunHandler.handle(ConfigOptionSearchAndRunHandler.java:56)
	at org.hyperledger.besu.cli.util.ConfigOptionSearchAndRunHandler.handle(ConfigOptionSearchAndRunHandler.java:31)
	at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:2172)
	at picocli.CommandLine.parseWithHandlers(CommandLine.java:2550)
	at org.hyperledger.besu.cli.BesuCommand.parse(BesuCommand.java:1368)
	at org.hyperledger.besu.cli.BesuCommand.parse(BesuCommand.java:1196)
	at org.hyperledger.besu.Besu.main(Besu.java:50)

Steps to reproduce the behavior

Start Raspberry Pi 4 B from latest Raspberry Pi OS:

wget https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-05-28/2021-05-07-raspios-buster-armhf-lite.zip
unzip 2021-05-07-raspios-buster-armhf-lite.zip
dd if=downl/2021-05-07-raspios-buster-armhf-lite.img of=/dev/mmcblk0 bs=1M &

Install Besu:

ssh pi@192.168.0.100

sudo su
apt-get update
apt-get install --no-install-recommends --no-install-suggests unzip openjdk-11-jdk wget curl
adduser besu

su besu
cd ~/
wget https://hyperledger.jfrog.io/artifactory/besu-binaries/besu/21.7.4/besu-21.7.4.zip
unzip besu-21.7.4.zip
mkdir -p ~/IBFT-Network/node1/data
touch ~/IBFT-Network/genesis.json
vim ~/IBFT-Network/genesis.json

Run Besu:

./besu-21.7.4/bin/besu besu --data-path=IBFT-Network/node1/data --genesis-file=IBFT-Network/genesis.json
loziniak added a commit to loziniak/rocksdb that referenced this issue Oct 29, 2021
@loziniak
Copy link
Author

Seems I have a 32-bit OS (armhf instead of arm64 on image filename). I'll close the issue for now.

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

Successfully merging a pull request may close this issue.

2 participants