im using pi4j v 1.3 for i2C bus communication on my Pi 4B (Ubuntu 20 rt, java 8). The programm was cross compiled on my pc (linux x86) to target (aarch x64). If I execute it, I get the error:
Nov 19, 2024 6:44:41 PM com.pi4j.util.NativeLibraryLoader load
SEVERE: Unable to load [libpi4j.so] using path: [/lib/raspberrypi/dynamic/libpi4j.so]
java.lang.UnsatisfiedLinkError: /tmp/libpi4j7269738509998508822.so: /tmp/libpi4j7269738509998508822.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
from the step:
public RT_PWM(int bus, int address) {
try {
System.out.println("Initializing RT_PWM on I2C bus " + bus + " with address 0x" +
Integer.toHexString(address));
I2CBus i2cBus = I2CFactory.getInstance(bus); // hier is the error
pwmDevice = i2cBus.getDevice(address);
PS: im using realtime java.
but is there a version of openjdk for 32 bit? I also didnt find any infomation from pi4j that this bib only runs on 32bit system...