[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1028526: autoconf: The check for Cyy features is broken due to the use of K&R function definitions.



Package: autoconf
Version: 2.71-2
Severity: normal
Tags: upstream fixed-upstream

When I try to build MPFR with -Werror=old-style-definition in configure,
I get:

checking for gcc-latest option to enable C11 features... unsupported
checking for gcc-latest option to enable C99 features... unsupported
checking for gcc-latest option to enable C89 features... unsupported

This is due to

conftest.c: In function 'e':
conftest.c:26:14: error: old-style function definition [-Werror=old-style-definition]
   26 | static char *e (p, i)
      |              ^

I could see that this has been fixed upstream:

commit bf5a75953b6d504f0405b1ca33b039b8dd39eef4
Author: Zack Weinberg <zackw@panix.com>
Date:   2022-11-10 18:05:30 +0100

    More fixes for compilers that reject K&R function definitions.
    
    This fixes all of the remaining failures exposed by running the
    testsuite with GCC 12 and
    CC='cc -Wimplicit-function-declaration -Wold-style-definition
           -Wimplicit-int -Werror'
[...]
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -1153,9 +1153,7 @@ struct stat;
 /* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
 struct buf { int x; };
 struct buf * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
+static char *e (char **p, int i)
 {
   return p[i];
 }
[...]

This means that generated tarballs using this version of autoconf
will have a buggy configure script. AFAIK, this will not affect
Debian since its GCC enables C11 by default (so without -Werror,
I get "none needed" instead of "unsupported"), but this could yield
failures or suboptimal builds when trying to build the tarball on
other systems if an option like -Werror=old-style-definition is used.

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 'stable-security'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
merged-usr: no
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-1-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=POSIX, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages autoconf depends on:
ii  debianutils  5.7-0.4
ii  m4           1.4.19-2
ii  perl         5.36.0-7

Versions of packages autoconf recommends:
ii  automake [automaken]  1:1.16.5-1.3

Versions of packages autoconf suggests:
ii  autoconf-archive  20220903-3
ii  autoconf-doc      2.71-2
ii  gettext           0.21-10
ii  gnu-standards     2022.03.23-0.1
ii  libtool           2.4.7-5

-- no debconf information

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


Reply to: