Openembedded Core Discussions
 help / color / mirror / Atom feed
* Issue with pkgconfig and ncurses
@ 2014-10-10 15:30 Alexandre Belloni
  2014-10-10 16:28 ` Burton, Ross
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Belloni @ 2014-10-10 15:30 UTC (permalink / raw)
  To: openembedded-core

Hi,

While building alsa-utils I ran in a weird issue. The build system was
trying to link alsa-utils with the x86_64 ncurses lib. That issue didn't
appear on another machine but could be reproduced 9 out of 10 times on
my main machine.

I tracked down the issue: when configuring alsa-utils, configure tries
to use pkg-config to fin CFLAGS/LDFLAGS for ncurses. This was failing so
it is falling back to use ncursesw5-config which points cflags and
ldflags to the x86_64 sysroot.

That is were this is nasty: the reason why pkg-config is failing is that
the configure for ncurses is doing that:
        PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
        if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then

That test fails one my main machine because at the time ncurses is
configured, PKG_CONFIG_LIBDIR (that is
tmp-external-linaro-toolchain/sysroots/am335x-evm/usr/lib/pkgconfig/) is
not yet created as ncurses is the first package trying to install .pc
files. The configure script then continues with only a warning but
deactivate .pc files installation.

This doesn't happen on my other machine because it has more cores
and finishes to build zlib before trying to configure ncurses!

I tried multiple thing ot fix that but I couldn't decide what is the
best way.

Should we fix the configure script for ncurses but then it may happen
again with another package.

Or should we enforce the creation of ${SYSROOT_DESTDIR}/usr/lib/pkgconfig/
from pkg-config. the main issue being that we actually compile
pkg-config-native and we want to create that in ${SYSROOT_DESTDIR} for
the machine.

Any help would be greatly appreciated.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Issue with pkgconfig and ncurses
  2014-10-10 15:30 Issue with pkgconfig and ncurses Alexandre Belloni
@ 2014-10-10 16:28 ` Burton, Ross
  0 siblings, 0 replies; 2+ messages in thread
From: Burton, Ross @ 2014-10-10 16:28 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: OE-core

On 10 October 2014 16:30, Alexandre Belloni
<alexandre.belloni@free-electrons.com> wrote:
> I tracked down the issue: when configuring alsa-utils, configure tries
> to use pkg-config to fin CFLAGS/LDFLAGS for ncurses. This was failing so
> it is falling back to use ncursesw5-config which points cflags and
> ldflags to the x86_64 sysroot.

http://patchwork.openembedded.org/patch/80727/ is an existing fix for
this, but it never got merged.  I've queued it locally and hopefully
we can push it into 1.7.

Ross


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-10 16:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-10 15:30 Issue with pkgconfig and ncurses Alexandre Belloni
2014-10-10 16:28 ` Burton, Ross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox