[oe] Cross compile badness with /usr/include/libffi solved

Geoffrey Wossum geoffrey at pager.net
Mon Apr 14 18:10:30 UTC 2008


Hi all,

Last week I encountered a problem building gcc-cross on my system.  I would 
get something along the lines of:

CROSS COMPILE Badness: /usr/include in INCLUDEPATH: /usr/include/libffi 

I found several of hits on Google for this, but no real solution.

After much headscratching and a debugger session later, I figured out that my 
CPATH environment variable (which I had been previously unaware of) was set 
in my environment.  This was being set on my Gentoo system 
by /etc/env.d/99libffi, which was there because I had installed libffi on my 
system.  I've had libffi installed the whole time I've been working with OE, 
but hadn't noticed because I hadn't been trying to use  a compiler with 
zecke-no-host-includes.patch applied.

Simply adding an "unset CPATH" in my script I source before building OE makes 
the problem go away.

It seems like adding an "unset CPATH" to the run.do_* scripts bitbake creates 
would be a good idea to prevent problems like this in the future.  Or is 
pulling in the users CPATH a feature?

---
Geoffrey






More information about the Openembedded-devel mailing list