On Wed, 23 Apr 2008, Lorenzo Botti wrote:
Hi All,
I have the following problem compiling the last svn.
Compiling C++ (in optimized mode) src/base/dof_map.C...
/usr/include/c++/4.0.0/bits/ios_base.h:187: error: ‘SEEK_CUR’ was not
declared in this scope
/usr/include/c++/4.0.0/bits/ios_base.h:188: error: ‘SEEK_END’ was not
declared in this scope
/usr/include/c++/4.0.0/bits/ios_base.h:398: error: ‘SEEK_CUR’ was not
declared in this scope
/usr/include/c++/4.0.0/bits/ios_base.h:401: error: ‘SEEK_END’ was not
declared in this scope
How can I solve this?
The long-term solution involves printing out the section of the C++
standard which describes the <cstdio> header, highlighting the parts
where SEEK_CUR and SEEK_END are already defined, wrapping the printout
around a brick, and throwing that brick through the window of whoever
was responsible for trying to redefine those symbols in the MPI C++
"standard". Repeat as necessary.
The short-term solution depends on your compiler and MPI versions, not
on libMesh. Usually, making sure you've compiled PETSc against a C
MPI interface rather than a C++ MPI interface is a sufficient
workaround, though. Let's hope that's true in your case too, because
Plan B begins with trying to backtrack from an internal gcc header
file to figure out just how your particular MPI implementation is
trying to hack around the MPI C++ API's mistakes.
If switching to a C MPI interface fails to work for you, let us know.
We used to have some "#undef SEEK_CUR" type workarounds of our own in
the code, before finally deciding that any such hack which worked with
one compiler and C++ MPI combination was more likely than not to break
another combination, or even break C MPI versions. I seem to recall
(and grep seems to agree) that we removed all those bits, but it's
possible we missed one.
---
Roy
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users