From: Kent Gibson <warthog618@gmail.com>
To: Le Chaudron Nautique <vanvan@chaudron-nautique.fr>
Cc: linux-gpio@vger.kernel.org
Subject: Re: libgpiod 2.2 installation on RaspberryPi 4
Date: Fri, 1 Nov 2024 13:24:47 +0800 [thread overview]
Message-ID: <20241101052447.GA110734@rigel> (raw)
In-Reply-To: <3404b96e-f858-48b4-abfc-0a836d00e730@chaudron-nautique.fr>
On Thu, Oct 31, 2024 at 03:17:32PM +0100, Le Chaudron Nautique wrote:
>
> Le 31/10/2024 à 03:08, Kent Gibson a écrit :
> > On Wed, Oct 30, 2024 at 09:59:05PM +0100, Le Chaudron Nautique wrote:
> > > Hello,
> > >
> > Here is what I get using that tarball and:
> >
> > ./autogen.sh --prefix=/usr/local --enable-examples
> > make
> > sudo make install
> >
> > pi@pi4:~/libgpiod-2.2 $ ls -l /usr/local/lib
> > total 372
> > -rw-r--r-- 1 root root 239480 Oct 31 09:40 libgpiod.a
> > -rwxr-xr-x 1 root root 946 Oct 31 09:40 libgpiod.la
> > lrwxrwxrwx 1 root root 17 Oct 31 09:40 libgpiod.so -> libgpiod.so.3.1.1
> > lrwxrwxrwx 1 root root 17 Oct 31 09:40 libgpiod.so.3 -> libgpiod.so.3.1.1
> > -rwxr-xr-x 1 root root 155480 Oct 31 09:40 libgpiod.so.3.1.1
> > drwxr-xr-x 2 root root 4096 Oct 31 09:40 pkgconfig
> > drwxr-xr-x 4 root root 4096 Jan 13 2024 python3.11
> >
> > pi@pi4:~/libgpiod-2.2 $ ldd examples/.libs/get_chip_info
> > linux-vdso.so.1 (0x0000007f9e276000)
> > libgpiod.so.3 => /usr/local/lib/libgpiod.so.3 (0x0000007f9e1e0000)
> > libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f9e030000)
> > /lib/ld-linux-aarch64.so.1 (0x0000007f9e239000)
> >
> > pi@pi4:~/libgpiod-2.2 $ examples/get_chip_info
> > gpiochip0 [pinctrl-bcm2711] (58 lines)
> >
> > What do you get?
> I didn't add the --enable-examples, I took the code from git and put it in
> my test file/directory.
Adding the --enable-examples is just a convenient way to get the
examples built. Building it manually is fine too.
>
> vanvan@lcntest-stable:~/prog/userspace $ ldd prog
> linux-vdso.so.1 (0x0000007fa851e000)
> libgpiod.so.3 => not found
> libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007fa8300000)
> /lib/ld-linux-aarch64.so.1 (0x0000007fa84e1000)
>
> Should I look at/capture the autogen logs to see if something is amiss ?
>
No, the issue is ld not locating the library in /usr/local/lib for some reason.
What does
$ ldconfig -p | grep libgpiod
show?
I get:
pi@pi4:~/libgpiod-2.2 $ ldconfig -p | grep libgpiod
libgpiodcxx.so.1 (libc6,AArch64) => /lib/aarch64-linux-gnu/libgpiodcxx.so.1
libgpiod.so.3 (libc6,AArch64) => /usr/local/lib/libgpiod.so.3
libgpiod.so.2 (libc6,AArch64) => /lib/aarch64-linux-gnu/libgpiod.so.2
libgpiod.so (libc6,AArch64) => /usr/local/lib/libgpiod.so
If that doesn't provide a libgpiod.so.3 location for you then try
$ sudo ldconfig
to update the ld cache, and then repeating the above and the ldd.
If that doesn't work, try setting
$ export LD_LIBRARY_PATH=/usr/local/lib
and repeating the ldd.
Cheers,
Kent.
next prev parent reply other threads:[~2024-11-01 5:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 20:59 libgpiod 2.2 installation on RaspberryPi 4 Le Chaudron Nautique
2024-10-31 2:08 ` Kent Gibson
2024-10-31 14:17 ` Le Chaudron Nautique
2024-11-01 5:24 ` Kent Gibson [this message]
[not found] ` <df44ef64-0534-4a18-8024-ba0d56fa16fb@chaudron-nautique.fr>
2024-11-05 1:07 ` Kent Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241101052447.GA110734@rigel \
--to=warthog618@gmail.com \
--cc=linux-gpio@vger.kernel.org \
--cc=vanvan@chaudron-nautique.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox