ome / omero-py

Python project containing Ice remoting code for OMERO
https://www.openmicroscopy.org/omero
GNU General Public License v2.0
20 stars 31 forks source link

zeroc-ice fails to build wheel #360

Closed vpilling closed 2 months ago

vpilling commented 1 year ago

Can you please update the omero-py package to use the latest zeroc-ice package. The one that is currently included fails to compile and create wheel. The current version corrects the problem.

jburel commented 1 year ago

By the latest do you mean 3.7.x? omero does not support ice 3.7 I have bumped the version to use the latest version in the 3.6 series

michaelosthege commented 1 year ago

Also that newer version is creating problems - I guess largely because https://github.com/conda-forge/zeroc-ice-feedstock isn't getting much attention and doesn't test builds on Windows.

Already with a simple mamba create -n test -c conda-forge "python=3.10.x" omero-py:

pip --version
>>> ImportError: DLL load failed while importing _ctypes: Das angegebene Modul wurde nicht gefunden.
markovendelin commented 12 months ago

The problem is with zeroc-ice 3.6.5 failing to install when used with Python 3.11:

      src/Slice.cpp:24:10: fatal error: eval.h: No such file or directory
         24 | #include <eval.h>
            |          ^~~~~~~~
      compilation terminated.

It has been fixed in https://github.com/zeroc-ice/ice/pull/1394 (closing https://github.com/zeroc-ice/ice/issues/1393), but that seems not to be backported to 3.6.x. So, as it is, we cannot use omero-py on Python 3.11

manics commented 11 months ago

The conda-forge zeroc-ice 3.6 package is maintained in this repo/branch: https://github.com/conda-forge/zeroc-ice-feedstock/tree/version_3.6

There are already some minor patches https://github.com/conda-forge/zeroc-ice-feedstock/blob/ebbcd1f8e297b8ce1fd07b76d5743ee4f42bd780/recipe/meta.yaml#L11-L13 If you're interested in adding Python 3.11 support to the conda-forge package a PR on that repo would be very welcome!

jburel commented 11 months ago

Alternatively you can try to install from the ome channel conda install -c ome zeroc-ice36-python==3.6.5 I have not tried with Python 3.11

markovendelin commented 11 months ago

Any chance it would make it to PyPi? We are using omero-py as a dependency for one of our projects to support OMERO as an image server backend. However, we don't publish it on Conda and don't plan to use Conda either.

jburel commented 11 months ago

@markovendelin A new wheel will need to be build, are you running on CentOS, Ubuntu?

markovendelin commented 11 months ago

Building during install is not a problem. Personally, running it on Gentoo and Ubuntu, but we are doing it for Windows using CI as well. So, if there is a branch that I can use for zeroc-ice and give it to pip, we should be OK

markovendelin commented 11 months ago

Ping. https://github.com/conda-forge/zeroc-ice-feedstock/tree/version_3.6 cannot be used with pip as

> pip install git+https://github.com/conda-forge/zeroc-ice-feedstock@version_3.6
Collecting git+https://github.com/conda-forge/zeroc-ice-feedstock@version_3.6
  Cloning https://github.com/conda-forge/zeroc-ice-feedstock (to revision version_3.6) to /tmp/pip-req-build-zw094hrc
  Running command git clone --filter=blob:none --quiet https://github.com/conda-forge/zeroc-ice-feedstock /tmp/pip-req-build-zw094hrc
  Running command git checkout -b version_3.6 --track origin/version_3.6
  Switched to a new branch 'version_3.6'
  branch 'version_3.6' set up to track 'origin/version_3.6'.
  Resolved https://github.com/conda-forge/zeroc-ice-feedstock to commit ebbcd1f8e297b8ce1fd07b76d5743ee4f42bd780
ERROR: git+https://github.com/conda-forge/zeroc-ice-feedstock@version_3.6 does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

Couldn't find repo for OME distributed version.

joshmoore commented 11 months ago

If I understand correctly, @markovendelin, you will need to look in the feedstock and find what is being built on conda-forge, e.g. in https://github.com/conda-forge/zeroc-ice-feedstock/blob/version_3.6/recipe/meta.yaml

markovendelin commented 11 months ago

I guess that would work as a temporary patch. However, I wonder if you plan to update zeroc-ice support of omero-py to zeroc-ice latest (3.7) version? Something that the upstream would be supporting on their side.

joshmoore commented 11 months ago

There is no roadmap currently for moving to Ice 3.7. Each minor version of Ice required pretty significant development resources on our side. If anyone in the community is interested in beginning the investigation, we're happy to help.

markovendelin commented 11 months ago

@joshmoore - sounds like frustrating API to depend upon. Will have to think how to approach it on our side. Never worked with zeroc-ice, so would require lots of time to get into it.

jburel commented 7 months ago

Note that a similar problem now occurs on Windows 2022 (Github action see https://github.com/ome/omero-py/actions/runs/6863785728/job/18665117255)

src/ice/cpp/include\IceUtil/Timer.h(105): error C2039: 'binary_function': is not a member of 'std'

  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.37.32822\include\set(23): note: see declaration of 'std'

  src/ice/cpp/include\IceUtil/Timer.h(105): error C2504: 'binary_function': base class undefined

  src/ice/cpp/include\IceUtil/Timer.h(105): error C2143: syntax error: missing ',' before '<'

  error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2

See https://learn.microsoft.com/en-us/answers/questions/1348183/std-binary-function-is-missing-in-msvc-14-37-32822 for background

cc @sbesson

Action: disable for now the build on windows-latest

jburel commented 2 months ago

Fixed in https://github.com/ome/omero-py/pull/402

stefanches7 commented 2 weeks ago

The problem is with zeroc-ice 3.6.5 failing to install when used with Python 3.11:

      src/Slice.cpp:24:10: fatal error: eval.h: No such file or directory
         24 | #include <eval.h>
            |          ^~~~~~~~
      compilation terminated.

It has been fixed in zeroc-ice/ice#1394 (closing zeroc-ice/ice#1393), but that seems not to be backported to 3.6.x. So, as it is, we cannot use omero-py on Python 3.11

Have the same issue, uname -a: Linux XXXXX 5.15.0-112-generic #122-Ubuntu SMP Thu May 23 07:48:21 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux pip 23.3.1 from /home/ubuntu/miniconda3/lib/python3.11/site-packages/pip (python 3.11)

stefanches7 commented 2 weeks ago

Alternatively you can try to install from the ome channel conda install -c ome zeroc-ice36-python==3.6.5 I have not tried with Python 3.11

This does not work with Python 3.11 on a "polluted" environment for me, but worked in a new Conda environment with Python 3.9

image

jburel commented 2 weeks ago

We have reviewed the documentation If you want to use Python version other than 3.9, please have a look at https://omero.readthedocs.io/en/stable/developers/Python.html