Bug 2307

Summary: autogen-native do_compile failure
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Darren Hart <dvhart>
Component: devtools / tool chainAssignee: Nitin Kamble <nitin.a.kamble>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: High CC: meta.mr.watcher, meta.watcher
Version: 1.2   
Target Milestone: 1.2   
Hardware: x86   
OS: Multiple   
Whiteboard: (1.2)
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Darren Hart 2012-04-16 17:26:20 UTC
Autobuilder failure report:
http://autobuilder.yoctoproject.org:8010/builders/crownbay-noemgd/builds/110/steps/shell_19/logs/stdio

OE Build Configuration:
BB_VERSION        = "1.15.1"
TARGET_ARCH       = "i586"
TARGET_OS         = "linux"
MACHINE           = "crownbay-noemgd"

Failure is NOT specific to crownbay, also observed on many other machines.

DISTRO            = "poky"
DISTRO_VERSION    = "1.1+snapshot-20120414"
TUNE_FEATURES     = "m32 core2"
TARGET_FPU        = ""
meta              
meta-yocto        = "master:9ff001cba1196b91be16ff9290919de820a2d44c"
meta-intel        
meta-crownbay     
meta-tlk          = "master:f75f9b6f68473eb0efac802409608f8389be0030"
meta-qt3          = "master:f8475d5c5935695d4d1dfff1d7be30f49e162094"

| In file included from ag.c:8:0:
| autogen.h:33:19: error: operator '<' has no left operand
| In file included from autogen.h:40:0,
|                  from ag.c:8:
| expr.h:28:19: error: operator '>=' has no left operand
| expr.h:31:23: fatal error: guile/gh.h: No such file or directory
Comment 1 Nitin Kamble 2012-04-16 18:06:28 UTC
I can not reproduce the issue. the autogen-native is building fine on my system.
Comment 2 Darren Hart 2012-04-16 18:10:09 UTC
I don't know if it is related. But RPs grub fix added autogen-native as a DEPENDS. This has the potential to try and build autogen-native earlier than we may have before. On our highly parallel builds, is it possible we hit this failure due to a missing dependency?
Comment 3 Nitin Kamble 2012-04-16 18:12:57 UTC
it is a native recipe. It is also built grub-efi-native at early stage. so IMO the timing reason is unlikely.
Comment 4 Nitin Kamble 2012-04-16 20:23:55 UTC
it it possible bitbake is trying to build autoggen-native before guile-native is complete with it's sysroot task ?
Comment 5 Nitin Kamble 2012-04-16 21:26:23 UTC
Richard has pushed a fix for this:

commit 15b16060c76bbdcc3dec37cab389aed64d4fdd1d
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date:   Mon Apr 16 22:08:18 2012 +0100

    autogen-native: Fix sstate relocation issue when reusing libguile

    This was found to cause issues on the Yocto autobuilders and fixes do_compile
    failures when guile-native has been relocated.

    (From OE-Core rev: d928e91a57e6e9dfa6a7d4e888e1e1064d7fc668)

    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta/recipes-devtools/autogen/autogen-native_5.12.bb b/meta/recipes-devtools/autogen/autogen-native_5.12.bb
index cdf1ea9..eb3721d 100644
--- a/meta/recipes-devtools/autogen/autogen-native_5.12.bb
+++ b/meta/recipes-devtools/autogen/autogen-native_5.12.bb
@@ -13,7 +13,7 @@ SRC_URI = "${GNU_MIRROR}/autogen/rel${PV}/autogen-${PV}.tar.gz"
 SRC_URI[md5sum] = "6c6671b76021fb30dd43b0d5fdb7180b"
 SRC_URI[sha256sum] = "37e885d6c8a58f33ab198d38bb972fa4c14236f951d628161dde6e20527d0df2"

-PR = "r1"
+PR = "r2"

 DEPENDS = "guile-native libtool-native libxml2-native"
 RDEPENDS = "automake pkgconfig"
@@ -22,3 +22,14 @@ inherit autotools native

 # Following line will be needed for the non-native target recipe.
 #CFLAGS += "-L${STAGING_LIBDIR} -lguile-2.0 -lgc -pthread -I${STAGING_INCDIR}/guile/2.0 -I${STAGING_INCDIR}"
+
+# autogen-native links against libguile which may have been relocated with sstate
+# these environment variables ensure there isn't a relocation issue
+export GUILE_LOAD_PATH = "${STAGING_DATADIR_NATIVE}/guile/2.0"
+export GUILE_LOAD_COMPILED_PATH = "${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache"
+
+do_install_append () {
+       create_wrapper ${D}/${bindir}/autogen \
+               GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
+               GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
+}
Comment 6 Nitin Kamble 2012-04-16 21:32:11 UTC
The issue is fixed now.