MPI-IS / mesh

MPI-IS Mesh Processing Library
Other
663 stars 152 forks source link

Can't build on apple Mojave #30

Closed daniel-emotech closed 4 years ago

daniel-emotech commented 4 years ago

I've set the boost root and CFLAGS="-mmacosx-version-min=10.7 -stdlib=libc++" like other issues found they needed but now I have numpy based issues.

The first issue is:

    mesh/src/aabb_normals.cpp:35:27: error: variable has incomplete type 'struct PyModuleDef'
    static struct PyModuleDef moduleDef =

I tried to solve this by adding #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION as there were warnings about that. And ended up with a bunch of errors like:

mesh/src/aabb_normals.cpp:160:58: error: no matching function for call to 'PyArray_DATA'
            closest_point=reinterpret_cast<array<double,3>*>(PyArray_DATA(result2));
                                                             ^~~~~~~~~~~~
    /Users/me/anaconda2/envs/voca/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1476:1: note: candidate function not viable: no known conversion from 'PyObject *' (aka '_object *') to 'PyArrayObject *' (aka 'tagPyArrayObject *')
jcpassy commented 4 years ago

Hi @daniel-emotech, the issue is not related to numpy but to your Python version. Python2.7 is not supported anymore, please upgrade to Python3.

Cheers!