Bug#806473: msort: FTBFS: gmp.h: error: 'UINT_MAX' undeclared
* Chris West (Faux), 2015-11-27, 19:44: gcc -DHAVE_CONFIG_H -I. -I. -I. -D_FORTIFY_SOURCE=2 -DLOCALEDIR=\"/usr/local/share/locale\" -DALLOCAOK -std=gnu99-DUSEUNINUMOK -g -O2 -c info.c In file included from /usr/include/uninum/uninum.h:19:0, from info.c:34: /usr/include/x86_64-linux-gnu/gmp.h: In function ‘__gmpz_fits_uint_p’: /usr/include/x86_64-linux-gnu/gmp.h:1740:3: error: ‘UINT_MAX’ undeclared (first use in this function) The problem is that by default Automake adds "." to the include path (which is a pretty dumb idea IMO), and that msort has a header named "limits.h". So now when GMP requests , the msort's one gets included, instead of the system-wide one. Of course, the msort's header doesn't define UINT_MAX and friends, hence the error. Adding "nostdinc" to AUTOMAKE_OPTIONS in Makefile.am and then regenerating Makefile.in should fix the bug. -- Jakub Wilk
Bug#806473: msort: FTBFS: gmp.h: error: 'UINT_MAX' undeclared
Source: msort Version: 8.53-2 Severity: serious Justification: fails to build from source Tags: sid stretch User: reproducible-bui...@lists.alioth.debian.org Usertags: ftbfs X-Debbugs-CC: reproducible-bui...@lists.alioth.debian.org Dear Maintainer, The package fails to build: gcc -DHAVE_CONFIG_H -I. -I. -I. -D_FORTIFY_SOURCE=2 -DLOCALEDIR=\"/usr/local/share/locale\" -DALLOCAOK -std=gnu99-DUSEUNINUMOK -g -O2 -c info.c In file included from /usr/include/uninum/uninum.h:19:0, from info.c:34: /usr/include/x86_64-linux-gnu/gmp.h: In function ‘__gmpz_fits_uint_p’: /usr/include/x86_64-linux-gnu/gmp.h:1740:3: error: ‘UINT_MAX’ undeclared (first use in this function) __GMPZ_FITS_UTYPE_P (__gmp_z, UINT_MAX); ^ /usr/include/x86_64-linux-gnu/gmp.h:1740:3: note: each undeclared identifier is reported only once for each function it appears in /usr/include/x86_64-linux-gnu/gmp.h: In function ‘__gmpz_fits_ulong_p’: /usr/include/x86_64-linux-gnu/gmp.h:1751:3: error: ‘ULONG_MAX’ undeclared (first use in this function) __GMPZ_FITS_UTYPE_P (__gmp_z, ULONG_MAX); ^ /usr/include/x86_64-linux-gnu/gmp.h: In function ‘__gmpz_fits_ushort_p’: /usr/include/x86_64-linux-gnu/gmp.h:1762:3: error: ‘USHRT_MAX’ undeclared (first use in this function) __GMPZ_FITS_UTYPE_P (__gmp_z, USHRT_MAX); ^ /usr/include/x86_64-linux-gnu/gmp.h: In function ‘__gmpz_popcount’: /usr/include/x86_64-linux-gnu/gmp.h:1847:37: error: ‘ULONG_MAX’ undeclared (first use in this function) __gmp_result = (__gmp_usize < 0 ? ULONG_MAX : 0); ^ Makefile:319: recipe for target 'info.o' failed make[2]: *** [info.o] Error 1 Full build log: https://reproducible.debian.net/rb-pkg/unstable/amd64/msort.html -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64)