[yocto] Help diagnosing a build failure involving ncurses, gettext, and eglibc

Darren Hart dvhart at linux.intel.com
Wed Nov 2 17:53:05 PDT 2011


I ran into various issues trying to add mtd-utils to an image today. As
I worked through the issues, I found after fixing a couple things, I was
more guessing and grasping at straws than anything else. I'll recount
what I did, and if anyone can offer a better approach to what I did that
would have resulted in a more deterministic result, I'd appreciate it
very much.

I copied meta-tiny to a new layer. I disabled uclibc (so I'm building
with eglibc). I added mtd-utils from OE and used the DEPENDS line using
util-linux (and not util-linux-ng which we don't have in yocto). This
resulted in ncurses failing the qa configure with host contamination
with the widec headers. I first attempted to enable widechar support in
my DISTRO_FEATURES_LIBC, and rebuild eglibc. This didn't solve the
problem. This turns out to be due to ncurses configuring in widechar
support regardless of whether or not you plan to use it (it does a widec
and a narrowc configure and only builds and installs widec if you set
ENABLE_WIDEC="true". I set that to false and hacked out the widec config
step which allowed ncurses to build. I'll send a proper fix for this
tomorrow.

The next failure was with gettext compilation. Several errors about
wchar related functions being redefined in incompatible ways. I thought
this might be related to DISTRO_FEATURES_LIBC changes I made, so I
commented them all out and rebuilt eglibc so it should be using the
default Poky distro configuration for eglibc (which I assumed gettext
was known to compile with). Gettext would still not compile, claiming
the redefined functions were first defined in /usr/include/wchar.h.
Confused, thinking I had just rebuilt eglibc, I did another cleanall of
eglibc and gettext and a rebuild. Same result.

Not trusting the sanity of my tmp tree at this point, I deleted tmp and
pseudodone and rebuilt the image. Everything succeeded and my final
image with mtd-utils included was built.

I tried to capture my complete log, but screen froze on me while trying
to paste the buffer into a log :( So besides writing a bitbake wrapper
to ensure I record ALL my bitbake sessions for reference, what would you
recommend I change in the above process? What could I have done to
either avoid deleting tmp or to have identified a possible bug that
required me to delete tmp?

Thanks,

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



More information about the yocto mailing list