* [Buildroot] libcec needs to be patched to provide a correct libcec.pc
@ 2014-06-13 21:27 Yann E. MORIN
2014-06-14 3:52 ` Bernd Kuhls
0 siblings, 1 reply; 3+ messages in thread
From: Yann E. MORIN @ 2014-06-13 21:27 UTC (permalink / raw)
To: buildroot
Bernd, All,
You previously said (on IRC) that "libcec needs to be patched in order
to provide a correct libcec.pc"
What I saw is that libcec.pc has:
Libs: -L${libdir} -lcec
Do you mean it should also have -ludev, like:
Libs: -L${libdir} -lcec -ludev
The issue I see with adding -ludev is:
- libcec can not be built static, so it is always built as a .so
- libcec.so has a DT_NEEDED tag on libudev.so.1
- normally, the linker will follow the DT_NEEDED flags of .so
So, linking a program against -lcec should be enough (unless that
program itself requires -ludev, but then it should specify it, and
that's unrelated to libcec)
Can you elaborate a bit on why and how we should patch libcec.pc,
please?
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] libcec needs to be patched to provide a correct libcec.pc
2014-06-13 21:27 [Buildroot] libcec needs to be patched to provide a correct libcec.pc Yann E. MORIN
@ 2014-06-14 3:52 ` Bernd Kuhls
2014-06-14 10:13 ` Yann E. MORIN
0 siblings, 1 reply; 3+ messages in thread
From: Bernd Kuhls @ 2014-06-14 3:52 UTC (permalink / raw)
To: buildroot
Hi Yann,
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote in
news:20140613212754.GB16169 at free.fr:
> Can you elaborate a bit on why and how we should patch libcec.pc,
> please?
when libcec finds libudev during configure
output/staging/usr/lib/pkgconfig/libcec.pc will contain
Requires: udev
When xbmc configure searches for libcec it finds this requirement and tries
to find udev.pc, which fails when only libudev is present:
checking for UDEV... yes
configure: == libusb disabled. ==
checking for CEC... no
configure: error: == libcec disabled. CEC adapter support will not be
available. ==
xbmc/config.log shows:
configure:29084: $PKG_CONFIG --exists --print-errors "libcec >= 2.1.0"
Package udev was not found in the pkg-config search path.
Perhaps you should add the directory containing `udev.pc'
to the PKG_CONFIG_PATH environment variable
No package 'udev' found
So we need to patch libcec/configure.ac in line 237 from
REQUIRES="$REQUIRES udev"
to
REQUIRES="$REQUIRES libudev"
to make xbmc happy.
Regards, Bernd
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] libcec needs to be patched to provide a correct libcec.pc
2014-06-14 3:52 ` Bernd Kuhls
@ 2014-06-14 10:13 ` Yann E. MORIN
0 siblings, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2014-06-14 10:13 UTC (permalink / raw)
To: buildroot
Bernd, All,
On 2014-06-14 05:52 +0200, Bernd Kuhls spake thusly:
> "Yann E. MORIN" <yann.morin.1998@free.fr> wrote in
> news:20140613212754.GB16169 at free.fr:
> > Can you elaborate a bit on why and how we should patch libcec.pc,
> > please?
>
> when libcec finds libudev during configure
> output/staging/usr/lib/pkgconfig/libcec.pc will contain
>
> Requires: udev
>
> When xbmc configure searches for libcec it finds this requirement and tries
> to find udev.pc, which fails when only libudev is present:
>
> checking for UDEV... yes
> configure: == libusb disabled. ==
> checking for CEC... no
> configure: error: == libcec disabled. CEC adapter support will not be
> available. ==
>
> xbmc/config.log shows:
>
> configure:29084: $PKG_CONFIG --exists --print-errors "libcec >= 2.1.0"
> Package udev was not found in the pkg-config search path.
> Perhaps you should add the directory containing `udev.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'udev' found
>
> So we need to patch libcec/configure.ac in line 237 from
>
> REQUIRES="$REQUIRES udev"
>
> to
>
> REQUIRES="$REQUIRES libudev"
>
> to make xbmc happy.
Ah! OK, I get it now! Thanks for the thorough explanations. :-)
And indeed, my libudev-only small test-case obviously demonstrates the
above:
$ ls -l staging/usr/lib/pkgconfig/
total 8
-rw-r--r-- 1 ymorin ymorin 278 Jun 13 22:58 libcec.pc
-> -rw-r--r-- 1 ymorin ymorin 509 Jun 13 22:49 libudev.pc
$ cat staging/usr/lib/pkgconfig/libcec.pc
prefix=/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: libcec
Description: Pulse-Eight CEC adapter library
URL: http://www.pulse-eight.com/
Version: 2:1:0
-> Requires: udev
Libs: -L${libdir} -lcec
Cflags: -I${includedir} -I${includedir}/libcec
So, in case we only provide a libudev, can't we just simlink udev.pc to
libudev.pc (or the other way around) as we won't patch every and all
packages in the wild?
I'll do the symlinking unless there is a good reason not to.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-14 10:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-13 21:27 [Buildroot] libcec needs to be patched to provide a correct libcec.pc Yann E. MORIN
2014-06-14 3:52 ` Bernd Kuhls
2014-06-14 10:13 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox