Source: ivtools Version: 1.2.11a1-10 Severity: important Tags: patch ivtools 1.2.11a1-10 fails to build with glibc 2.27 (2.27-0experimental0 from experimental):
| /bin/bash ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -Dcplusplus_2_1 -DHAVE_ACE -Div2_6_compatible -I./src -I./src/include/IV-2_6 -I./src/include -I./src/include/ivstd -DCLIPPOLY -I/usr/include/clippoly -Wdate-time -D_FORTIFY_SOURCE=2 -Wno-write-strings -Wno-deprecated -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wall -Wno-narrowing -Wunused-variable -Wchar-subscripts -c -o src/OverlayUnidraw/libOverlayUnidraw_la-grayraster.lo `test -f 'src/OverlayUnidraw/grayraster.cc' || echo './'`src/OverlayUnidraw/grayraster.cc | libtool: compile: g++ -DHAVE_CONFIG_H -I. -Dcplusplus_2_1 -DHAVE_ACE -Div2_6_compatible -I./src -I./src/include/IV-2_6 -I./src/include -I./src/include/ivstd -DCLIPPOLY -I/usr/include/clippoly -Wdate-time -D_FORTIFY_SOURCE=2 -Wno-write-strings -Wno-deprecated -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wall -Wno-narrowing -Wunused-variable -Wchar-subscripts -c src/OverlayUnidraw/grayraster.cc -fPIC -DPIC -o src/OverlayUnidraw/.libs/libOverlayUnidraw_la-grayraster.o | In file included from src/OverlayUnidraw/grayraster.cc:33:0: | ./src/include/ivstd/nan.h:5:10: fatal error: bits/nan.h: No such file or directory | #include <bits/nan.h> | ^~~~~~~~~~~~ | compilation terminated. | Makefile:6845: recipe for target 'src/OverlayUnidraw/libOverlayUnidraw_la-grayraster.lo' failed | make[3]: *** [src/OverlayUnidraw/libOverlayUnidraw_la-grayraster.lo] Error 1 A full build log is available there: http://aws-logs.debian.net/2018/02/07/glibc-exp/ivtools_1.2.11a1-9_unstable_glibc-exp.log glibc 2.27 remove the <bits/nan.h> include file which was a private interface, as stated when trying to include only this file: | #ifndef _MATH_H | # error "Never use <bits/nan.h> directly; include <math.h> instead." | #endif The various defines it contains are however unchanged and can still be accessed through <math.h>. The fix is therefore to include the latter instead of <bits/nan.h>. This is what the attached patch does.
diff -Nru ivtools-1.2.11a1/debian/patches/bits-nan.patch ivtools-1.2.11a1/debian/patches/bits-nan.patch --- ivtools-1.2.11a1/debian/patches/bits-nan.patch 1970-01-01 01:00:00.000000000 +0100 +++ ivtools-1.2.11a1/debian/patches/bits-nan.patch 2018-02-24 01:27:10.000000000 +0100 @@ -0,0 +1,11 @@ +--- a/src/include/ivstd/nan.h ++++ b/src/include/ivstd/nan.h +@@ -2,7 +2,7 @@ + #define ivtools_nan_h + + #if defined(__GLIBC__) && (__GLIBC__==2 && __GLIBC_MINOR__>0 || __GLIBC__>2) +-#include <bits/nan.h> ++#include <math.h> + #elif !defined(__CYGWIN__) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__APPLE__) + #include_next <nan.h> + #else diff -Nru ivtools-1.2.11a1/debian/patches/series ivtools-1.2.11a1/debian/patches/series --- ivtools-1.2.11a1/debian/patches/series 2018-01-27 22:49:32.000000000 +0100 +++ ivtools-1.2.11a1/debian/patches/series 2018-02-24 01:27:29.000000000 +0100 @@ -1 +1,2 @@ debian-changes +bits-nan.patch