[MacPorts] #35162: petsc version 3.3 not compatible with slepc version 3.2
MacPorts
noreply at macports.org
Mon Jul 16 09:53:52 PDT 2012
#35162: petsc version 3.3 not compatible with slepc version 3.2
-------------------------------------------+--------------------------------
Reporter: Amy.Troschinetz@… | Owner: mmoll@…
Type: defect | Status: reopened
Priority: Normal | Milestone:
Component: ports | Version: 2.1.1
Resolution: | Keywords:
Port: slepc, petsc |
-------------------------------------------+--------------------------------
Changes (by Amy.Troschinetz@…):
* status: closed => reopened
* resolution: fixed =>
Comment:
Sorry, I was mistaken. I'm still getting errors. Here is a minimal test
example:
test.cpp:
{{{
#include <slepceps.h>
int main() { }
}}}
Error log, using clang++:
{{{
$ /usr/bin/clang++ -D__LITTLE_ENDIAN__ -DMACOSX -DPOSIX
-I/opt/local/lib/petsc/include -I/opt/local/include/openmpi
-I/opt/local/include test.cpp
In file included from test.cpp:1:
In file included from /opt/local/lib/petsc/include/slepceps.h:26:
In file included from /opt/local/lib/petsc/include/slepcsys.h:78:
/opt/local/lib/petsc/include/slepcvec.h:29:1: error: unknown type name
'PETSC_EXTERN_CXX_BEGIN'
PETSC_EXTERN_CXX_BEGIN
^
/opt/local/lib/petsc/include/slepcvec.h:33:1: error: expected unqualified-
id
extern PetscErrorCode VecRegister_Comp(const char[]);
^
/opt/local/lib/petsc/include/slepcvec.h:52:1: error: unknown type name
'PETSC_EXTERN_CXX_END'
PETSC_EXTERN_CXX_END
^
In file included from test.cpp:1:
In file included from /opt/local/lib/petsc/include/slepceps.h:26:
In file included from /opt/local/lib/petsc/include/slepcsys.h:82:
/opt/local/lib/petsc/include/private/slepcimpl.h:28:1: error: expected
unqualified-id
struct _n_SlepcConvMonitor {
^
In file included from test.cpp:1:
In file included from /opt/local/lib/petsc/include/slepceps.h:26:
/opt/local/lib/petsc/include/slepcsys.h:98:1: error: unknown type name
'PETSC_EXTERN_CXX_BEGIN'
PETSC_EXTERN_CXX_BEGIN
^
/opt/local/lib/petsc/include/slepcsys.h:102:1: error: expected
unqualified-id
extern PetscErrorCode SlepcInitialize(int*,char***,const char[],const
char[]);
^
/opt/local/lib/petsc/include/slepcsys.h:165:1: error: unknown type name
'PETSC_EXTERN_CXX_END'
PETSC_EXTERN_CXX_END
^
In file included from test.cpp:1:
In file included from /opt/local/lib/petsc/include/slepceps.h:27:
In file included from /opt/local/lib/petsc/include/slepcst.h:26:
In file included from /opt/local/lib/petsc/include/petscksp.h:6:
In file included from /opt/local/lib/petsc/include/petscpc.h:6:
/opt/local/lib/petsc/include/petscdm.h:8:1: error: expected unqualified-id
PETSC_EXTERN PetscErrorCode DMInitializePackage(const char[]);
^
/opt/local/lib/petsc/include/petscsys.h:66:22: note: expanded from macro
'PETSC_EXTERN'
#define PETSC_EXTERN extern "C" PETSC_VISIBILITY_PUBLIC
^
In file included from test.cpp:1:
In file included from /opt/local/lib/petsc/include/slepceps.h:27:
/opt/local/lib/petsc/include/slepcst.h:27:1: error: unknown type name
'PETSC_EXTERN_CXX_BEGIN'
PETSC_EXTERN_CXX_BEGIN
^
/opt/local/lib/petsc/include/slepcst.h:29:1: error: expected unqualified-
id
extern PetscErrorCode STInitializePackage(const char[]);
^
/opt/local/lib/petsc/include/slepcst.h:175:1: error: unknown type name
'PETSC_EXTERN_CXX_END'
PETSC_EXTERN_CXX_END
^
In file included from test.cpp:1:
In file included from /opt/local/lib/petsc/include/slepceps.h:28:
/opt/local/lib/petsc/include/slepcip.h:25:23: error: expected ';' after
top level declarator
PETSC_EXTERN_CXX_BEGIN
^
;
/opt/local/lib/petsc/include/slepcip.h:149:1: error: unknown type name
'PETSC_EXTERN_CXX_END'
PETSC_EXTERN_CXX_END
^
In file included from test.cpp:1:
/opt/local/lib/petsc/include/slepceps.h:29:23: error: expected ';' after
top level declarator
PETSC_EXTERN_CXX_BEGIN
^
;
/opt/local/lib/petsc/include/slepceps.h:408:1: error: unknown type name
'PETSC_EXTERN_CXX_END'
PETSC_EXTERN_CXX_END
^
test.cpp:2:1: error: expected unqualified-id
int main() { }
^
16 errors generated.
}}}
I'm using clang++ here because it seems to generate better error messages,
however just for sake of completeness here's what g++ generates:
{{{
$ /usr/bin/g++ -D__LITTLE_ENDIAN__ -DMACOSX -DPOSIX
-I/opt/local/lib/petsc/include -I/opt/local/include/openmpi
-I/opt/local/include test.cpp
In file included from /opt/local/lib/petsc/include/slepcsys.h:78,
from /opt/local/lib/petsc/include/slepceps.h:26,
from test.cpp:1:
/opt/local/lib/petsc/include/slepcvec.h:33: error: expected constructor,
destructor, or type conversion before ‘extern’
In file included from /opt/local/lib/petsc/include/slepcsys.h:82,
from /opt/local/lib/petsc/include/slepceps.h:26,
from test.cpp:1:
/opt/local/lib/petsc/include/private/slepcimpl.h:28: error: expected
constructor, destructor, or type conversion before ‘struct’
In file included from /opt/local/lib/petsc/include/slepceps.h:26,
from test.cpp:1:
/opt/local/lib/petsc/include/slepcsys.h:102: error: expected constructor,
destructor, or type conversion before ‘extern’
In file included from /opt/local/lib/petsc/include/petscpc.h:6,
from /opt/local/lib/petsc/include/petscksp.h:6,
from /opt/local/lib/petsc/include/slepcst.h:26,
from /opt/local/lib/petsc/include/slepceps.h:27,
from test.cpp:1:
/opt/local/lib/petsc/include/petscdm.h:8: error: expected constructor,
destructor, or type conversion before ‘extern’
In file included from /opt/local/lib/petsc/include/slepceps.h:27,
from test.cpp:1:
/opt/local/lib/petsc/include/slepcst.h:29: error: expected constructor,
destructor, or type conversion before ‘extern’
/opt/local/lib/petsc/include/slepcst.h:175: error: ‘PETSC_EXTERN_CXX_END’
does not name a type
In file included from /opt/local/lib/petsc/include/slepceps.h:28,
from test.cpp:1:
/opt/local/lib/petsc/include/slepcip.h:149: error: ‘PETSC_EXTERN_CXX_END’
does not name a type
test.cpp:2: error: expected constructor, destructor, or type conversion
before ‘int’
}}}
The problem seems to stem from the fact that PETSC_EXTERN_CXX_END is not
defined. In version 3.3 of PETSc:
{{{
$ cd /opt/local/lib/petsc/include
$ grep -HIin "define PETSC_EXTERN_CXX_BEGIN" *
# no results
}}}
I have a backup on Time Machine of PETSc version 3.2:
{{{
$ cd /path/to/time/machine/backups/opt/local/lib/petsc/include
$ grep -HIin "define PETSC_EXTERN_CXX_BEGIN" *
petscsys.h:45:#define PETSC_EXTERN_CXX_BEGIN extern "C" {
petscsys.h:48:#define PETSC_EXTERN_CXX_BEGIN
}}}
Note that I am perfectly able to install slepc 3.2-p5 and PETSc 3.3 side
by side using MacPorts... they're just not compatible with each other so
when you start trying to use them things break down.
--
Ticket URL: <https://trac.macports.org/ticket/35162#comment:5>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list