Bug 3370 - guile-native cannot be restored from sstate
Summary: guile-native cannot be restored from sstate
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.3
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.4
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard: (Patch Review)
Depends on:
Blocks:
 
Reported: 2012-10-31 11:30 UTC by Ross Burton
Modified: 2012-12-06 16:11 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2012-10-31 11:30:18 UTC
I just blew away my sysroot and let bitbake reconstruct it from sstate.  Then I started getting funny compile errors in autogen-native...

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
compilation terminated.

The missing left operand is GUILE_VERSION, so clearly that define was being expanded to the empty string.

This define is set at configure time, and the log shows:

checking whether the guile version...
;;; note: source file /data/poky-master/tmp/sysroots/x86_64-linux/usr/share/guile/2.0/ice-9/boot-9.scm
;;; newer than compiled /data/poky-master/tmp/sysroots/x86_64-linux/usr/lib/guile/2.0/ccache/ice-9/boot-9.go
;;; note: source file /data/poky-master/tmp/sysroots/x86_64-linux/usr/share/guile/2.0/ice-9/r4rs.scm
[...]
;;; newer than compiled /data/poky-master/tmp/sysroots/x86_64-linux/usr/lib/guile/2.0/ccache/ice-9/rdelim.go 2.0.6
expr: non-integer argument

Those files have identical timestamps.  I suspect the test in guile is considering identical timestamps as "newer".
Comment 1 Saul Wold 2012-11-26 23:49:41 UTC
Escaltating this because we are seeing failures in meta-intel
Comment 2 Ross Burton 2012-11-27 13:02:10 UTC
Oh my god I hate Guile so much.

The check is implemented in autogen/config/ag_macros.m4 (which claims to be non-canonical but I can't find any further upstream for it).

This test is *amazing*.

Step one is to call "dpkg --list | egrep guile-[0-9.]-dev".  So that's one potential host contamination.

If that fails, it runs guile-config.  This is implemented in guile (so gives the warning that causes the problem) but is actually just a wrapper around pkg-config, which should have been used all along.
Comment 3 Ross Burton 2012-11-27 16:37:17 UTC
I've fixed autogen which was being *absolutely crazy*.

To ensure this is fixed for good, guile shouldn't stash the compiled forms into sstate.
Comment 4 Ross Burton 2012-11-27 17:32:05 UTC
Turns out you can't do that:

;;; compiling /data/poky-master/tmp/sysroots/x86_64-linux/usr/share/guile/2.0/system/base/compile.scm
;;; it seems /data/poky-master/tmp/sysroots/x86_64-linux/usr/share/guile/2.0/system/base/compile.scm
;;; is part of the compiler; skipping auto-compilation

We need a way of hooking into post-sstate-extract to simple touch the compiled forms.
Comment 5 Ross Burton 2012-11-29 12:04:42 UTC
Patch submitted to oe-core.
Comment 6 Ross Burton 2012-12-06 16:11:12 UTC
Fixed in oe-core cb8fbc332f730cbb4d9c9866ee7b95d62245d121 (and backported to danny-next).