[Trilinos-Users] ML issue with gnu 4.4.1 and the new alpha trilinos.
Jason Slemons
slemons at cray.com
Wed Sep 30 12:30:00 MDT 2009
I think I've hit a similar snag in building ML to the snag I hit
building zoltan earlier. I was building ML along with a number of other
packages, and some third party libraries, metis and parmetis for
example.
The problem came when trying to compile the file
'trilinos/packages/ml/src/Operator/ml_op_utils.c' and the error I got
was:
In file included from
/home/users/slemons/trilinos_messup/trilinos/packages/ml/src/Operator/ml
_op_utils.c:448:
/home/users/slemons/trilinos_messup/metisinc/parmetis.h:27: error:
redefinition of typedef 'idxtype'
/home/users/slemons/trilinos_messup/metisinc/struct.h:19: note: previous
declaration of 'idxtype' was here
make[2]: ***
[packages/ml/src/CMakeFiles/ml.dir/Operator/ml_op_utils.c.o] Error 1
In both .h files there is the following code:
/* Undefine the following #define in order to use short int as the
idxtype */
#define IDXTYPE_INT
/* Indexes are as long as integers for now */
#ifdef IDXTYPE_INT
typedef int idxtype;
#else
typedef short idxtype;
#endif
So it is true that idxtype is being defined twice if both these files
are being included. If I go into parmetis.h and comment out these two
typedef statements then the file compiles fine. Of course other files
depend on this definition being in parmetis.h. I think one way to fix it
could be to have a variable called HAVE_METIS_AND_PARMETIS that decides
when to include these typedefs.
-Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20090930/d73ec5d8/attachment.html
More information about the Trilinos-Users
mailing list