Build error on mac os with slepc-3.4.1, petsc-3.4.2

Issue #1 resolved
jtravs created an issue

Hi,

I'm trying to build slepc4py on mac os x. I have slepc-3.4.1, petsc-3.4.2 installed and tested and nearly latest git of petsc4py installed and tested. The error I get is listed below, any help would be greatly appreciated!

python setup.py install --prefix=/Users/john/local/
running install
running build
running build_src
cythonizing 'slepc4py.SLEPc.pyx' -> 'slepc4py.SLEPc.c'
running build_py
creating build
creating build/lib.macosx-10.8-x86_64-2.7
creating build/lib.macosx-10.8-x86_64-2.7/slepc4py
copying src/__init__.py -> build/lib.macosx-10.8-x86_64-2.7/slepc4py
copying src/__main__.py -> build/lib.macosx-10.8-x86_64-2.7/slepc4py
copying src/help.py -> build/lib.macosx-10.8-x86_64-2.7/slepc4py
copying src/SLEPc.py -> build/lib.macosx-10.8-x86_64-2.7/slepc4py
creating build/lib.macosx-10.8-x86_64-2.7/slepc4py/lib
copying src/lib/__init__.py -> build/lib.macosx-10.8-x86_64-2.7/slepc4py/lib
creating build/lib.macosx-10.8-x86_64-2.7/slepc4py/include
creating build/lib.macosx-10.8-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/slepc4py.h -> build/lib.macosx-10.8-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/slepc4py.SLEPc.h -> build/lib.macosx-10.8-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/slepc4py.SLEPc_api.h -> build/lib.macosx-10.8-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/slepc4py.i -> build/lib.macosx-10.8-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/__init__.pxd -> build/lib.macosx-10.8-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/SLEPc.pxd -> build/lib.macosx-10.8-x86_64-2.7/slepc4py/include/slepc4py
copying src/include/slepc4py/__init__.pyx -> build/lib.macosx-10.8-x86_64-2.7/slepc4py/include/slepc4py
copying src/lib/slepc.cfg -> build/lib.macosx-10.8-x86_64-2.7/slepc4py/lib
running build_ext
SLEPC_DIR:   /Users/john/Documents/code/downloaded/slepc-3.4.1
PETSC_DIR:   /Users/john/Documents/code/downloaded/petsc-3.4.2
PETSC_ARCH:  arch-darwin-cxx-debug
scalar-type: complex
precision:   double
language:    CXXONLY
compiler:    g++
linker:      g++
building 'SLEPc' extension
creating build/temp.macosx-10.8-x86_64-2.7
creating build/temp.macosx-10.8-x86_64-2.7/arch-darwin-cxx-debug
creating build/temp.macosx-10.8-x86_64-2.7/arch-darwin-cxx-debug/src
g++ -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g -fPIC -fno-strict-aliasing -fno-common -dynamic -pipe -Os -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -DPETSC_DIR=/Users/john/Documents/code/downloaded/petsc-3.4.2 -DSLEPC_DIR=/Users/john/Documents/code/downloaded/slepc-3.4.1 -D__INSDIR__=slepc4py-3.3.1/ -I/Users/john/Documents/code/downloaded/slepc-3.4.1/include -I/Users/john/Documents/code/downloaded/slepc-3.4.1/arch-darwin-cxx-debug/include -I/Users/john/Documents/code/downloaded/petsc-3.4.2/include/mpiuni -I/opt/X11/include -I/Users/john/Documents/code/downloaded/petsc-3.4.2/arch-darwin-cxx-debug/include -I/Users/john/Documents/code/downloaded/petsc-3.4.2/include -Isrc/include -I/Users/john/local/lib/python2.7/site-packages/petsc4py/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/SLEPc.c -o build/temp.macosx-10.8-x86_64-2.7/arch-darwin-cxx-debug/src/SLEPc.o
In file included from src/SLEPc.c:3:0:
src/slepc4py.SLEPc.c: In function 'PyObject* __pyx_pf_8slepc4py_5SLEPc_3Sys_getVersion(PyObject*, PyObject*, PyObject*, PyObject*, PyObject*)':
src/slepc4py.SLEPc.c:3878:24: error: 'SLEPC_VERSION_PATCH_DATE' was not declared in this scope
   __pyx_v_cpatchdate = SLEPC_VERSION_PATCH_DATE;
                        ^
src/slepc4py.SLEPc.c: In function 'PyObject* __pyx_pf_8slepc4py_5SLEPc_3Sys_2getVersionInfo(PyObject*)':
src/slepc4py.SLEPc.c:4350:24: error: 'SLEPC_VERSION_PATCH_DATE' was not declared in this scope
   __pyx_v_cpatchdate = SLEPC_VERSION_PATCH_DATE;
                        ^
In file included from src/SLEPc.c:3:0:
src/slepc4py.SLEPc.c: In function 'PyObject* __pyx_pf_8slepc4py_5SLEPc_2DS_28setDimensions(PySlepcDSObject*, PyObject*, PyObject*, PyObject*, PyObject*)':
src/slepc4py.SLEPc.c:10664:151: error: too few arguments to function 'PetscErrorCode DSGetDimensions(DS, PetscInt*, PetscInt*, PetscInt*, PetscInt*, PetscInt*)'
   __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetDimensions(__pyx_v_self->ds, (&__pyx_v_ival1), (&__pyx_v_ival2), (&__pyx_v_ival3), (&__pyx_v_ival4))); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                                                                                                                                                       ^
In file included from /Users/john/Documents/code/downloaded/slepc-3.4.1/include/slepceps.h:28:0,
                 from /Users/john/Documents/code/downloaded/slepc-3.4.1/include/slepcsvd.h:26,
                 from /Users/john/Documents/code/downloaded/slepc-3.4.1/include/slepc.h:29,
                 from src/slepc4py.SLEPc.c:311,
                 from src/SLEPc.c:3:
/Users/john/Documents/code/downloaded/slepc-3.4.1/include/slepcds.h:147:29: note: declared here
 PETSC_EXTERN PetscErrorCode DSGetDimensions(DS,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*);
                             ^
In file included from src/SLEPc.c:3:0:
src/slepc4py.SLEPc.c: In function 'PyObject* __pyx_pf_8slepc4py_5SLEPc_2DS_30getDimensions(PySlepcDSObject*)':
src/slepc4py.SLEPc.c:10834:151: error: too few arguments to function 'PetscErrorCode DSGetDimensions(DS, PetscInt*, PetscInt*, PetscInt*, PetscInt*, PetscInt*)'
   __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetDimensions(__pyx_v_self->ds, (&__pyx_v_ival1), (&__pyx_v_ival2), (&__pyx_v_ival3), (&__pyx_v_ival4))); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                                                                                                                                                       ^
In file included from /Users/john/Documents/code/downloaded/slepc-3.4.1/include/slepceps.h:28:0,
                 from /Users/john/Documents/code/downloaded/slepc-3.4.1/include/slepcsvd.h:26,
                 from /Users/john/Documents/code/downloaded/slepc-3.4.1/include/slepc.h:29,
                 from src/slepc4py.SLEPc.c:311,
                 from src/SLEPc.c:3:
/Users/john/Documents/code/downloaded/slepc-3.4.1/include/slepcds.h:147:29: note: declared here
 PETSC_EXTERN PetscErrorCode DSGetDimensions(DS,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*);
                             ^
error: command 'g++' failed with exit status 1

Comments (3)

  1. Lisandro Dalcin

    The code was not up to date for slepc-3.4, I've pushed fixes. Please try again and let me know how it goes.

  2. jtravs reporter

    Thanks! It now compiles fine and all of the demos run OK. I didn't check the results, but I presume this wouldn't have changed.

  3. Log in to comment