Project

General

Profile

Bug #867

Compilation Error: C++11 and old GMP-Version

Added by Mario Albert about 8 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Various
Start date:
13 Apr 2016
Due date:
% Done:

100%

Estimated time:
1.01 h
Spent time:

Description

I tried to compile CoCoALib at our LinuxCluster with a pretty old GMP version (4.3.1) and C++11 activated (with additional flags -pthread -std=c++11).
I get the following error message:

Compiling CoCoALib source subdirectory AlgebraicCore/
-----------------------------------------------------
Compiling time.o
Compiling assert.o
Compiling utils.o
Compiling utils_gmp.o
In file included from /usr/include/gmp-x86_64.h:51:0,
                 from /usr/include/gmp.h:53,
                 from ../../include/CoCoA/utils_gmp.H:21,
                 from utils_gmp.C:19:
/gpfs/home07/redhat5/hrz/opt/its/gcc/4.9.0/build/include/c++/4.9.0/cstddef:51:11: error: ‘::max_align_t’ has not been declared
   using ::max_align_t;
           ^
make[2]: *** [utils_gmp.o] Error 1
===============================================================================
*****  Compilation failed in CoCoALib source subdirectory AlgebraicCore/  *****
===============================================================================
make[1]: *** [library] Error 1
make: *** [library] Error 2

My preferred fix: Update GMP on our Cluster to a more recent version ;-).


Related issues

Related to CoCoALib - Feature #889: configure script: give summary of warnings at endClosed2016-06-13

Related to CoCoALib - Feature #82: C++11 compatibility questionsClosed2012-01-26

History

#1 Updated by Mario Albert about 8 years ago

  • Assignee set to John Abbott

#2 Updated by John Abbott about 8 years ago

  • Category set to Various

Thanks to Anna (grrrr!) you can build CoCoALib (and CoCoA-5) with an uninstalled version of GMP, i.e. a "private" version you have compiled (and done make check, but not make install) somewhere in your own filespace.

You just have to specify the location of the file libgmp.a; it should be something like /home/mario/GMP/gmp-6.1.0/.libs/libgmp.a. You should configure GMP to make a static library (I'm not sure what happens if you build only the dynamic library).

#3 Updated by John Abbott about 8 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

Mario suggested that we could modify the CoCoALib configuration script to check that GMP is at least version 5.0.0; currently, configure complains if GMP is older than 4.2.3 (because there was a troublesome bug).

What do you think?
Should configure give an error if GMP is older than some "arbitrary" old version? Or just a warning (but still giving error if older than 4.2.3)?

Information: GMP-4.2.2 was released in 2007; GMP-5.0.1 was released in Feb 2010.

#4 Updated by Anna Maria Bigatti about 8 years ago

John Abbott wrote:

Mario suggested that we could modify the CoCoALib configuration script to check that GMP is at least version 5.0.0; currently, configure complains if GMP is older than 4.2.3 (because there was a troublesome bug).

What do you think?
Should configure give an error if GMP is older than some "arbitrary" old version? Or just a warning (but still giving error if older than 4.2.3)?

I would go for a warning (saying that it is incompatible with compiler).
(it is not easy to change the compiler, but it is easy enough to download and recompile GMP and call it in CoCoALib, thanks to me ;-)

#5 Updated by John Abbott about 8 years ago

  • % Done changed from 10 to 20

Perhaps I should have read the configure script better: I have already inserted (ages ago) a warning for versions older than GMP-5.1.0; configuration continues after printing the warning (and waiting 5 secs).

#6 Updated by John Abbott about 8 years ago

  • Related to Feature #889: configure script: give summary of warnings at end added

#7 Updated by John Abbott about 8 years ago

  • % Done changed from 20 to 50

I have opened issue #889 which should resolve this issue (if my understanding of the problem is correct, namely that the relevant warning message was lost in a stream of other logging messages).

#8 Updated by John Abbott almost 8 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

This has been resolved adequately by issue #889. Closing.

#9 Updated by Anna Maria Bigatti about 7 years ago

  • Estimated time set to 1.01 h

#10 Updated by John Abbott about 6 years ago

  • Related to Feature #82: C++11 compatibility questions added

Also available in: Atom PDF