URL:
  <https://savannah.gnu.org/bugs/?68220>

                 Summary: Building groff with autoconf 2.73 may fail due to
C23 preference
                   Group: GNU roff
               Submitter: afh
               Submitted: Wed 08 Apr 2026 07:56:49 PM UTC
                Category: General
                Severity: 3 - Normal
              Item Group: Build/Installation
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Unlocked
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Wed 08 Apr 2026 07:56:49 PM UTC By: Alexis <afh>
This is more a heads-up than an actual bug report.

Nixpkgs has updated to autoconf 2.73 recently which caused build issues with
groff having been updated to version 1.24.1 not too long before in nixpkgs.

The issue seems to be that autoconf in certain environments seems to prefer
the C23 standard which "removed old-style (K&R) function definitions and
declarations", and at least src/libs/libgroff/matherr.c appears to still use
this old-style function definition, causing the following compilation error:

src/libs/libgroff/matherr.c:29:13: error: unknown type name 'exc'
   29 | int matherr(exc)
      |             ^
src/libs/libgroff/matherr.c:29:17: error: expected ';' after top level
declarator
   29 | int matherr(exc)
      |                 ^
      |                 ;
src/libs/libgroff/matherr.c:31:1: error: expected identifier or '('
   31 | {
      | ^
3 errors generated.


The autoconf release announcement states:

*** AC_PROG_CC now prefers C23 if available.
  Older code may need to be updated, as C23 has removed old-style
  (K&R) function definitions and declarations, now uses type-generic
  functions for strchr and similar functions, and has new keywords
  alignas, alignof, bool, constexpr, false, nullptr, static_assert,
  thread_local, true, typeof, typeof_unqual.

-- https://lists.gnu.org/archive/html/autoconf/2026-03/msg00060.html

The [https://github.com/NixOS/nixpkgs/pull/507771/changes fix] on the nixpkgs
side was to simply add `-std=gnu11` to `CFLAGS.

For the sake of completeness here's a link to the GitHub PR comment raising
the groff build failure:
https://github.com/NixOS/nixpkgs/pull/481765#issuecomment-4197261299








    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68220>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to