conda-forge / scikit-fmm-feedstock

A conda-smithy repository for scikit-fmm.
BSD 3-Clause "New" or "Revised" License
0 stars 4 forks source link

Rebuild for python310 #18

Closed regro-cf-autotick-bot closed 2 years ago

regro-cf-autotick-bot commented 2 years ago

This PR has been triggered in an effort to update python310.

Notes and instructions for merging this PR:

  1. Please merge the PR only after the tests have passed.
  2. Feel free to push to the bot's branch to update this PR if needed.

Please note that if you close this PR we presume that the feedstock has been rebuilt, so if you are going to perform the rebuild yourself don't close this PR until the your rebuild has been merged.

If this PR was opened in error or needs to be updated please add the bot-rerun label to this PR. The bot will close this PR and schedule another one. If you do not have permissions to add this label, you can use the phrase code>@<space/conda-forge-admin, please rerun bot in a PR comment to have the conda-forge-admin add it for you.

This PR was created by the regro-cf-autotick-bot. The regro-cf-autotick-bot is a service to automatically track the dependency graph, migrate packages, and propose package version updates for conda-forge. Feel free to drop us a line if there are any issues! This PR was generated by https://github.com/regro/autotick-bot/actions/runs/1657730139, please use this URL for debugging.

conda-forge-linter commented 2 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

xylar commented 2 years ago

The error message from CI doesn't seem helpful:

 error: Command "/home/conda/feedstock_root/build_artifacts/scikit-fmm_1641378770788/_build_env/bin/x86_64-conda-linux-gnu-c++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/conda/feedstock_root/build_artifacts/scikit-fmm_1641378770788/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/include -fPIC -O2 -isystem /home/conda/feedstock_root/build_artifacts/scikit-fmm_1641378770788/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/conda/feedstock_root/build_artifacts/scikit-fmm_1641378770788/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/scikit-fmm_1641378770788/work=/usr/local/src/conda/scikit-fmm-2021.10.29 -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/scikit-fmm_1641378770788/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_=/usr/local/src/conda-prefix -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/conda/feedstock_root/build_artifacts/scikit-fmm_1641378770788/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/include -fPIC -I/home/conda/feedstock_root/build_artifacts/scikit-fmm_1641378770788/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/lib/python3.10/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.10/numpy/distutils/include -I/home/conda/feedstock_root/build_artifacts/scikit-fmm_1641378770788/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/include/python3.10 -c skfmm/pheap.cpp -o build/temp.linux-x86_64-3.10/skfmm/pheap.o -MMD -MF build/temp.linux-x86_64-3.10/skfmm/pheap.o.d -msse -msse2 -msse3" failed with exit status 1
jan-janssen commented 2 years ago

I guess the error is:

  /home/conda/feedstock_root/build_artifacts/scikit-fmm_1641378770788/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/include/python3.10/object.h:133:58: error: lvalue required as increment operand
    133 | #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))
        |                                                          ^
  skfmm/pheap.cpp:1257:7: note: in expansion of macro 'Py_REFCNT'
   1257 |     ++Py_REFCNT(o);
        |       ^~~~~~~~~
  /home/conda/feedstock_root/build_artifacts/scikit-fmm_1641378770788/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/include/python3.10/object.h:133:58: error: lvalue required as decrement operand
    133 | #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))
        |                                                          ^
  skfmm/pheap.cpp:1260:7: note: in expansion of macro 'Py_REFCNT'
   1260 |     --Py_REFCNT(o);
        |       ^~~~~~~~~

As other packages have similar issues - for example in https://gitlab.com/petsc/petsc4py/-/issues/9 - I hope it is fixed up-stream soon.

jkfurtney commented 2 years ago

OK this should be fixable. I think the error is coming in the Cython generated c++ wrapper for the binary min heap implementation (heap.cpp and heap.h). I can quickly try to regenerate this wrapper code with a newer version of Cython and hopefully this will fix the issue.

The cython wrapper is not actually used by scikit-fmm, the skfmm c+ code links directly to the heap implementation.

jkfurtney commented 2 years ago

OK I just committed a new version of pheap.cpp to the main branch.

Thinking back, the rational for not making the cython step part of the build process was to avoid adding a build dependency on cython. The idea being to keep it simple. The Python wrapped binary min heap class is helpful for experimenting with marching algorithms so I plan to keep it. I will think more if cython should be part of the build process.

xylar commented 2 years ago

@jan-janssen, presumably you can make a patch to the release with the changes? Let me know if you could use a hand.

jan-janssen commented 2 years ago

@xylar I tried this in https://github.com/conda-forge/scikit-fmm-feedstock/pull/19 but it did not work. Somehow it primarily complains about the python files in the include directory which is a bit strange to me.

jan-janssen commented 2 years ago

@xylar btw. Is it possible that we work in the same building?

xylar commented 2 years ago

@xylar btw. Is it possible that we work in the same building?

That could be. I work out of Germany most of the year but I come to LANL 3 times a year for several weeks each time.

xylar commented 2 years ago

Hmm, I don't see anything obviously incorrect about what you're doing here (or in #19). Would it be worth trying to get the source from GitHub instead and running cython? That might be a bit of a rabbit hole, though. Not something I have time to try right now.

I just happened to notice that I couldn't install this package with python 3.10 today.

jkfurtney commented 2 years ago

Using the latest cython has fixed the problem for my local Python 3.10 build. I just pushed out a release to pyPI with the fix. Thanks for all your efforts on the packaging.

jan-janssen commented 2 years ago

@conda-forge-admin, please rerun bot

regro-cf-autotick-bot commented 2 years ago

I see that this PR has conflicts, and I'm the only committer. I'm going to close this PR and will make another one as appropriate. This was generated by https://github.com/regro/autotick-bot/actions/runs/1785734209

jan-janssen commented 2 years ago

Everything worked in https://github.com/conda-forge/scikit-fmm-feedstock/pull/21 so it seems there was something wrong with my patch. Thanks again for the support @xylar and @jkfurtney