[Raspberry 2B] I can't load native libraries. #64
Replies: 4 comments 5 replies
-
Hi Arnaud, can you tell me which java version you are using? I don't have a 2B available so can not try out myself. I see it's a arm7 so should be OK to run "default" JDK 11, but just to exclude we need to look into that direction. |
Beta Was this translation helpful? Give feedback.
1 reply
-
I think we have the issue right there: pi4j-v2 /doesn't/ use WiringPi
but pigpio. Can you apt-get install pigpio and see what happens?
Regards,
Jim.
…On 15/02/2021 12:45, arhamel wrote:
Hi Frank,
I tested with an OpenJDK 14:
***@***.***:~ $ java --version openjdk 14 2020-03-16 OpenJDK Runtime
Environment (build 14+36) OpenJDK Server VM (build 14+36, mixed mode) |
then an 11:
***@***.***:~ $ java --version openjdk 11.0.10 2021-01-19 LTS OpenJDK
Runtime Environment Zulu11.45+27-CA (build 11.0.10+9-LTS) OpenJDK
Client VM Zulu11.45+27-CA (build 11.0.10+9-LTS, mixed mode) |
with the same results:
|13:18:49 [main] ERROR c.p.l.p.u.NativeLibraryLoader:167 - **Unable to
load [libpi4j-pigpio.so]** using path: [/lib/armhf/libpi4j-pigpio.so]
java.lang.UnsatisfiedLinkError:
/tmp/libpi4j-pigpio16633900768987907578.so: libpigpio.so.1: Ne peut
ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce type
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
com.pi4j.library.pigpio.util.NativeLibraryLoader.loadLibraryFromClasspath(NativeLibraryLoader.java:223)
at
com.pi4j.library.pigpio.util.NativeLibraryLoader.load(NativeLibraryLoader.java:164)
at com.pi4j.library.pigpio.internal.PIGPIO.<clinit>(PIGPIO.java:76) |
I'm trying to migrate from Pi4J version 1.2 to v2-snapshot. The v1.2
works perfectly on my Rasberry 2B (libraries are well found).
To install the V2, I have:
* manually install WiringPi v2.60
***@***.***:~# gpio -v gpio version: 2.60 Copyright (c) 2012-2018 Gordon
Henderson |
* Using Pi4J through Maven:
|<dependencies> <dependency> <groupId>com.pi4j</groupId>
<artifactId>pi4j-core</artifactId> <version>2.0-SNAPSHOT</version>
</dependency> <dependency> <groupId>com.pi4j</groupId>
<artifactId>pi4j-plugin-raspberrypi</artifactId>
<version>2.0-SNAPSHOT</version> <scope>runtime</scope> </dependency>
<dependency> <groupId>com.pi4j</groupId>
<artifactId>pi4j-plugin-pigpio</artifactId>
<version>2.0-SNAPSHOT</version> <scope>runtime</scope> </dependency> .... |
After unzipping the jars' files, I don't see the libraries (.so).
Where are the files /libpi4j-pigpio.so, libpigpiod_if2.so,
libpigpiod_if.so and libpigpio.so/?
Is there a way to compile them directly on the Rasberry? (I'm not
familiar with Makefile and I didn't succeed).
Tx for your time !
Bests regards,
Arnaud.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#64 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABWGJS3CSU4QYFNKBKYRLW3S7EJPRANCNFSM4XTIZ45Q>.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
That looks like an astonishingly old version, can you try dpkg -l pigpio?
I get:
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-===============================================
ii pigpio 1.71-0~rpt1 armhf Raspberry Pi GPIO control
transitional package.
So you should be on version 71.
Regards,
Jim.
…On 15/02/2021 13:49, arhamel wrote:
Hi,
***@***.***:~# apt-get install pigpio Reading package lists... Done
Construction of the dependency tree Reading status information... Done
pigpio is already the latest version available. pigpio has been
switched to "manually installed". 0 updated, 0 newly installed, 0 to
remove and 0 not updated. |
Do you want I uninstall my version to take the repository version?
Actually, I have:
***@***.***:~# pigpiod -v 60 |
Regards,
Arnaud.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#64 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABWGJS7R5ANHPM45CF27Q53S7EQ7HANCNFSM4XTIZ45Q>.
|
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected
-
I think the key statement should be “just use the system-provided
version of the libraries and keep them up to date (unless you /really/
know what you're doing).”
I've had this type of problem elsewhere and it's very hard to chase down
with an unknown system underneath you.
Jim.
…On 16/02/2021 08:17, Frank Delporte wrote:
Nice so maybe this needs some more documentation in the v2-site...
Thanks @hackerjimbo <https://github.com/hackerjimbo> for the support here!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#64 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABWGJS4PNAIY3FWHHBQLSHDS7IS2RANCNFSM4XTIZ45Q>.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm looking to use Pi4J 2.0-SNAPSHOT on a Raspberry 2B :
I can't load native libraries. In fact, I can't find them: neither in the jar files, nor in the dependencies.
I decided to recompile his libraries, but I couldn't do it for my machine: I have this error ar runtime :
for information:
How to find and install these libraries on my old Pi 2B?
Thanks for your answers!
Regards,
Arnaud.
Beta Was this translation helpful? Give feedback.
All reactions