pkgsrc-Users archive

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

Re: gcc13 compilation error on Void Linux



> Any quick leads on this?

>     ../../../gcc-13.2.0/libiberty/fibheap.c: In function 'fibheap_replace_key_data':
>     ../../../gcc-13.2.0/libiberty/fibheap.c:38:25: error: 'LONG_MIN' undeclared (first use in this function)
>        38 | #define FIBHEAPKEY_MIN  LONG_MIN
>           |                         ^~~~~~~~

This is a known problem
https://us-central.manta.mnx.io/pkgsrc/public/reports/Linux/el9/trunk/x86_64/20240613.2355/gcc13-13.3.0/build.log

Also, I experienced the same on AltLinux.
I don't have a complete solution yet, but some diagnostics is below.

gcc-13.2.0/libiberty/fibheap.c file contains the following code in the
very beginning

   #ifdef HAVE_LIMITS_H
   #include <limits.h>
   #endif

So, limits.h should be included but it is not because appropriate
config.h contains

   /* Define to 1 if you have the <limits.h> header file. */
   /* #undef HAVE_LIMITS_H */

This means that configure check fails for some reason.

In my case config.log corresponding to that config.h contains the
following


   configure:5523: result: no
   configure:5523: checking for limits.h
   configure:5523: cc -E -I/usr/include conftest.c
   In file included from /usr/include/bits/libc-header-start.h:33,
   from /usr/include/limits.h:26,
   from /usr/lib64/gcc/x86_64-alt-linux/10/include/limits.h:195,
   from /usr/lib64/gcc/x86_64-alt-linux/10/include/syslimits.h:7,
   from /usr/lib64/gcc/x86_64-alt-linux/10/include/limits.h:34,
   from conftest.c:24:
   /usr/include/features.h:397:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
   397 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
      |    ^~~~~~~
      configure:5523: $? = 0
      configure: failed program was:
      | /* confdefs.h */
      | #define PACKAGE_NAME ""
      | #define PACKAGE_TARNAME ""
      | #define PACKAGE_VERSION ""
      | #define PACKAGE_STRING ""
      | #define PACKAGE_BUGREPORT ""
      | #define PACKAGE_URL ""
      | #define STDC_HEADERS 1
      | #define HAVE_SYS_TYPES_H 1
      | #define HAVE_SYS_STAT_H 1
      | #define HAVE_STDLIB_H 1
      | #define HAVE_STRING_H 1
      | #define HAVE_MEMORY_H 1
      | #define HAVE_STRINGS_H 1
      | #define HAVE_INTTYPES_H 1
      | #define HAVE_STDINT_H 1
      | #define HAVE_UNISTD_H 1
      | #define __EXTENSIONS__ 1
      | #define _ALL_SOURCE 1
      | #define _GNU_SOURCE 1
      | #define _POSIX_PTHREAD_SEMANTICS 1
      | #define _TANDEM_SOURCE 1
      | /* end confdefs.h.  */
      | #include <limits.h>
      configure:5523: result: no

On pkgsrc level CFLAGS is -O2.

> --
> Mayuresh


Home | Main Index | Thread Index | Old Index