[OE-core] [PATCH] gnu-config: improve detection of perl setup errors

Andre McCurdy armccurdy at gmail.com
Sat May 23 01:21:28 UTC 2015


Dry-run the 'autoconf --trace ...' command to improve error detection.

If we only read the command's output via a pipe to Autom4te::XFile then
perl setup errors (e.g. mixing host and OE perl libs) which cause the
autoconf command to segfault may go undetected.

Signed-off-by: Andre McCurdy <armccurdy at gmail.com>
---

Warning: This patch causes building of some packages to fail if OE and
host perl versions differ, so should not be merged until those issues
are resolved. To reproduce the current issues:

  - Use a host with perl 5.18 (e.g. Ubuntu 14.04)
  - Apply this patch to oe-core master or fido
  - bitbake -fc configure intltool

 .../gnu-config/gnu-config/gnu-configize.in               | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/gnu-config/gnu-config/gnu-configize.in b/meta/recipes-devtools/gnu-config/gnu-config/gnu-configize.in
index d4908fc..087fcfc 100755
--- a/meta/recipes-devtools/gnu-config/gnu-config/gnu-configize.in
+++ b/meta/recipes-devtools/gnu-config/gnu-config/gnu-configize.in
@@ -146,22 +146,30 @@ sub gnu_configize_current_directory ()
       return;
     }
 
+  my $autoconf_cmd;
   my $aux_dir;
   my @subdir;
   my $cmd;
   my $dest;
 
   verb "$configure_ac: tracing";
-  my $traces = new Autom4te::XFile
-    ("$autoconf"
+
+  $autoconf_cmd = "$autoconf"
      . join (' --trace=', '',
 	     # If you change this list, update the
 	     # `Autoreconf-preselections' section of autom4te.in.
 	     'AC_CONFIG_AUX_DIR:AC_CONFIG_AUX_DIR:\$1',
 	     'AC_CONFIG_SUBDIRS:AC_CONFIG_SUBDIRS:\$1',
 	     'AC_INIT',
-	    )
-     . ' |');
+	    );
+
+  # Dry-run the 'autoconf --trace ...' command to improve error detection.
+  # If we only read the command's output via a pipe to Autom4te::XFile then
+  # perl setup errors (e.g. mixing host and OE perl libs) which cause the
+  # autoconf command to segfault may go undetected.
+  xsystem ("$autoconf_cmd >/dev/null 2>&1");
+
+  my $traces = new Autom4te::XFile ("$autoconf_cmd |");
   while ($_ = $traces->getline)
     {
       $aux_dir = $1                 if /AC_CONFIG_AUX_DIR:(.*)/;
-- 
1.9.1




More information about the Openembedded-core mailing list