Bug #756
frobby (v0.9.0) does not compile with g++-4.8
Description
frobby
fails to compile with g++ version 4.8.x
History
#1 Updated by John Abbott over 8 years ago
There are missing includes in main.cpp
and randomDataGenerators.cpp
; you need to add:
#include <sys/typs.h> #include <unistd.h>
Also in StatisticsStrategy.cpp:143
change the type mpz_class
into mpq_class
.
#2 Updated by John Abbott over 8 years ago
- Status changed from New to Resolved
- Assignee set to John Abbott
- % Done changed from 0 to 80
JAA has made the changes in the previous note, and all seems to work.
JAA has made a revised TGZ file: frobby_0.9.1.tgz with these changes.
Should we tell Bjarke?
#3 Updated by Anna Maria Bigatti almost 8 years ago
Could you write the changes in the documentation ExternalLibs-Frobby.txt
?
#4 Updated by John Abbott almost 8 years ago
OK, I have changed the documentation. Could you check to see if it makes sense?
#5 Updated by Anna Maria Bigatti almost 8 years ago
John Abbott wrote:
OK, I have change the documentation. Could you check to see if it makes sense?
I believe I followed the instructions, but I still have problems like non recognizing std::_Construct; std::_Destroy, std::__iterator_category
....
Do you recognize this problem? (otherwise I investigate myself)
#6 Updated by John Abbott almost 8 years ago
I do not recognise the error message you have posted.
Do you have to tell your compiler to use the C++03 standard rather than the C++11 standard?
BTW: I have just checked in a new file ExternalLibs-GMP.txt
since there are some useful notes about compiling GMP (that's why I could not get CoCoALib to run on the netbook)
#7 Updated by Anna Maria Bigatti almost 8 years ago
I've found this ;-)
[[https://github.com/Macaulay2/M2/issues/66]]
I copy here the reply from Bjarke Roune
===============
As I recall from that time, old GCC had hash_map but new GCC did not - they removed it! I wanted the code to compile on both the new and old gcc so I copied the file. At this point it might be reasonable to drop support for that older GCC, in which case I believe hash_map could just be replaced with std::unordered_map from the C++11 standard library, which at this point should be available in most compilers. I vaguely remember that there might have been some #ifdef'ing to do different things on different compilers here, so the fix might be to just change those #ifdefs. This is just what I remember, but I can look further into it if that isn't enough information.
===============
#8 Updated by John Abbott almost 8 years ago
Can you tell your compiler (clang/llvm) to use the old standard? You will have to look in the documentation to see how (but it might simply be --std=c++03
).
I have got a "clean compile" here with g++ version 5.3.1 both with and without --std=c++11
, though with the option set to specify C++11 there are lots of warnings about auto_ptr
being deprecated.
#9 Updated by Anna Maria Bigatti almost 8 years ago
John Abbott wrote:
Can you tell your compiler (clang/llvm) to use the old standard? You will have to look in the documentation to see how (but it might simply be
--std=c++03
).
I tried, but I get the same error:
src/hash_map/hashtable.h:79:14: error: no member named '_Construct' in namespace 'std' using std::_Construct; ~~~~~^
Indeed I cannot find
_Construct
in /Library/Developer/CommandLineTools/usr/include/c++/v1/
#10 Updated by Redmine Admin almost 7 years ago
- Target version changed from CoCoALib-1.0 to CoCoALib-0.99560
#11 Updated by John Abbott over 6 years ago
- Status changed from Resolved to Closed
- % Done changed from 80 to 100
JAA has a temporary version of FROBBY available in frobby_v0.9.3.tgz
This seems to avoid the portability problems of the original code.
Closing.