On 20/02/16 02:07 +0000, Jonathan Wakely wrote:
The next problem is that gnulib defines: inline int signbit (float f) { return _gl_cxx_signbitf (f); } inline int signbit (double d) { return _gl_cxx_signbitd (d); } inline int signbit (long double l) { return _gl_cxx_signbitl (l); } GCC 6 provides a standard-conforming <math.h> which defines the same signbit overloads (as required by C++11 and C++14). So the gnulib header is incompatible with any conforming C++11 implementation.
Here's a patch for Octave which hacks around the above problem in gnulib and then fixes Octave to include gnulib headers explicitly, instead of assuming they'll get found by GCC's std::lib. I haven't waited for octave to finish building (it's after 3am here) but if other files fail just #include <libgnu/math.h> or #include <libgnu/stdlib.h> and it should work. The gnulib change is a hack, a proper fix would only skip the signbit overloads for __cplusplus >= 201103L, but would also make sure to #undef signbit if there's an earlier #define signbit 1. Maybe that should be done by defining @GNULIB_SIGNBIT@ to something different.
--- octave-4.0.0/libgnu/math.in.h.orig 2016-02-20 02:08:09.749957859 +0000 +++ octave-4.0.0/libgnu/math.in.h 2016-02-20 02:18:29.600429130 +0000 @@ -2204,7 +2204,7 @@ #endif -#if @GNULIB_SIGNBIT@ +#if @GNULIB_SIGNBIT@ && 0 # if @REPLACE_SIGNBIT_USING_GCC@ # undef signbit /* GCC 4.0 and newer provides three built-ins for signbit. */ --- octave-4.0.0/liboctave/array/Range.cc.orig 2016-02-20 02:24:21.519828963 +0000 +++ octave-4.0.0/liboctave/array/Range.cc 2016-02-20 03:00:17.681405544 +0000 @@ -29,6 +29,8 @@ #include <iostream> #include <limits> +#include <libgnu/math.h> + #include "Range.h" #include "lo-error.h" #include "lo-mappers.h" --- octave-4.0.0/liboctave/cruft/Faddeeva/Faddeeva.cc.orig 2016-02-20 02:33:21.204975673 +0000 +++ octave-4.0.0/liboctave/cruft/Faddeeva/Faddeeva.cc 2016-02-20 02:33:31.664017276 +0000 @@ -157,6 +157,8 @@ #ifdef __cplusplus +# include <libgnu/math.h> + # include "Faddeeva.hh" # include <cfloat> --- octave-4.0.0/liboctave/numeric/lo-mappers.cc.orig 2016-02-20 02:46:27.409102963 +0000 +++ octave-4.0.0/liboctave/numeric/lo-mappers.cc 2016-02-20 03:00:34.637472991 +0000 @@ -27,6 +27,8 @@ #include <cfloat> +#include <libgnu/math.h> + #include "lo-error.h" #include "lo-ieee.h" #include "lo-mappers.h" --- octave-4.0.0/liboctave/numeric/lo-specfun.cc.orig 2016-02-20 02:47:00.785235724 +0000 +++ octave-4.0.0/liboctave/numeric/lo-specfun.cc 2016-02-20 02:47:09.936272124 +0000 @@ -26,6 +26,7 @@ #include <config.h> #endif +#include <libgnu/math.h> #include "Range.h" #include "CColVector.h" #include "CMatrix.h" --- octave-4.0.0/liboctave/util/cmd-edit.cc.orig 2016-02-20 02:47:30.192352697 +0000 +++ octave-4.0.0/liboctave/util/cmd-edit.cc 2016-02-20 03:00:42.914505914 +0000 @@ -32,6 +32,8 @@ #include <sys/types.h> #include <unistd.h> +#include <libgnu/stdlib.h> + #include "quit.h" #include "cmd-edit.h" --- octave-4.0.0/liboctave/util/lo-utils.cc.orig 2016-02-20 02:48:55.376691535 +0000 +++ octave-4.0.0/liboctave/util/lo-utils.cc 2016-02-20 03:00:52.644544618 +0000 @@ -37,6 +37,8 @@ #include <sys/types.h> #include <unistd.h> +#include <libgnu/stdlib.h> + #include "quit.h" #include "lo-error.h" --- octave-4.0.0/libinterp/parse-tree/oct-parse.cc.orig 2016-02-20 02:56:51.446585202 +0000 +++ octave-4.0.0/libinterp/parse-tree/oct-parse.cc 2016-02-20 02:57:19.782697915 +0000 @@ -90,6 +90,8 @@ #include <map> #include <sstream> +#include <libgnu/stdlib.h> + #include "Cell.h" #include "Matrix.h" #include "cmd-edit.h" --- octave-4.0.0/libinterp/octave-value/ov-scalar.cc.orig 2016-02-20 03:02:12.267861336 +0000 +++ octave-4.0.0/libinterp/octave-value/ov-scalar.cc 2016-02-20 03:02:20.363893540 +0000 @@ -26,6 +26,8 @@ #include <iostream> +#include <libgnu/math.h> + #include "data-conv.h" #include "mach-info.h" #include "lo-specfun.h" --- octave-4.0.0/libinterp/octave-value/ov-re-mat.cc.orig 2016-02-20 03:02:56.003035302 +0000 +++ octave-4.0.0/libinterp/octave-value/ov-re-mat.cc 2016-02-20 03:02:58.451045039 +0000 @@ -29,6 +29,8 @@ #include <limits> #include <vector> +#include <libgnu/math.h> + #include "data-conv.h" #include "lo-ieee.h" #include "lo-utils.h" --- octave-4.0.0/libinterp/octave-value/ov-float.cc.orig 2016-02-20 03:03:10.763094013 +0000 +++ octave-4.0.0/libinterp/octave-value/ov-float.cc 2016-02-20 03:03:18.556125011 +0000 @@ -26,6 +26,8 @@ #include <iostream> +#include <libgnu/math.h> + #include "data-conv.h" #include "mach-info.h" #include "lo-specfun.h" --- octave-4.0.0/libinterp/octave-value/ov-cell.cc.orig 2016-02-20 02:57:49.484816062 +0000 +++ octave-4.0.0/libinterp/octave-value/ov-cell.cc 2016-02-20 03:04:25.203390114 +0000 @@ -31,6 +31,9 @@ #include <vector> #include <queue> +#include <libgnu/stdlib.h> +#include <libgnu/math.h> + #include "Array-util.h" #include "byte-swap.h" #include "lo-utils.h" --- octave-4.0.0/libinterp/octave-value/ov-flt-re-mat.cc.orig 2016-02-20 03:06:10.762809999 +0000 +++ octave-4.0.0/libinterp/octave-value/ov-flt-re-mat.cc 2016-02-20 03:05:21.411613695 +0000 @@ -29,6 +29,8 @@ #include <limits> #include <vector> +#include <libgnu/math.h> + #include "data-conv.h" #include "lo-ieee.h" #include "lo-utils.h" --- octave-4.0.0/libinterp/corefcn/data.cc.orig 2016-02-20 03:05:52.339736718 +0000 +++ octave-4.0.0/libinterp/corefcn/data.cc 2016-02-20 03:06:02.899778722 +0000 @@ -39,6 +39,8 @@ #include <string> +#include <libgnu/math.h> + #include "lo-ieee.h" #include "lo-math.h" #include "oct-base64.h" --- octave-4.0.0/libinterp/corefcn/gcd.cc.orig 2016-02-20 03:08:23.250336996 +0000 +++ octave-4.0.0/libinterp/corefcn/gcd.cc 2016-02-20 03:08:28.618358348 +0000 @@ -25,6 +25,8 @@ #include <config.h> #endif +#include <libgnu/math.h> + #include "dNDArray.h" #include "CNDArray.h" #include "fNDArray.h" --- octave-4.0.0/libinterp/corefcn/file-io.cc.orig 2016-02-20 03:08:49.345440932 +0000 +++ octave-4.0.0/libinterp/corefcn/file-io.cc 2016-02-20 03:09:01.625492941 +0000 @@ -54,6 +54,8 @@ #include <zlib.h> #endif +#include <libgnu/stdlib.h> + #include "error.h" #include "file-ops.h" #include "file-stat.h" --- octave-4.0.0/libinterp/corefcn/graphics.cc.orig 2016-02-20 03:09:39.754654427 +0000 +++ octave-4.0.0/libinterp/corefcn/graphics.cc 2016-02-20 03:09:50.243698850 +0000 @@ -36,6 +36,8 @@ #include <string> #include <sstream> +#include <libgnu/math.h> + #include "cmd-edit.h" #include "file-ops.h" #include "file-stat.h" --- octave-4.0.0/libinterp/corefcn/rand.cc.orig 2016-02-20 03:15:54.087239817 +0000 +++ octave-4.0.0/libinterp/corefcn/rand.cc 2016-02-20 03:15:57.967256250 +0000 @@ -34,6 +34,8 @@ #endif #include <string> +#include <libgnu/math.h> + #include "f77-fcn.h" #include "lo-mappers.h" #include "oct-rand.h" --- octave-4.0.0/libinterp/corefcn/sysdep.cc.orig 2016-02-20 03:16:57.808509692 +0000 +++ octave-4.0.0/libinterp/corefcn/sysdep.cc 2016-02-20 03:17:09.071557394 +0000 @@ -60,6 +60,8 @@ #include <ieeefp.h> #endif +#include <libgnu/stdlib.h> + #include "cmd-edit.h" #include "file-ops.h" #include "lo-mappers.h"
-- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx http://lists.fedoraproject.org/admin/lists/devel@xxxxxxxxxxxxxxxxxxxxxxx