diff mbox series

[meta-mingw] mingw-libgnurx: fix do_configure failure

Message ID 20260331080858.1069226-1-changqing.li@windriver.com
State New
Headers show
Series [meta-mingw] mingw-libgnurx: fix do_configure failure | expand

Commit Message

Changqing Li March 31, 2026, 8:08 a.m. UTC
Fix do_configure failure:
| NOTE: Executing ACLOCAL="aclocal --aclocal-path=/tmp/work/x86-64-v3-wrs-linux/mingw-libgnurx/2.5.1/recipe-sysroot/usr/share/aclocal/" autoreconf -Wcross --verbose --install --force --exclude=autopoint
| autoreconf: export WARNINGS=cross,no-obsolete
| autoreconf: Entering directory '.'
| autoreconf: configure.ac: not using Gettext
| autoreconf: configure.ac: not using aclocal
| autoreconf: configure.ac: tracing
| autoreconf: configure.ac: not using Libtool
| autoreconf: configure.ac: not using Intltool
| autoreconf: configure.ac: not using Gtkdoc
| autoreconf: running: /tmp/work/x86-64-v3-wrs-linux/mingw-libgnurx/2.5.1/recipe-sysroot-native/usr/bin/autoconf --force
| configure.ac:5: error: possibly undefined macro: AM_INIT_AUTOMAKE
|       If this token and others are legitimate, please use m4_pattern_allow.
|       See the Autoconf documentation.
| configure.ac:7: error: possibly undefined macro: AC_LIBTOOL_DLOPEN
| configure.ac:8: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
| configure.ac:9: error: possibly undefined macro: AC_PROG_LIBTOOL

Autotools.bbclass don't remove aclocal.m4 after commit:
oe-core: [7da2290a46 autotools: remove deletion of aclocal.m4]

Usually, autoreconf will always run aclocal, except when the current
aclocal.m4 is not generated by aclocal, see snip of autoreconf
[snip of autoreconf]
  if (-f 'aclocal.m4')
    {
      my $aclocal_m4 = new Autom4te::XFile 'aclocal.m4';
      $_ = $aclocal_m4->getline;
      $uses_aclocal = 0
    unless defined ($_) && /generated.*by aclocal/;
    }
[snip of autoreconf]

For mingw-libgnurx, the exist aclocal.m4 is not generated by aclocal,
so aclocal is not rerun, and configure.ac is updated by patch
0002-Add-autotool-files.patch, so configure failed, fixed by remove it
before do_configure

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 recipes-support/mingw-libgnurx/mingw-libgnurx_2.5.1.bb | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/recipes-support/mingw-libgnurx/mingw-libgnurx_2.5.1.bb b/recipes-support/mingw-libgnurx/mingw-libgnurx_2.5.1.bb
index 5318ca4..3c46810 100644
--- a/recipes-support/mingw-libgnurx/mingw-libgnurx_2.5.1.bb
+++ b/recipes-support/mingw-libgnurx/mingw-libgnurx_2.5.1.bb
@@ -17,4 +17,10 @@  inherit autotools
 # Specify any options you want to pass to the configure script using EXTRA_OECONF:
 EXTRA_OECONF = ""
 
+do_configure:prepend() {
+    if ! echo ${EXTRA_AUTORECONF} | grep -q "aclocal"; then
+        rm -f aclocal.m4
+    fi
+}
+
 BBCLASSEXTEND = "nativesdk"