glpk: fix build with gcc15
- add patch from debian replacing `bool` typedef and `true`/`false` defines with `#include <stdbool.h>`: https://sources.debian.org/data/main/g/glpk/5.0-2/debian/patches/gcc-15.patch Upstream issue: https://lists.gnu.org/archive/html/bug-glpk/2025-05/msg00000.html (recommends to use `CFLAGS="-ansi"` instead) Fixes build failure with gcc15: ``` In file included from api/minisat1.c:23: ./minisat/minisat.h:37:13: error: 'bool' cannot be defined via 'typedef' 37 | typedef int bool; | ^~~~ ./minisat/minisat.h:37:13: note: 'bool' is a keyword with '-std=c23' onwards ./minisat/minisat.h:37:1: warning: useless type name in empty declaration 37 | typedef int bool; | ^~~~~~~ ```
This commit is contained in:
committed by
Mauricio Collares
parent
2908050de0
commit
a0a5a11236
@@ -3,6 +3,7 @@
|
||||
stdenv,
|
||||
fetchurl,
|
||||
fetchpatch,
|
||||
fetchDebianPatch,
|
||||
libmysqlclient,
|
||||
# Excerpt from glpk's INSTALL file:
|
||||
# This feature allows the exact simplex solver to use the GNU MP
|
||||
@@ -51,6 +52,14 @@ stdenv.mkDerivation rec {
|
||||
url = "https://raw.githubusercontent.com/sagemath/sage/d3c1f607e32f964bf0cab877a63767c86fd00266/build/pkgs/glpk/patches/error_recovery.patch";
|
||||
sha256 = "sha256-2hNtUEoGTFt3JgUvLH3tPWnz+DZcXNhjXzS+/V89toA=";
|
||||
})
|
||||
|
||||
# Fix build with gcc15
|
||||
(fetchDebianPatch {
|
||||
inherit pname version;
|
||||
debianRevision = "2";
|
||||
patch = "gcc-15.patch";
|
||||
hash = "sha256-wuWPYqJKIKJAJaeJXW7lhvapu8Fd3zHjLAv7Ve7q8Qw=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch =
|
||||
|
||||
Reference in New Issue
Block a user