Patchwork autotools.bbclass: Add functionality to force a clean of ${B} when reconfiguring (and ${S} != ${B})

login
register
mail settings
Submitter Richard Purdie
Date Sept. 11, 2012, 2:22 p.m.
Message ID <1347373349.2122.35.camel@ted>
Download mbox | patch
Permalink /patch/36301/
State Accepted
Commit f15f61af77cc4e52a037f509f8e49e1ea530cf35
Headers show

Comments

Richard Purdie - Sept. 11, 2012, 2:22 p.m.
Unfortunately whilst rerunning configure and make against a project will mostly
work there are situations where it does not correctly do the right thing.

In particular, eglibc and gcc will fail out with errors where settings
do not match a previously built configuration. It could be argued they are
broken but the situation is what it is. There is the possibility of more subtle
errors too.

This patch adds removal of the build directory (${B}) when configure is
rerunning, the sstate checksum for do_configure has changed and ${S} != ${B}.
We could simply use a stamp but saving out the previous configuration checksum
adds some data at no real overhead.

If we find there are things where we want to disable this behaviour with
CONFIGURESTAMPFILE = "" in the recipe, or users could disable it globally.

[YOCTO #2774]
[YOCTO #2848]

This is particularly helpful for eglibc and gcc which use split builds by default and
are a particular source of reconfigure type problems.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
McClintock Matthew-B29882 - Sept. 11, 2012, 7:01 p.m.
On Tue, Sep 11, 2012 at 9:22 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> Unfortunately whilst rerunning configure and make against a project will mostly
> work there are situations where it does not correctly do the right thing.
>
> In particular, eglibc and gcc will fail out with errors where settings
> do not match a previously built configuration. It could be argued they are
> broken but the situation is what it is. There is the possibility of more subtle
> errors too.
>
> This patch adds removal of the build directory (${B}) when configure is
> rerunning, the sstate checksum for do_configure has changed and ${S} != ${B}.
> We could simply use a stamp but saving out the previous configuration checksum
> adds some data at no real overhead.
>
> If we find there are things where we want to disable this behaviour with
> CONFIGURESTAMPFILE = "" in the recipe, or users could disable it globally.
>
> [YOCTO #2774]
> [YOCTO #2848]
>
> This is particularly helpful for eglibc and gcc which use split builds by default and
> are a particular source of reconfigure type problems.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Is it feasible to back port this to denzil? I've encountered what I
think are similar issues reconfiguring gcc for example.

-M

> ---
> diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
> index 4c4bf87..a5997c5 100644
> --- a/meta/classes/autotools.bbclass
> +++ b/meta/classes/autotools.bbclass
> @@ -89,6 +89,27 @@ oe_runconf () {
>
>  AUTOTOOLS_AUXDIR ?= "${S}"
>
> +CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
> +
> +autotools_preconfigure() {
> +       if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
> +               if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${S}" != "${B}" ]; then
> +                       echo "Previously configured separate build directory detected, cleaning ${B}"
> +                       rm -rf ${B}
> +                       mkdir ${B}
> +               fi
> +       fi
> +}
> +
> +autotools_postconfigure(){
> +       if [ -n "${CONFIGURESTAMPFILE}" ]; then
> +               echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
> +       fi
> +}
> +
> +do_configure[prefuncs] += "autotools_preconfigure"
> +do_configure[postfuncs] += "autotools_postconfigure"
> +
>  autotools_do_configure() {
>         case ${PN} in
>         autoconf*)
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Richard Purdie - Sept. 12, 2012, 2:16 p.m.
On Tue, 2012-09-11 at 19:01 +0000, McClintock Matthew-B29882 wrote:
> On Tue, Sep 11, 2012 at 9:22 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > Unfortunately whilst rerunning configure and make against a project will mostly
> > work there are situations where it does not correctly do the right thing.
> >
> > In particular, eglibc and gcc will fail out with errors where settings
> > do not match a previously built configuration. It could be argued they are
> > broken but the situation is what it is. There is the possibility of more subtle
> > errors too.
> >
> > This patch adds removal of the build directory (${B}) when configure is
> > rerunning, the sstate checksum for do_configure has changed and ${S} != ${B}.
> > We could simply use a stamp but saving out the previous configuration checksum
> > adds some data at no real overhead.
> >
> > If we find there are things where we want to disable this behaviour with
> > CONFIGURESTAMPFILE = "" in the recipe, or users could disable it globally.
> >
> > [YOCTO #2774]
> > [YOCTO #2848]
> >
> > This is particularly helpful for eglibc and gcc which use split builds by default and
> > are a particular source of reconfigure type problems.
> >
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> 
> Is it feasible to back port this to denzil? I've encountered what I
> think are similar issues reconfiguring gcc for example.

One of the bugs above is open against denzil and the issue certainly
exists there. The patch should apply equally well there.

I'd suggest we let this settle in master for a week or two and then add
it to the backport queue if no problems arise.

Cc'ing Scott so he's aware of this.

Cheers,

Richard
McClintock Matthew-B29882 - Sept. 12, 2012, 5:47 p.m.
On Wed, Sep 12, 2012 at 9:16 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Tue, 2012-09-11 at 19:01 +0000, McClintock Matthew-B29882 wrote:
>> On Tue, Sep 11, 2012 at 9:22 AM, Richard Purdie
>> <richard.purdie@linuxfoundation.org> wrote:
>> > Unfortunately whilst rerunning configure and make against a project will mostly
>> > work there are situations where it does not correctly do the right thing.
>> >
>> > In particular, eglibc and gcc will fail out with errors where settings
>> > do not match a previously built configuration. It could be argued they are
>> > broken but the situation is what it is. There is the possibility of more subtle
>> > errors too.
>> >
>> > This patch adds removal of the build directory (${B}) when configure is
>> > rerunning, the sstate checksum for do_configure has changed and ${S} != ${B}.
>> > We could simply use a stamp but saving out the previous configuration checksum
>> > adds some data at no real overhead.
>> >
>> > If we find there are things where we want to disable this behaviour with
>> > CONFIGURESTAMPFILE = "" in the recipe, or users could disable it globally.
>> >
>> > [YOCTO #2774]
>> > [YOCTO #2848]
>> >
>> > This is particularly helpful for eglibc and gcc which use split builds by default and
>> > are a particular source of reconfigure type problems.
>> >
>> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>>
>> Is it feasible to back port this to denzil? I've encountered what I
>> think are similar issues reconfiguring gcc for example.
>
> One of the bugs above is open against denzil and the issue certainly
> exists there. The patch should apply equally well there.
>
> I'd suggest we let this settle in master for a week or two and then add
> it to the backport queue if no problems arise.
>
> Cc'ing Scott so he's aware of this.

I've added this to my denzil branch and will start doing build testing.

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=mattsm/denzil

-M

>
> Cheers,
>
> Richard
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Scott Garman - Sept. 14, 2012, 12:26 a.m.
On 09/12/2012 10:47 AM, McClintock Matthew-B29882 wrote:
> On Wed, Sep 12, 2012 at 9:16 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
>> On Tue, 2012-09-11 at 19:01 +0000, McClintock Matthew-B29882 wrote:
>>> On Tue, Sep 11, 2012 at 9:22 AM, Richard Purdie
>>> <richard.purdie@linuxfoundation.org> wrote:
>>>> Unfortunately whilst rerunning configure and make against a project will mostly
>>>> work there are situations where it does not correctly do the right thing.
>>>>
>>>> In particular, eglibc and gcc will fail out with errors where settings
>>>> do not match a previously built configuration. It could be argued they are
>>>> broken but the situation is what it is. There is the possibility of more subtle
>>>> errors too.
>>>>
>>>> This patch adds removal of the build directory (${B}) when configure is
>>>> rerunning, the sstate checksum for do_configure has changed and ${S} != ${B}.
>>>> We could simply use a stamp but saving out the previous configuration checksum
>>>> adds some data at no real overhead.
>>>>
>>>> If we find there are things where we want to disable this behaviour with
>>>> CONFIGURESTAMPFILE = "" in the recipe, or users could disable it globally.
>>>>
>>>> [YOCTO #2774]
>>>> [YOCTO #2848]
>>>>
>>>> This is particularly helpful for eglibc and gcc which use split builds by default and
>>>> are a particular source of reconfigure type problems.
>>>>
>>>> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>>>
>>> Is it feasible to back port this to denzil? I've encountered what I
>>> think are similar issues reconfiguring gcc for example.
>>
>> One of the bugs above is open against denzil and the issue certainly
>> exists there. The patch should apply equally well there.
>>
>> I'd suggest we let this settle in master for a week or two and then add
>> it to the backport queue if no problems arise.
>>
>> Cc'ing Scott so he's aware of this.
>
> I've added this to my denzil branch and will start doing build testing.
>
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=mattsm/denzil

I'll be returning from travel tomorrow and hope to catch up with my 
denzil backlog, and queue up a new build on the autobuilder.

Scott
Phil Blundell - Sept. 26, 2012, 5:07 p.m.
On Tue, 2012-09-11 at 15:22 +0100, Richard Purdie wrote:
> Unfortunately whilst rerunning configure and make against a project will mostly
> work there are situations where it does not correctly do the right thing.
> 
> In particular, eglibc and gcc will fail out with errors where settings
> do not match a previously built configuration. It could be argued they are
> broken but the situation is what it is. There is the possibility of more subtle
> errors too.

FWIW, I just encountered another instance of what appears to be a
similar problem (with this patch applied).  I had changed my CFLAGS to
work around a compiler problem and then just reran the build, which led
eventually to:

ERROR: Function failed: do_siteconfig_gencache
(see ..../tmp-eglibc/work/mips32el-oe-linux/eglibc/2.16-r11.micro1
+svnr20393/temp/log.do_populate_sysroot.6005 for further information)
ERROR: Logfile of failure stored
in: ..../tmp-eglibc/work/mips32el-oe-linux/eglibc/2.16-r11.micro1
+svnr20393/temp/log.do_populate_sysroot.6005
Log data follows:
| DEBUG: Executing python function sstate_task_prefunc
[...]
| DEBUG: Executing shell function do_siteconfig_gencache
| configure: WARNING: unrecognized options: --disable-silent-rules,
--disable-dependency-tracking, --with-libtool-sysroot
| configure: loading cache eglibc_cache
| configure: error: `CFLAGS' has changed since the previous run:
| configure:   former value:  `...'
| configure:   current value: `...'
| configure: error: in
`/.../tmp-eglibc/work/mips32el-oe-linux/eglibc/2.16-r11.micro1
+svnr20393/site_config_cheetah':
| configure: error: changes in the environment can compromise the build
| configure: error: run `make distclean' and/or `rm eglibc_cache' and
start over
| DEBUG: Python function siteconfig_do_siteconfig finished
| DEBUG: Python function autotools_do_siteconfig finished
| DEBUG: Python function do_siteconfig finished
| DEBUG: Python function sstate_task_postfunc finished
ERROR: Task 30 (.../oe-core/meta/recipes-core/eglibc/eglibc_2.16.bb,
do_populate_sysroot) failed with exit code '1'

p.
McClintock Matthew-B29882 - Sept. 26, 2012, 11:45 p.m.
On Wed, Sep 26, 2012 at 12:07 PM, Phil Blundell <philb@gnu.org> wrote:
> On Tue, 2012-09-11 at 15:22 +0100, Richard Purdie wrote:
>> Unfortunately whilst rerunning configure and make against a project will mostly
>> work there are situations where it does not correctly do the right thing.
>>
>> In particular, eglibc and gcc will fail out with errors where settings
>> do not match a previously built configuration. It could be argued they are
>> broken but the situation is what it is. There is the possibility of more subtle
>> errors too.
>
> FWIW, I just encountered another instance of what appears to be a
> similar problem (with this patch applied).  I had changed my CFLAGS to
> work around a compiler problem and then just reran the build, which led
> eventually to:
>
> ERROR: Function failed: do_siteconfig_gencache
> (see ..../tmp-eglibc/work/mips32el-oe-linux/eglibc/2.16-r11.micro1
> +svnr20393/temp/log.do_populate_sysroot.6005 for further information)
> ERROR: Logfile of failure stored
> in: ..../tmp-eglibc/work/mips32el-oe-linux/eglibc/2.16-r11.micro1
> +svnr20393/temp/log.do_populate_sysroot.6005
> Log data follows:
> | DEBUG: Executing python function sstate_task_prefunc
> [...]
> | DEBUG: Executing shell function do_siteconfig_gencache
> | configure: WARNING: unrecognized options: --disable-silent-rules,
> --disable-dependency-tracking, --with-libtool-sysroot
> | configure: loading cache eglibc_cache
> | configure: error: `CFLAGS' has changed since the previous run:
> | configure:   former value:  `...'
> | configure:   current value: `...'
> | configure: error: in
> `/.../tmp-eglibc/work/mips32el-oe-linux/eglibc/2.16-r11.micro1
> +svnr20393/site_config_cheetah':
> | configure: error: changes in the environment can compromise the build
> | configure: error: run `make distclean' and/or `rm eglibc_cache' and
> start over
> | DEBUG: Python function siteconfig_do_siteconfig finished
> | DEBUG: Python function autotools_do_siteconfig finished
> | DEBUG: Python function do_siteconfig finished
> | DEBUG: Python function sstate_task_postfunc finished
> ERROR: Task 30 (.../oe-core/meta/recipes-core/eglibc/eglibc_2.16.bb,
> do_populate_sysroot) failed with exit code '1'

I'll add another. I've seen this:

| DEBUG: Executing python function do_siteconfig
| DEBUG: Executing python function autotools_do_siteconfig
| DEBUG: Executing python function siteconfig_do_siteconfig
| DEBUG: Executing shell function do_siteconfig_gencache
| configure: WARNING: unrecognized options: --disable-silent-rules,
--disable-dependency-tracking, --with-libtool-sysroot
| configure: loading cache ncurses_cache
| configure: error: `CC' has changed since the previous run:
| configure:   former value:  `arm-poky-linux-gnueabi-gcc
-march=armv7-a -fno-tree-vectorize     -mthumb-interwork
-mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8
--sysroot=/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard'
| configure:   current value: `arm-poky-linux-gnueabi-gcc
-march=armv7-a     -mthumb-interwork -mfloat-abi=softfp -mfpu=neon
-mtune=cortex-a8
--sysroot=/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard'
| configure: error: `CPP' has changed since the previous run:
| configure:   former value:  `arm-poky-linux-gnueabi-gcc -E
--sysroot=/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard
 -march=armv7-a -fno-tree-vectorize     -mthumb-interwork
-mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8'
| configure:   current value: `arm-poky-linux-gnueabi-gcc -E
--sysroot=/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard
 -march=armv7-a     -mthumb-interwork -mfloat-abi=softfp -mfpu=neon
-mtune=cortex-a8'
| configure: error: in
`/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/ncurses-5.9-r10.1/site_config_beagleboard':
| configure: error: changes in the environment can compromise the build
| configure: error: run `make distclean' and/or `rm ncurses_cache' and
start over
| DEBUG: Python function siteconfig_do_siteconfig finished
| DEBUG: Python function autotools_do_siteconfig finished
| DEBUG: Python function do_siteconfig finished
| DEBUG: Python function sstate_task_postfunc finished
| ERROR: Function failed: do_siteconfig_gencache (see
/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/ncurses-5.9-r10.1/temp/log.do_populate_sysroot.30243
for further information)
NOTE: recipe ncurses-5.9-r10.1: task do_populate_sysroot: Failed

-M

>
> p.
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Richard Purdie - Sept. 28, 2012, 1:23 p.m.
On Wed, 2012-09-26 at 18:07 +0100, Phil Blundell wrote:
> On Tue, 2012-09-11 at 15:22 +0100, Richard Purdie wrote:
> > Unfortunately whilst rerunning configure and make against a project will mostly
> > work there are situations where it does not correctly do the right thing.
> > 
> > In particular, eglibc and gcc will fail out with errors where settings
> > do not match a previously built configuration. It could be argued they are
> > broken but the situation is what it is. There is the possibility of more subtle
> > errors too.
> 
> FWIW, I just encountered another instance of what appears to be a
> similar problem (with this patch applied).  I had changed my CFLAGS to
> work around a compiler problem and then just reran the build, which led
> eventually to:
> 
> ERROR: Function failed: do_siteconfig_gencache
> (see ..../tmp-eglibc/work/mips32el-oe-linux/eglibc/2.16-r11.micro1
> +svnr20393/temp/log.do_populate_sysroot.6005 for further information)
> ERROR: Logfile of failure stored
> in: ..../tmp-eglibc/work/mips32el-oe-linux/eglibc/2.16-r11.micro1
> +svnr20393/temp/log.do_populate_sysroot.6005
> Log data follows:
> | DEBUG: Executing python function sstate_task_prefunc
> [...]
> | DEBUG: Executing shell function do_siteconfig_gencache
> | configure: WARNING: unrecognized options: --disable-silent-rules,
> --disable-dependency-tracking, --with-libtool-sysroot
> | configure: loading cache eglibc_cache
> | configure: error: `CFLAGS' has changed since the previous run:
> | configure:   former value:  `...'
> | configure:   current value: `...'
> | configure: error: in
> `/.../tmp-eglibc/work/mips32el-oe-linux/eglibc/2.16-r11.micro1
> +svnr20393/site_config_cheetah':
> | configure: error: changes in the environment can compromise the build
> | configure: error: run `make distclean' and/or `rm eglibc_cache' and
> start over
> | DEBUG: Python function siteconfig_do_siteconfig finished
> | DEBUG: Python function autotools_do_siteconfig finished
> | DEBUG: Python function do_siteconfig finished
> | DEBUG: Python function sstate_task_postfunc finished
> ERROR: Task 30 (.../oe-core/meta/recipes-core/eglibc/eglibc_2.16.bb,
> do_populate_sysroot) failed with exit code '1'

I also ran into this and have posted a fix (to siteconfig.bbclass) which
once applied let my build continue.

Cheers,

Richard
McClintock Matthew-B29882 - Sept. 28, 2012, 8:21 p.m.
On Fri, Sep 28, 2012 at 8:23 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Wed, 2012-09-26 at 18:07 +0100, Phil Blundell wrote:
>> On Tue, 2012-09-11 at 15:22 +0100, Richard Purdie wrote:
>> > Unfortunately whilst rerunning configure and make against a project will mostly
>> > work there are situations where it does not correctly do the right thing.
>> >
>> > In particular, eglibc and gcc will fail out with errors where settings
>> > do not match a previously built configuration. It could be argued they are
>> > broken but the situation is what it is. There is the possibility of more subtle
>> > errors too.
>>
>> FWIW, I just encountered another instance of what appears to be a
>> similar problem (with this patch applied).  I had changed my CFLAGS to
>> work around a compiler problem and then just reran the build, which led
>> eventually to:
>>
>> ERROR: Function failed: do_siteconfig_gencache
>> (see ..../tmp-eglibc/work/mips32el-oe-linux/eglibc/2.16-r11.micro1
>> +svnr20393/temp/log.do_populate_sysroot.6005 for further information)
>> ERROR: Logfile of failure stored
>> in: ..../tmp-eglibc/work/mips32el-oe-linux/eglibc/2.16-r11.micro1
>> +svnr20393/temp/log.do_populate_sysroot.6005
>> Log data follows:
>> | DEBUG: Executing python function sstate_task_prefunc
>> [...]
>> | DEBUG: Executing shell function do_siteconfig_gencache
>> | configure: WARNING: unrecognized options: --disable-silent-rules,
>> --disable-dependency-tracking, --with-libtool-sysroot
>> | configure: loading cache eglibc_cache
>> | configure: error: `CFLAGS' has changed since the previous run:
>> | configure:   former value:  `...'
>> | configure:   current value: `...'
>> | configure: error: in
>> `/.../tmp-eglibc/work/mips32el-oe-linux/eglibc/2.16-r11.micro1
>> +svnr20393/site_config_cheetah':
>> | configure: error: changes in the environment can compromise the build
>> | configure: error: run `make distclean' and/or `rm eglibc_cache' and
>> start over
>> | DEBUG: Python function siteconfig_do_siteconfig finished
>> | DEBUG: Python function autotools_do_siteconfig finished
>> | DEBUG: Python function do_siteconfig finished
>> | DEBUG: Python function sstate_task_postfunc finished
>> ERROR: Task 30 (.../oe-core/meta/recipes-core/eglibc/eglibc_2.16.bb,
>> do_populate_sysroot) failed with exit code '1'
>
> I also ran into this and have posted a fix (to siteconfig.bbclass) which
> once applied let my build continue.

I've seen this now:

ERROR: Logfile of failure stored in:
/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/flex-2.5.35-r3/temp/log.do_configure.26311
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Removing manifest:
/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard/usr/include/FlexLexer.h
| DEBUG: Removing manifest:
/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard/usr/lib/libfl.a
| DEBUG: Removing manifest:
/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard/usr/lib/libfl_pic.a
| DEBUG: Removing manifest:
/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard/usr/include/
| DEBUG: Removing manifest:
/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard/usr/share/
| DEBUG: Removing manifest:
/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard/usr/lib/
| DEBUG: Removing manifest:
/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard/usr/
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common',
'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi',
'common']
| DEBUG: Executing shell function autotools_preconfigure
| DEBUG: Shell function autotools_preconfigure finished
| DEBUG: Executing shell function do_configure
| automake (GNU automake) 1.12.3
| Copyright (C) 2012 Free Software Foundation, Inc.
| License GPLv2+: GNU GPL version 2 or later
<http://gnu.org/licenses/gpl-2.0.html>
| This is free software: you are free to change and redistribute it.
| There is NO WARRANTY, to the extent permitted by law.
|
| Written by Tom Tromey <tromey@redhat.com>
|        and Alexandre Duret-Lutz <adl@gnu.org>.
| AUTOV is 1.12
| NOTE: Executing autoreconf --verbose --install --force
--exclude=autopoint -I
/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/flex-2.5.35-r3/flex-2.5.35/m4/
-I/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12
-I /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/flex-2.5.35-r3/flex-2.5.35/aclocal-copy/
| autoreconf: Entering directory `.'
| autoreconf: running: aclocal -I
/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/flex-2.5.35-r3/flex-2.5.35/m4/
-I /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12
-I /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/flex-2.5.35-r3/flex-2.5.35/aclocal-copy/
-I /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/flex-2.5.35-r3/flex-2.5.35/m4/
-I /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12
-I /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/flex-2.5.35-r3/flex-2.5.35/aclocal-copy/
--force -I m4
| aclocal: error: aclocal: file
'/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/x86_64-linux/usr/share/aclocal/gconf-2.m4'
does not exist
| autoreconf: aclocal failed with exit status: 1
| ERROR: autoreconf execution failed.
| ERROR: Function failed: do_configure (see
/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/flex-2.5.35-r3/temp/log.do_configure.26311
for further information)

-M
Richard Purdie - Sept. 28, 2012, 9:20 p.m.
On Fri, 2012-09-28 at 20:21 +0000, McClintock Matthew-B29882 wrote:
> I've seen this now:
> 
> ERROR: Logfile of failure stored in:
> /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/flex-2.5.35-r3/temp/log.do_configure.26311
> Log data follows:
> | DEBUG: Executing python function sysroot_cleansstate
> | DEBUG: Removing manifest:
> /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard/usr/include/FlexLexer.h
> | DEBUG: Removing manifest:
> /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard/usr/lib/libfl.a
> | DEBUG: Removing manifest:
> /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard/usr/lib/libfl_pic.a
> | DEBUG: Removing manifest:
> /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard/usr/include/
> | DEBUG: Removing manifest:
> /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard/usr/share/
> | DEBUG: Removing manifest:
> /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard/usr/lib/
> | DEBUG: Removing manifest:
> /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/beagleboard/usr/
> | DEBUG: Python function sysroot_cleansstate finished
> | DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common',
> 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi',
> 'common']
> | DEBUG: Executing shell function autotools_preconfigure
> | DEBUG: Shell function autotools_preconfigure finished
> | DEBUG: Executing shell function do_configure
> | automake (GNU automake) 1.12.3
> | Copyright (C) 2012 Free Software Foundation, Inc.
> | License GPLv2+: GNU GPL version 2 or later
> <http://gnu.org/licenses/gpl-2.0.html>
> | This is free software: you are free to change and redistribute it.
> | There is NO WARRANTY, to the extent permitted by law.
> |
> | Written by Tom Tromey <tromey@redhat.com>
> |        and Alexandre Duret-Lutz <adl@gnu.org>.
> | AUTOV is 1.12
> | NOTE: Executing autoreconf --verbose --install --force
> --exclude=autopoint -I
> /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/flex-2.5.35-r3/flex-2.5.35/m4/
> -I/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12
> -I /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/flex-2.5.35-r3/flex-2.5.35/aclocal-copy/
> | autoreconf: Entering directory `.'
> | autoreconf: running: aclocal -I
> /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/flex-2.5.35-r3/flex-2.5.35/m4/
> -I /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12
> -I /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/flex-2.5.35-r3/flex-2.5.35/aclocal-copy/
> -I /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/flex-2.5.35-r3/flex-2.5.35/m4/
> -I /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12
> -I /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/flex-2.5.35-r3/flex-2.5.35/aclocal-copy/
> --force -I m4
> | aclocal: error: aclocal: file
> '/local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/sysroots/x86_64-linux/usr/share/aclocal/gconf-2.m4'
> does not exist
> | autoreconf: aclocal failed with exit status: 1
> | ERROR: autoreconf execution failed.
> | ERROR: Function failed: do_configure (see
> /local/yocto/upstream/label/fedora17-64b/machine/beagleboard/poky/master/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/flex-2.5.35-r3/temp/log.do_configure.26311
> for further information)

Totally unrelated, likely a transient race we're meant to have fixed but
don't seem to have done so :/

The supposed fix was:
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=a92ff3ad4212f8966bbd3f6defcb112737d81cda

Cheers,

Richard
Ross Burton - Sept. 29, 2012, 6:42 a.m.
On Friday, 28 September 2012 at 22:20, Richard Purdie wrote:
> Totally unrelated, likely a transient race we're meant to have fixed but
> don't seem to have done so :/
> 
> The supposed fix was:
> http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=a92ff3ad4212f8966bbd3f6defcb112737d81cda

FWIW, I saw this yesterday too. :/

Ross
Martin Jansa - Sept. 29, 2012, 7:24 a.m.
On Sat, Sep 29, 2012 at 07:42:48AM +0100, Ross Burton wrote:
> On Friday, 28 September 2012 at 22:20, Richard Purdie wrote:
> > Totally unrelated, likely a transient race we're meant to have fixed but
> > don't seem to have done so :/
> > 
> > The supposed fix was:
> > http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=a92ff3ad4212f8966bbd3f6defcb112737d81cda
> 
> FWIW, I saw this yesterday too. :/

me too, few times over last week.

Removing WORKDIR completely before running -c cleansstate as work
around..

Cheers,
Richard Purdie - Sept. 29, 2012, 10:30 a.m.
On Sat, 2012-09-29 at 09:24 +0200, Martin Jansa wrote:
> On Sat, Sep 29, 2012 at 07:42:48AM +0100, Ross Burton wrote:
> > On Friday, 28 September 2012 at 22:20, Richard Purdie wrote:
> > > Totally unrelated, likely a transient race we're meant to have fixed but
> > > don't seem to have done so :/
> > > 
> > > The supposed fix was:
> > > http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=a92ff3ad4212f8966bbd3f6defcb112737d81cda
> > 
> > FWIW, I saw this yesterday too. :/
> 
> me too, few times over last week.
> 
> Removing WORKDIR completely before running -c cleansstate as work
> around..

I suspect restarting the build would not see it happen again...

Cheers,

Richard

Patch

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 4c4bf87..a5997c5 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -89,6 +89,27 @@  oe_runconf () {
 
 AUTOTOOLS_AUXDIR ?= "${S}"
 
+CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
+
+autotools_preconfigure() {
+	if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
+		if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${S}" != "${B}" ]; then
+			echo "Previously configured separate build directory detected, cleaning ${B}"
+			rm -rf ${B}
+			mkdir ${B}
+		fi
+	fi
+}
+
+autotools_postconfigure(){
+	if [ -n "${CONFIGURESTAMPFILE}" ]; then
+		echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
+	fi
+}
+
+do_configure[prefuncs] += "autotools_preconfigure"
+do_configure[postfuncs] += "autotools_postconfigure"
+
 autotools_do_configure() {
 	case ${PN} in
 	autoconf*)