tech-pkg archive

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

pkgsrc breakage with Fedora 40



Hi!

Fedora 40 comes with gcc 14.0.1. Not sure if it's that or some other change in the distro, but a number of basic pkgsrc packages that used to work fine on Fedora 39 now fail to build. As an illustrative example, pkgtools/pkg_install-info fails to find ANSI C libraries:

checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... cc -E
checking for egrep... grep -E
checking for ANSI C header files... no

This is the relevant excerpt from config.log:

configure:2622: cc -o conftest -O2  -Wl,-R/usr/pkg/lib conftest.c >&5
conftest.c: In function 'main':
conftest.c:26:7: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
   26 |       exit(2);
      |       ^~~~
conftest.c:10:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
    9 | #include <ctype.h>
  +++ |+#include <stdlib.h>
   10 | #if ((' ' & 0x0FF) == 0x020)
conftest.c:26:7: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-m
ismatch]
   26 |       exit(2);
      |       ^~~~
conftest.c:26:7: note: include '<stdlib.h>' or provide a declaration of 'exit' conftest.c:27:3: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-m
ismatch]
   27 |   exit (0);
      |   ^~~~
conftest.c:27:3: note: include '<stdlib.h>' or provide a declaration of 'exit'
configure:2625: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "texinfo"
| #define PACKAGE_TARNAME "texinfo"
| #define PACKAGE_VERSION "4.5"
| #define PACKAGE_STRING "texinfo 4.5"
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| #include <ctype.h>
| #if ((' ' & 0x0FF) == 0x020)
| # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
| # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
| #else
| # define ISLOWER(c)              (('a' <= (c) && (c) <= 'i')               || ('j' <= (c) && (c) <= 'r')                   || ('s' <= (c) && (c) <= 'z'))
| # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
| #endif
|
| #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
| int
| main ()
| {
|   int i;
|   for (i = 0; i < 256; i++)
|     if (XOR (islower (i), ISLOWER (i))
|       || toupper (i) != TOUPPER (i))
|       exit(2);
|   exit (0);

configure:2645: result: no

What is weird is that re-running autoconf (with 2.72) results in a configure script that does the right thing. AIUI, the implementation of AC_HEADER_STDC is very different in newer versions.

Is that the right way to fix this? Or am I missing something?

I opened a separate thread in pkgsrc-users earlier about unexpected breakage in libnbcompat (lchflags.c). I am wondering if I am seeing these because Fedora is at the bleeding edge with compilers and libraries, so new failure modes show up here first.

--
Benny


Home | Main Index | Thread Index | Old Index