Thank you for your comments.
On Mon, 2025-08-11 at 09:33 -0400, Sébastien Villemot wrote: > > > > Glpk is written in ANSI C as defined by "ANSI/ISO 9899-1990", and using > > features from more recent language versions in my opinion is not a good > > idea. Instead, you might pass -ansi option to gcc or specify it as > > CFLAGS="-ansi" on running configure script. > > Note that this solution does not work for the official Debian package. > > The Debian package does not use the vendored version of SuiteSparse, > but rather depends on the system-wide version of the library (following > distribution best practices). I think it's a wrong approach. How can you be sure that it is the same library as included in the distribution? And even if it is so, the library code can be specifically changed/patched and thus may not work correctly with the system-wide version. Maybe that has sense for some kind of software, but in this case I see no reasons why do so. I'll make a bug-fix release of glpk to close the stdbool issue. Best regards, Andrew Makhorin > However the latter no longer compiles > when enforcing the ANSI C standard, notably because it uses C++-style > comments. Hence one gets errors such as: > > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I. -I./api -I./bflib > -I./draft -I./env - > I./intopt -I./minisat -I./misc -I./mpl -I./npp > -I./proxy -I./simplex -I/usr/include/mysql -Wdate-time -D_FORTIFY_SOURCE=2 - > I/usr/include/suitesparse -I/usr/include/iodbc -g -O2 -Werro > r=implicit-function-declaration > -ffile-prefix-map=/home/sebastien/debian/glpk=. -fstack- > protector-strong -fstack-clash-protection -Wform > at -Werror=format-security -fcf-protection -ansi -c draft/glpios12.c -o > libglpk_la-glpios12.o > >/dev/null 2>&1 > In file included from > draft/glpmat.c:25: > > > /usr/include/suitesparse/amd.h:1:1: error: C++ style comments are not allowed > in ISO > C90 > 1 | > //------------------------------------------------------------------------------ > > | > ^ > > > /usr/include/suitesparse/amd.h:1:1: note: (this will be reported only once > per input > file) > In file included from > /usr/include/suitesparse/amd.h:38: > > > /usr/include/suitesparse/SuiteSparse_config.h:1:1: error: C++ style comments > are not allowed > in ISO C90 > 1 | > //------------------------------------------------------------------------------ > > | > ^ > > > /usr/include/suitesparse/SuiteSparse_config.h:1:1: note: (this will be > reported only once per > input file) > > I am therefore going to apply the solution relying on stdbool.h to the Debian > package. > > Best regards, >
