[oe] binconfig.bbclass breaks packages QA
Stanislav Brabec
utx at penguin.cz
Fri Mar 28 10:20:05 UTC 2008
Richard Purdie wrote:
> On Fri, 2008-03-28 at 01:12 +0100, Stanislav Brabec wrote:
> > After the fix, maybe binconfig files could be moved to the
> > standard staging directory (it must be in build path then).
> >
> > Could anybody with deeper insight confirm it or do this change?
>
> We still need that mangling unfortunately.
Grr.
| 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.
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.
Automake based programs should be smart enough to discriminate between
build of native compile-time helper and target binary. (But I guess,
that some of them may fail.)
-isystem dir
Search dir for header files, after all directories specified by -I
but before the standard system directories. Mark it as a system
directory, so that it gets the same special treatment as is applied
to the standard system directories. If dir begins with "=", then
the "=" will be replaced by the sysroot prefix; see --sysroot and
-isysroot.
-isysroot dir
This option is like the --sysroot option, but applies only to
header files. See the --sysroot option for more information.
--sysroot=dir
Use dir as the logical root directory for headers and libraries.
For example, if the compiler would normally search for headers in
/usr/include and libraries in /usr/lib, it will instead search
dir/usr/include and dir/usr/lib.
> 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.
> I'll have a look at that package and see if I can fix it.
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
So I disabled the QA check, and I got above mentioned internal compiler error.
Well, I tried to replace -isystem by -isysroot, but native builds don't
like it:
shasum-native-1.0-r1:
main.c:1:19: error: stdio.h: No such file or directory
Hmmm. And I don't know, how to set CFLAGS differently for native and
cross builds.
--
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
More information about the Openembedded-devel
mailing list