Bug 2259 - poky-tiny: m4 and gettext fail to compile for meta-toolchain target
Summary: poky-tiny: m4 and gettext fail to compile for meta-toolchain target
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.2
Hardware: x86 Multiple
: High critical
Target Milestone: 1.2
Assignee: Nitin Kamble
QA Contact:
URL:
Whiteboard: (1.2) commits to fix the issue sent t...
Depends on:
Blocks:
 
Reported: 2012-04-06 22:43 UTC by Darren Hart
Modified: 2012-04-17 18:40 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
bitbake output and do_compile log (113.48 KB, application/octet-stream)
2012-04-17 16:23 UTC, Reinette Chatre
no flags Details
eglibc do_compile log (89.95 KB, application/x-bzip2)
2012-04-17 17:04 UTC, Reinette Chatre
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Darren Hart 2012-04-06 22:43:11 UTC
With Bug 2089 resolved, the meta-toolchain still fails to build with m4 and gettext failing do_compile:

OE Build Configuration:
BB_VERSION        = "1.15.1"
TARGET_ARCH       = "i586"
TARGET_OS         = "linux"
MACHINE           = "qemux86"
DISTRO            = "poky-tiny"
DISTRO_VERSION    = "1.1+snapshot-20120406"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta
meta-yocto        = "master:190f6d791d51aaa4cfb9f1cf932bc205ff674fb5"
meta-kernel-dev   = "master:a521d099327773574e26701397a2c0bc6fd66fd2"

...

Summary: 2 tasks failed:
  /home/dvhart/source/poky/meta/recipes-devtools/m4/m4_1.4.16.bb, do_compile
  /home/dvhart/source/poky/meta/recipes-core/gettext/gettext_0.18.1.1.bb, do_compile

These both appear to be wchar related.

The m4 do_compile failure from the log follows:

...

| In file included from btowc.c:21:0:
| ./wchar.h:490:1: error: conflicting types for 'mbsinit'
| /build/poky/tiny/qemux86/tmp/sysroots/qemux86/usr/include/wchar.h:359:12: note: previous declaration of 'mbsinit' was here
| ./wchar.h:517:1: error: conflicting types for 'mbrtowc'
| /build/poky/tiny/qemux86/tmp/sysroots/qemux86/usr/include/wchar.h:363:15: note: previous declaration of 'mbrtowc' was here
| ./wchar.h:637:1: error: conflicting types for 'wcrtomb'
| /build/poky/tiny/qemux86/tmp/sysroots/qemux86/usr/include/wchar.h:368:15: note: previous declaration of 'wcrtomb' was here
| i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/build/poky/tiny/qemux86/tmp/sysroots/qemux86 -std=gnu99  -I.     -O2 -pipe -g -feliminate-unused-debug-types -c cloexec.c
| i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/build/poky/tiny/qemux86/tmp/sysroots/qemux86 -std=gnu99  -I.     -O2 -pipe -g -feliminate-unused-debug-types -c close-stream.c
| i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/build/poky/tiny/qemux86/tmp/sysroots/qemux86 -std=gnu99  -I.     -O2 -pipe -g -feliminate-unused-debug-types -c closein.c
| i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/build/poky/tiny/qemux86/tmp/sysroots/qemux86 -std=gnu99  -I.     -O2 -pipe -g -feliminate-unused-debug-types -c closeout.c
| i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/build/poky/tiny/qemux86/tmp/sysroots/qemux86 -std=gnu99  -I.     -O2 -pipe -g -feliminate-unused-debug-types -c dirname.c


...




The gettext do_compile failure from the log follows:

...

In file included from mbchar.h:156:0,
                 from propername.c:33:
./wchar.h:483:1: error: conflicting types for 'mbsinit'
/build/poky/tiny/qemux86/tmp/sysroots/qemux86/usr/include/wchar.h:359:12: note: previous declaration of 'mbsinit' was here
./wchar.h:510:1: error: conflicting types for 'mbrtowc'
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/build/poky/tiny/qemux86/tmp/sysroots/qemux86 -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I..  -I../intl -I../intl -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1   -O2 -pipe -g -feliminate-unused-debug-types -c -o memchr.o memchr.c
/build/poky/tiny/qemux86/tmp/sysroots/qemux86/usr/include/wchar.h:363:15: note: previous declaration of 'mbrtowc' was here
In file included from mbchar.h:157:0,
                 from mbchar.c:21:
./wctype.h:426:1: error: static declaration of 'iswalnum' follows non-static declaration
./wctype.h:438:1: error: static declaration of 'iswalpha' follows non-static declaration
./wctype.h:449:1: error: static declaration of 'iswblank' follows non-static declaration
./wctype.h:460:1: error: static declaration of 'iswcntrl' follows non-static declaration
./wctype.h:471:1: error: static declaration of 'iswdigit' follows non-static declaration
./wctype.h:482:1: error: static declaration of 'iswgraph' follows non-static declaration
./wctype.h:493:1: error: static declaration of 'iswlower' follows non-static declaration
./wctype.h:504:1: error: static declaration of 'iswprint' follows non-static declaration
./wctype.h:515:1: error: static declaration of 'iswpunct' follows non-static declaration
./wctype.h:528:1: error: static declaration of 'iswspace' follows non-static declaration
./wctype.h:540:1: error: static declaration of 'iswupper' follows non-static declaration
./wctype.h:551:1: error: static declaration of 'iswxdigit' follows non-static declaration
./wctype.h:563:1: error: static declaration of 'towlower' follows non-static declaration
./wctype.h:574:1: error: static declaration of 'towupper' follows non-static declaration
In file included from mbuiter.h:104:0,
                 from mbslen.c:25:
./wchar.h:483:1: error: conflicting types for 'mbsinit'
In file included from mbuiter.h:104:0,
                 from mbsstr.c:27:
./wchar.h:483:1: error: conflicting types for 'mbsinit'/build/poky/tiny/qemux86/tmp/sysroots/qemux86/usr/include/wchar.h:359:12: note: previous declaration of 'mbsinit' was here

/build/poky/tiny/qemux86/tmp/sysroots/qemux86/usr/include/wchar.h:359:12: note: previous declaration of 'mbsinit' was here

<lots more wtype related errors>

...
Comment 1 Nitin Kamble 2012-04-09 21:23:41 UTC
I have a fix for this, but there are more issues for building meta-toolchin for poky-tiny. And I am looking at those now.
Comment 3 Nitin Kamble 2012-04-11 16:45:52 UTC
Fixed by this commit in the poky master branch.

commit 88b399bb2c8adcf8563d144c0838cbcdd45c0694
Author: Nitin A Kamble <nitin.a.kamble@intel.com>
Date:   Tue Apr 10 18:33:46 2012 -0700

    tclibc-eglibc.inc: make locale packages dependency conditional

    Only add locale package dependencies if the eglibc is configured
    with locale support.
      This avoids dependencies issues for distros such as poky-tiny

    [RP: Add PR bump]
    (From OE-Core rev: bcaea8ec9c9c333f76b368225f60d4fb54c1c7b2)

    Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Comment 4 Nitin Kamble 2012-04-11 16:49:41 UTC
and also this commit


commit 8c48ab6183934fd32600997cc33e0cd3bf63139b
Author: Nitin A Kamble <nitin.a.kamble@intel.com>
Date:   Mon Apr 9 15:15:01 2012 -0700

    poky-tiny.conf: adjust eglibc options for poky-tiny

    Avoid errors for building meta-toolchain for poky-tiny

    This Fixes Bug: [YOCTO #2259]

    Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Comment 5 Reinette Chatre 2012-04-17 16:23:18 UTC
Created attachment 484 [details]
bitbake output and do_compile log
Comment 6 Reinette Chatre 2012-04-17 16:25:10 UTC
(In reply to comment #1)
> I have a fix for this, but there are more issues for building meta-toolchin for
> poky-tiny. And I am looking at those now.

Apologies, previous comment lost the logs here it is ...

(In reply to comment #1)
> I have a fix for this, but there are more issues for building meta-toolchin for
> poky-tiny. And I am looking at those now.

I still seem to have issues building meta-toolchian for poky-tiny. I am running from git with HEAD c936fca6e163bc19bc08cbd0036b31ca6f6c3ed6 that seems to have all fixes from here. Even so I am getting the following when building eglibc:

In file included from xregex.c:634:0:
xregex.c: In function 'byte_regex_compile':
xregex.c:3395:8: error: too few arguments to function 'findidx'
../locale/weight.h:23:1: note: declared here
In file included from xregex.c:634:0:
xregex.c: In function 'byte_re_match_2_internal':

Previous comment contains output from my bitbake run as well as the log file specific to the failure.
Comment 7 Reinette Chatre 2012-04-17 16:30:20 UTC
Since this bug is marked resolved I will open a new one
Comment 8 Darren Hart 2012-04-17 16:39:09 UTC
(In reply to comment #7)
> Since this bug is marked resolved I will open a new one

Reinette, your poky repo isn't quite up to date, you are one commit too old. You need at least:

commit cf05f09f9ffa28a7502ebb9bf1ab00420aee1449
Author: Darren Hart <dvhart@linux.intel.com>
Date:   Mon Apr 16 18:06:12 2012 -0700

    poky-tiny: Separate the libc features required for meta-toolchain
Comment 9 Reinette Chatre 2012-04-17 17:04:04 UTC
Created attachment 486 [details]
eglibc do_compile log

(In reply to comment #8)
> (In reply to comment #7)
> > Since this bug is marked resolved I will open a new one
> 
> Reinette, your poky repo isn't quite up to date, you are one commit too old.
> You need at least:
> 
> commit cf05f09f9ffa28a7502ebb9bf1ab00420aee1449
> Author: Darren Hart <dvhart@linux.intel.com>
> Date:   Mon Apr 16 18:06:12 2012 -0700
> 
>     poky-tiny: Separate the libc features required for meta-toolchain

My apologies for not doing due-diligence.

I updated my repo to the latest, HEAD is now 20ff9db92165e6d16897671d2b1d370661962712 and includes the patch you mention. I am still seeing a failure in the do_compile task of eglibc and I am attaching the do_compile log
Comment 10 Darren Hart 2012-04-17 17:08:49 UTC
(In reply to comment #9)
> Created attachment 486 [details]
> eglibc do_compile log
> 
> (In reply to comment #8)
> > (In reply to comment #7)
> > > Since this bug is marked resolved I will open a new one
> > 
> > Reinette, your poky repo isn't quite up to date, you are one commit too old.
> > You need at least:
> > 
> > commit cf05f09f9ffa28a7502ebb9bf1ab00420aee1449
> > Author: Darren Hart <dvhart@linux.intel.com>
> > Date:   Mon Apr 16 18:06:12 2012 -0700
> > 
> >     poky-tiny: Separate the libc features required for meta-toolchain
> 
> My apologies for not doing due-diligence.
> 
> I updated my repo to the latest, HEAD is now
> 20ff9db92165e6d16897671d2b1d370661962712 and includes the patch you mention. I
> am still seeing a failure in the do_compile task of eglibc and I am attaching
> the do_compile log

Given the pervasiveness of the libc features changes, I suggest a cleansstate on eglibc and retrying.

$ bitbake eglibc -c cleansstate
Comment 11 Nitin Kamble 2012-04-17 17:11:57 UTC
you want to run this command instead

bitbake eglibc eglibc-initial eglibc-initial-nativesdk eglibc-nativesdk
Comment 12 Nitin Kamble 2012-04-17 17:12:50 UTC
forgot to add cleaning parameters 
here is the needed command 

bitbake eglibc eglibc-initial eglibc-initial-nativesdk eglibc-nativesdk -f -c cleansstate
Comment 13 Reinette Chatre 2012-04-17 18:40:05 UTC
Thank you very much. This works for me now.