Bug 969

Summary: [quilt] do_configure fail when building quilt on opensuse 11.3
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jiajun Xu <jiajun.xu>
Component: devtools / tool chainAssignee: Qing He <qing.he>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher, qing.he, richard.purdie, sgw
Version: unspecified   
Target Milestone: 1.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
do_configure error log for quilt none

Description Jiajun Xu 2011-04-12 01:31:57 UTC
Tree/Branch: Poky/Bernard
Commit: 8b6416db1e04af83ecdf57522240ac859d5d8031

With bernard branch(I think latest poky master should also have same problem), quilt will fail to do_configure on opensuse 11.3 due to the version check failure with /usr/bin/patch.

The bug is similar with bug 690, which is for quilt-native and Beth's patch for bug 690 is to fix with file "configure". So for target quilt, we need to find a suitable way for fixing.

The error log is as below:
#########
| checking for cp... /bin/cp
| checking whether /bin/cp -l works... yes
| checking for gdate... no
| checking for date... /bin/date
| checking whether /bin/date --rfc-822 works... yes
| checking for perl... /home/opensuse/work/poky-20110401/build/tmp/sysroots/x86_64-linux/usr/bin/perl
| checking for grep... (cached) /usr/bin/grep
| checking whether /usr/bin/grep -q works... yes
| checking whether /usr/bin/grep understands (foo|bar)... yes
| checking for tail... /usr/bin/tail
| checking whether /usr/bin/tail -n works... yes
| checking for tr... /usr/bin/tr
| checking whether /usr/bin/tr understands a-z ... yes
| checking for sed... /usr/bin/sed
| checking whether /usr/bin/sed understands (foo|bar)... yes
| checking for gawk... /usr/bin/gawk
| checking whether /usr/bin/gawk supports sub... yes
| checking for pod2man... /home/opensuse/work/poky-20110401/build/tmp/sysroots/x86_64-linux/usr/bin/pod2man
| checking for column... /home/opensuse/work/poky-20110401/build/tmp/sysroots/x86_64-linux/usr/bin/column
| checking for getopt... /home/opensuse/work/poky-20110401/build/tmp/sysroots/x86_64-linux/usr/bin/getopt
| checking for getopt --long syntax... yes
| checking for mktemp... /bin/mktemp
| checking whether /bin/mktemp -d works... yes
| checking for diff... /usr/bin/diff
| checking for patch... /usr/bin/patch
| checking the version of /usr/bin/diff... 2.8.7-cvs
| checking the version of /usr/bin/patch... patch
| configure: error:
| quilt requires at least version 2.4 of GNU patch. You can download a
| current version of patch from ftp.gnu.org, or if you already have GNU patch
| then you can supply its path with the '--with-patch=' option.
|
| FATAL: oe_runconf failed
NOTE: package quilt-0.48-r0: task do_configure: Failed
ERROR: Task 4 (/home/opensuse/work/poky-20110401/meta/recipes-devtools/quilt/quilt_0.48.bb, do_configure) failed with exit code '1'
#########
Comment 1 Jiajun Xu 2011-04-12 01:34:16 UTC
Created attachment 136 [details]
do_configure error log for quilt
Comment 2 Qing He 2011-04-12 01:58:55 UTC
patch and diff are used at runtime of quilt, but unfortunately quilt doesn't differentiate runtime and build time programs in configure.ac (and there is no sysroot support)

The easier way is to remove all diff and patch checking (it should be safe to assume they are of GNU version), and using non-absolute forms (patch instead of /usr/bin/patch) in scripts (assuming it's retrievable in $PATH).
Comment 3 Saul Wold 2011-04-12 15:01:33 UTC
I am confused, 11.3 should have a version of patch of 2.6.1, is the problem that it did not install?  Please verify if patch is installed and which version, I can not see from these comments which version of Patch is installed.
Comment 4 Qing He 2011-04-12 19:09:39 UTC
(In reply to comment #3)
> I am confused, 11.3 should have a version of patch of 2.6.1, is the problem
> that it did not install?  Please verify if patch is installed and which
> version, I can not see from these comments which version of Patch is installed.

please see bug 690, patch version 2.6.1 uses a new report format that fails quilt configure detection, it's been fixed in the upstream at:
   http://lists.nongnu.org/archive/html/quilt-dev/2010-06/msg00002.html


However, it doesn't work for quilt-native, since it's build before autotools and we don't want an autoreconf here, so there were 3 commits:
    32f241a51c800cfc5b146e990acee004d91bef32   which fixes configure
    bc31351f6989372c7feb403f23532afd1f510fb1   upstream configure.ac change
    ec740ac770d2124cbae1ab936d85b8343076c53b   revert configure.ac change (since we don't want autoreconf on quilt-native)

The revert is ok for quilt-native but missed the change for quilt for target, thus the bug still exists.

Additionally, the detection mechanism in quilt configure is flawed for cross-build, it's the target diff and patch need to be used (but they can be tested by run), I'll remove the test altogether.