最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - Pi4J (architecture word width mismatch) - Stack Overflow

programmeradmin0浏览0评论

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...

发布评论

评论列表(0)

  1. 暂无评论