[oe] binconfig.bbclass breaks packages QA

Richard Purdie rpurdie at rpsys.net
Fri Mar 28 10:37:01 UTC 2008


On Fri, 2008-03-28 at 11:20 +0100, Stanislav Brabec wrote:
> | CROSS COMPILE Badness: /usr/include in INCLUDEPATH: /usr/include/freetype2
> | cc1: internal compiler error: in add_path, at c-incpath.c:371
> 
> We may want -isysroot instead of -isystem (and report bug above to gcc
> developers, as the report advices), but only for cross builds.

This error is from a patch we add into gcc. It causes it to error if it
ever sees -I/usr/include. This is good since that breaks things badly.

> Exactly, we may want to set CFLAGS to -isysroot= (to root to target
> system) and HOST_CFLAGS to -isystem= (to make visible our native staging
> system) for cross builds and CFLAGS to -isystem= for native builds.
> Maybe even more.

I don't think you understand the way sysroot works properly. It changes
the way gcc works internally, it looks in the sysroot instead
of /usr/include. It does not mangle paths passed in externally though.

> > The problem is that package b
> > should not be injecting the results from binconfig directly into a .pc
> > file, it should be using things like -L${libdir}/foo, not
> > -L/some/hardcoded/path.
> 
> No, in this case it is correct (at least from upstream aspect of view).
> Application may never know, that ${prefix} of the foo-config is equal to
> ${prefix} of me. So it has to trust, that foo-config application
> provided correct cflags.

The key point is "from upstream aspect of view" which doesn't consider
cross compiling. The flags are correct for passing to gcc. The flags are
not correct for the way we're using pkgconfig unfortunately.

I've had a quick look and the problem is from cups which doesn't have
a .pc file. The two solutions that spring to mind are:

1. Add a .pc file to cups and have libgnomecups use it
2. Add some sed to the libgnomecups recipe to fix the bad paths after
the compile completes.

> I just tried to disable mangling and rebuilt from scratch.
> 
> I got QA error:
> ERROR: Task 2095 (/OE/org.openembedded.dev/packages/fontconfig/fontconfig_2.4.1.bb, do_qa_configure) failed

That doesn't surprise me as we need that mangling. The problem is when
it leaks into the .pc space which we've cleaned up. I think everyone
would agree the .pc situation is much nicer than it used to be, we just
need to fix the relatively small number of corner cases where "bad" data
is leaking in and this is one of them.

> So I disabled the QA check, and I got above mentioned internal compiler error.

Again, totally expected. We should never be calling the cross compiler
with -I/usr/include and since you removed the mangling it would start
doing that.

Cheers,

Richard





More information about the Openembedded-devel mailing list