Closed d-torrance closed 3 years ago
Same error message, but in a gmp header instead of a fflas-ffpack one, in Ubuntu 18.04 (also ppc64el):
g++ -pipe -Wall -Wno-shadow -Wcast-qual -Wno-sign-conversion -Wno-sign-compare -Wno-parentheses -Wno-sign-compare -fno-stack-protector -Wuninitialized -I/usr/include -Wno-error=pragmas -std=gnu++14 -g -fdebug-prefix-map=/<<BUILDDIR>>/macaulay2-1.17.2.1+git202101300204=. -fstack-protector-strong -Wformat -Werror=format-security -g3 -O2 -Wno-unused-local-typedefs -Wno-unknown-pragmas -std=c++17 -Wno-mismatched-tags -I. -DNDEBUG -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202101300204/M2/include -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202101300204/M2/include -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202101300204/M2/usr-host/include -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202101300204/M2/include -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202101300204/M2/include -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202101300204/M2/usr-host/include -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202101300204/M2/include -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202101300204/M2/include -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202101300204/M2/usr-host/include -Wdate-time -D_FORTIFY_SOURCE=2 -isystem /usr/include/libxml2 -DSING_NDEBUG -DOM_NDEBUG -DSING_NDEBUG -DOM_NDEBUG -I/usr/include/powerpc64le-linux-gnu/singular -I/usr/include/singular -I/usr/include/powerpc64le-linux-gnu/singular -I/usr/include/singular -I/usr/include/powerpc64le-linux-gnu/singular -I/usr/include/singular -I/usr/src/gtest -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -I/usr/include/cdd -I/usr/include/eigen3 -I/usr/include -DBOOST_STACKTRACE_LINK -isystem /usr/include/libxml2 -DSING_NDEBUG -DOM_NDEBUG -DSING_NDEBUG -DOM_NDEBUG -I/usr/include/powerpc64le-linux-gnu/singular -I/usr/include/singular -I/usr/include/powerpc64le-linux-gnu/singular -I/usr/include/singular -I/usr/include/powerpc64le-linux-gnu/singular -I/usr/include/singular -I/usr/src/gtest -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -I/usr/include/cdd -I/usr/include/eigen3 -I/usr/include -DBOOST_STACKTRACE_LINK -isystem /usr/include/libxml2 -DSING_NDEBUG -DOM_NDEBUG -DSING_NDEBUG -DOM_NDEBUG -I/usr/include/powerpc64le-linux-gnu/singular -I/usr/include/singular -I/usr/include/powerpc64le-linux-gnu/singular -I/usr/include/singular -I/usr/include/powerpc64le-linux-gnu/singular -I/usr/include/singular -I/usr/src/gtest -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -I/usr/include/cdd -I/usr/include/eigen3 -I/usr/include -DBOOST_STACKTRACE_LINK -I../d -I./../c -Wno-fatal-errors -c -Wno-cast-qual VectorArithmetic.cpp -o VectorArithmetic.o
In file included from MemoryBlock.hpp:8:0,
from VectorArithmetic.hpp:6,
from VectorArithmetic.cpp:1:
/usr/include/tbb/tbb.h:21:154: note: #pragma message: TBB Warning: tbb.h contains deprecated functionality. For details, please see Deprecated Features appendix in the TBB reference manual.
#pragma message("TBB Warning: tbb.h contains deprecated functionality. For details, please see Deprecated Features appendix in the TBB reference manual.")
^
In file included from /usr/include/gmp++/gmp++.h:33:0,
from /usr/include/givaro/givinteger.h:19,
from /usr/include/fflas-ffpack/utils/fflas_memory.h:45,
from /usr/include/fflas-ffpack/fflas/fflas.h:71,
from /usr/include/fflas-ffpack/ffpack/ffpack.h:46,
from aring-zzp-ffpack.hpp:21,
from aring-translate.hpp:18,
from aring-glue.hpp:7,
from VectorArithmetic.hpp:10,
from VectorArithmetic.cpp:1:
/usr/include/gmpxx.h: In static member function ‘static __vector(4) __bool int __gmp_binary_equal::eval(mpz_srcptr, mpz_srcptr)’:
/usr/include/gmpxx.h:930:74: error: cannot convert ‘bool’ to ‘__vector(4) __bool int’ in return
static bool eval(mpz_srcptr z, mpz_srcptr w) { return mpz_cmp(z, w) == 0; }
^
/usr/include/gmpxx.h: In static member function ‘static __vector(4) __bool int __gmp_binary_equal::eval(mpz_srcptr, long unsigned int)’:
/usr/include/gmpxx.h:933:32: error: cannot convert ‘bool’ to ‘__vector(4) __bool int’ in return
{ return mpz_cmp_ui(z, l) == 0; }
^
/usr/include/gmpxx.h: In static member function ‘static __vector(4) __bool int __gmp_binary_equal::eval(mpz_srcptr, long int)’:
/usr/include/gmpxx.h:937:32: error: cannot convert ‘bool’ to ‘__vector(4) __bool int’ in return
{ return mpz_cmp_si(z, l) == 0; }
^
/usr/include/gmpxx.h: In static member function ‘static __vector(4) __bool int __gmp_binary_equal::eval(mpz_srcptr, double)’:
/usr/include/gmpxx.h:941:31: error: cannot convert ‘bool’ to ‘__vector(4) __bool int’ in return
{ return mpz_cmp_d(z, d) == 0; }
^
/usr/include/gmpxx.h: In static member function ‘static __vector(4) __bool int __gmp_binary_equal::eval(mpq_srcptr, mpq_srcptr)’:
/usr/include/gmpxx.h:946:31: error: cannot convert ‘bool’ to ‘__vector(4) __bool int’ in return
{ return mpq_equal(q, r) != 0; }
^
/usr/include/gmpxx.h: In static member function ‘static __vector(4) __bool int __gmp_binary_equal::eval(mpq_srcptr, long unsigned int)’:
/usr/include/gmpxx.h:949:35: error: cannot convert ‘bool’ to ‘__vector(4) __bool int’ in return
{ return mpq_cmp_ui(q, l, 1) == 0; }
^
/usr/include/gmpxx.h: In static member function ‘static __vector(4) __bool int __gmp_binary_equal::eval(mpq_srcptr, long int)’:
/usr/include/gmpxx.h:953:35: error: cannot convert ‘bool’ to ‘__vector(4) __bool int’ in return
{ return mpq_cmp_si(q, l, 1) == 0; }
^
/usr/include/gmpxx.h: In static member function ‘static __vector(4) __bool int __gmp_binary_equal::eval(mpq_srcptr, double)’:
/usr/include/gmpxx.h:957:55: error: cannot convert ‘bool’ to ‘__vector(4) __bool int’ in return
{ __GMPXX_TMPQ_D; return mpq_equal (q, temp) != 0; }
^
/usr/include/gmpxx.h: In static member function ‘static __vector(4) __bool int __gmp_binary_equal::eval(mpq_srcptr, mpz_srcptr)’:
/usr/include/gmpxx.h:961:31: error: cannot convert ‘bool’ to ‘__vector(4) __bool int’ in return
{ return mpq_cmp_z(q, z) == 0; }
^
/usr/include/gmpxx.h: In static member function ‘static __vector(4) __bool int __gmp_binary_equal::eval(mpf_srcptr, mpf_srcptr)’:
/usr/include/gmpxx.h:965:74: error: cannot convert ‘bool’ to ‘__vector(4) __bool int’ in return
static bool eval(mpf_srcptr f, mpf_srcptr g) { return mpf_cmp(f, g) == 0; }
^
/usr/include/gmpxx.h: In static member function ‘static __vector(4) __bool int __gmp_binary_equal::eval(mpf_srcptr, long unsigned int)’:
/usr/include/gmpxx.h:968:32: error: cannot convert ‘bool’ to ‘__vector(4) __bool int’ in return
{ return mpf_cmp_ui(f, l) == 0; }
...
It looks like this may stem from switching to -std=c++17
in https://github.com/Macaulay2/M2/commit/41d487cc17e6d6ea8044d34f00a1c35c894a284c, i.e., without using GNU extensions. (See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58241). I applied a patch using -std=gnu++17
instead to the PPA package -- we'll see how it goes.
Also, we're setting the C++ standard in two places -- in the d
and e
directory Makefiles in the above commit, but also in the configure script:
https://github.com/Macaulay2/M2/blob/fed620f72da38e9cd61e37e064fc18fd6fa048e4/M2/configure.ac#L228
So we end up with both -std=gnu++14
and -std=c++17
in the build flags:
g++ -std=gnu++14 -g -ffile-prefix-map=/<<BUILDDIR>>/macaulay2-1.17.2.1+git202102071439=. -fstack-protector-strong -Wformat -Werror=format-security -g3 -O2 -Wno-mismatched-tags -pipe -Wall -Wno-shadow -Wcast-qual -Wno-sign-conversion -Wno-sign-compare -Wno-parentheses -Wno-sign-compare -fno-stack-protector -Wuninitialized -I/usr/include -Wno-error=pragmas -Wreturn-type -Wunused-function -Wfatal-errors -std=c++17 -Wno-unknown-pragmas -Wno-mismatched-tags -I. -I. -I./../e -I./../system -I./../../include -I./../c -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202102071439/M2/include -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202102071439/M2/include -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202102071439/M2/usr-host/include -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202102071439/M2/include -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202102071439/M2/include -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202102071439/M2/usr-host/include -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202102071439/M2/include -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202102071439/M2/include -I/<<BUILDDIR>>/macaulay2-1.17.2.1+git202102071439/M2/usr-host/include -Wdate-time -D_FORTIFY_SOURCE=2 -isystem /usr/include/libxml2 -DSING_NDEBUG -DOM_NDEBUG -DSING_NDEBUG -DOM_NDEBUG -I/usr/include/x86_64-linux-gnu/singular -I/usr/include/singular -I/usr/include/x86_64-linux-gnu/singular -I/usr/include/singular -I/usr/include/x86_64-linux-gnu/singular -I/usr/include/singular -I/usr/src/gtest -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -I/usr/include/cdd -I/usr/include/eigen3 -I/usr/include -DBOOST_STACKTRACE_LINK -isystem /usr/include/libxml2 -DSING_NDEBUG -DOM_NDEBUG -DSING_NDEBUG -DOM_NDEBUG -I/usr/include/x86_64-linux-gnu/singular -I/usr/include/singular -I/usr/include/x86_64-linux-gnu/singular -I/usr/include/singular -I/usr/include/x86_64-linux-gnu/singular -I/usr/include/singular -I/usr/src/gtest -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -I/usr/include/cdd -I/usr/include/eigen3 -I/usr/include -DBOOST_STACKTRACE_LINK -isystem /usr/include/libxml2 -DSING_NDEBUG -DOM_NDEBUG -DSING_NDEBUG -DOM_NDEBUG -I/usr/include/x86_64-linux-gnu/singular -I/usr/include/singular -I/usr/include/x86_64-linux-gnu/singular -I/usr/include/singular -I/usr/include/x86_64-linux-gnu/singular -I/usr/include/singular -I/usr/src/gtest -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -I/usr/include/cdd -I/usr/include/eigen3 -I/usr/include -DBOOST_STACKTRACE_LINK -DNDEBUG -Wno-unknown-pragmas -I./../e -c -Wno-unused-value -Wno-unused-but-set-variable -Wno-maybe-uninitialized engine-tmp.cc -o engine.o
Is this intentional?
I intend to stop setting the C++ standard in the configure script, now that we are setting it in the d and e Makefiles, for the benefit of Mike's code, because it applies only while compiling the libraries, and the libraries should have Makefiles that take care of that for them if it's important.
I assume the second -std
command line option overrides the first.
I intend to stop setting the C++ standard in the configure script, now that we are setting it in the d and e Makefiles, for the benefit of Mike's code, because it applies only while compiling the libraries, and the libraries should have Makefiles that take care of that for them if it's important.
That makes sense.
I assume the second
-std
command line option overrides the first.
Yes -- from man gcc
:
For options of the same specificity, the last one takes effect.
Switching to -std=gnu++17
as in #1923 indeed fixes the ppc64el build. (Ubuntu 18.04 and Ubuntu 20.04)
From a PPA build of the development branch in Ubuntu 20.04 on ppc64el:
This is followed by many, many more warning and error messages. See the log for more.