GNU bug report logs - #57380
29.0.50; configure --config-cache --with-native-compilation failing

Previous Next

Package: emacs;

Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Date: Wed, 24 Aug 2022 12:10:01 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andreas Schwab <schwab <at> suse.de>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 57380 <at> debbugs.gnu.org
Subject: bug#57380: 29.0.50; configure --config-cache --with-native-compilation failing
Date: Wed, 24 Aug 2022 16:32:20 +0200
On Aug 24 2022, Gerd Möllmann wrote:

> diff --git a/configure.ac b/configure.ac
> index 7616e450d0..08a41a7808 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -4273,6 +4273,7 @@ AC_DEFUN
>        [], [libgccjit_not_found])
>      AC_CHECK_HEADERS([libgccjit.h], [], [libgccjit_dev_not_found])
>      # Check if libgccjit really works.
> +    AC_LANG(C)
>      AC_RUN_IFELSE([libgccjit_smoke_test], [], [libgccjit_broken])
>      HAVE_NATIVE_COMP=yes
>      case "${opsys}" in
>
> This makes it work for me.

That appears to be a misuse of AC_LANG_PUSH/POP.  Apparently they must
not be used inside AC_CACHE_CHECK.

diff --git a/configure.ac b/configure.ac
index 7616e450d0..39bfe7800b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2155,32 +2155,32 @@ AC_SUBST([NS_OBJ])
 AC_SUBST([NS_OBJC_OBJ])
 
 if test "${HAVE_NS}" = yes; then
+  AC_LANG_PUSH([Objective C])
   AC_CACHE_CHECK(
     [if the Objective C compiler supports instancetype],
     [emacs_cv_objc_instancetype],
-    [AC_LANG_PUSH([Objective C])
-     AC_COMPILE_IFELSE(
+    [AC_COMPILE_IFELSE(
        [AC_LANG_SOURCE([[@interface Test
                           + (instancetype)test;
                           @end]])],
        [emacs_cv_objc_instancetype=yes],
-       [emacs_cv_objc_instancetype=no])
-     AC_LANG_POP([Objective C])])
+       [emacs_cv_objc_instancetype=no])])
+  AC_LANG_POP([Objective C])
 
   if test x$emacs_cv_objc_instancetype = xyes ; then
     AC_DEFINE([NATIVE_OBJC_INSTANCETYPE], [1],
               [Define if ObjC compiler supports instancetype natively.])
   fi
 
+  AC_LANG_PUSH([Objective C])
   AC_CACHE_CHECK(
     [if the Objective C compiler defaults to C99],
     [emacs_cv_objc_c99],
-    [AC_LANG_PUSH([Objective C])
-     AC_COMPILE_IFELSE(
+    [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM([], [[for (int i = 0;;);]])],
        [emacs_cv_objc_c99=yes],
-       [emacs_cv_objc_c99=no])
-     AC_LANG_POP([Objective C])])
+       [emacs_cv_objc_c99=no])])
+  AC_LANG_POP([Objective C])
 
    if test x$emacs_cv_objc_c99 = xno ; then
      GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -std=c99"

-- 
Andreas Schwab, SUSE Labs, schwab <at> suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




This bug report was last modified 2 years and 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.