Page 1 of 1

Unable to install zeroc-ice on FreeBSD 10.2 - SOLVED

PostPosted: Wed Aug 17, 2016 7:42 pm
by jimlong
I'm acquainting myself with Omero by installing 5.2 with Ice 3.6.2 and Python 2.7.12 per the instructions at http://www.openmicroscopy.org/site/support/omero5.2/sysadmins/unix/server-installation.html.

Much of that goes well, except that I wind up without the Python bindings for Ice:

Code: Select all
omero : /usr/ports/devel/ice# python -c "import Ice; print Ice.stringVersion()"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named Ice


The instructions do in fact tell me to expect this:

"With Ice 3.6, the Python bindings are provided separately. If your package manager does not provide Ice python packages, run pip install zeroc-ice to install the Ice Python bindings."

When I attempt to install zeroc-ice, pip reports an error:

Code: Select all
omero : /root# pip --no-cache-dir install zeroc-ice
Collecting zeroc-ice
  Downloading zeroc-ice-3.6.2.1.tar.gz (1.1MB)
    100% |################################| 1.1MB 20.8MB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-jj2Myy/zeroc-ice/setup.py", line 120, in <module>
        if filterName(n):
    NameError: name 'filterName' is not defined
   
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-jj2Myy/zeroc-ice/


There are essentially no Google results for that error string, so I am stumped as to what I need to do to get pip to install zeroc-ice.

I would appreciate any suggestions the community may have to offer.

Thank you!

Jim

Re: Unable to install zeroc-ice on FreeBSD 10.2

PostPosted: Wed Aug 17, 2016 11:21 pm
by rleigh
Dear Jim,

I tried on FreeBSD 10.3 and got exactly the same error. After looking in the setup.py script in the zeroc-ice-3.6.2.1 release which it downloads, the logic is this:

Code: Select all
if platform is "darwin"
  ...
elif platform is "linux"
  ...
elif platform is "windows"
  ...

So FreeBSD or any other platform not one of those three falls through and the filterNames function is not defined.
Ideally the logic would be

Code: Select all
if platform is "darwin"
  ...
elif platform is "windows"
  ...
else
  ... code for generic Unix platform here


I'm afraid this is a bug in the ZeroC source itself. I can look at making a patch for this though, it shouldn't be much work.


Kind regards,
Roger

Re: Unable to install zeroc-ice on FreeBSD 10.2

PostPosted: Thu Aug 18, 2016 12:40 pm
by rleigh
I developed a patch for this, which you can find here: https://forums.zeroc.com/discussion/464 ... s/p1?new=1

- Download: https://pypi.python.org/packages/c5/18/ ... b9f21d6348
- Unpack: tar -xf zeroc-ice-3.6.3.1.tar.gz
- Patch: cd zeroc-ice-3.6.2.1; patch -p1 < patchfile
- Pip install: pip install /path/to/zeroc-ice-3.6.2.1

I hope that's useful to get you up and running. Hopefully this will work by default with the next Ice release.

Kind regards,
Roger

Re: Unable to install zeroc-ice on FreeBSD 10.2

PostPosted: Thu Aug 18, 2016 4:57 pm
by jimlong
Thank you very much, Roger. The patch applied fine, and solved my installation problem.

Jim


Code: Select all
omero : /root# pip install ./zeroc-ice-3.6.2.1
Processing ./zeroc-ice-3.6.2.1
Building wheels for collected packages: zeroc-ice
  Running setup.py bdist_wheel for zeroc-ice ... done
  Stored in directory: /root/.cache/pip/wheels/d8/9c/ad/01395e065b9c3d51232cb8da94db98a8dbf562727042dd9e7a
Successfully built zeroc-ice
Installing collected packages: zeroc-ice
Successfully installed zeroc-ice-3.6.2.1
omero : /root# python -c "import Ice; print Ice.stringVersion()"
3.6.2

Re: Unable to install zeroc-ice on FreeBSD 10.2

PostPosted: Thu Aug 18, 2016 8:29 pm
by rleigh
Dear Jim,

Great to hear this worked for you.

Not intended to discourage, but a word of caution. We don't test FreeBSD as extensively as we do Linux, and some parts are currently not tested at all by our continuous integration system; issues such as this one you have encountered have also caused difficulties for me in the past, I think when testing the ice 3.6 port. Currently we use FreeBSD only to build and test OmeroCpp (which includes a full server build). What we don't test is a full running deployment of the server and OMERO.web, and we also don't actively test the client programs such as Insight on FreeBSD.

This might mean you could hit some portability issues if there are Linux-isms in the code or supporting scripts, or a lack of FreeBSD-specific support if any is needed. In principle it should work just fine, but we have not validated that to be able to confirm it's fully supported.

That said, FreeBSD does have some compelling features. Being able to use ZFS to transparently compress the image data, as well as snapshotting and sending the data off remotely for backup could be very nice. And you can run the different pieces in isolation inside jails should you choose. I (and the rest of the team) would be very interested in your experiences, and if you do hit any portability snags, please do let us know so that we can investigate and fix them where possible. If there is demand for FreeBSD for production deployments, then there is the possibility of extending our CI support, if we have the resources to do so.


Kind regards,
Roger

Re: Unable to install zeroc-ice on FreeBSD 10.2

PostPosted: Thu Aug 18, 2016 10:22 pm
by jimlong
Roger:

Thank you for the background on Omero's development and testing cycles.

I work for a public university and yes, we deploy a lot of FreeBSD on ZFS using jails for all of the reasons you mention. I have been keeping notes on my installation journey (mostly for my own sanity!), and I suspect that even when I'm done, I'll review the notes and re-do the installation a time or two just to ensure that all the hitches I found the first time are smoothed out. It's still a bit of a pipe dream at this point, but I will be pleased if someday I can offer a document that might become the basis of a new FreeBSD-specific walkthrough to add to the links at https://www.openmicroscopy.org/site/support/omero5.2/sysadmins/unix/server-installation.html

Re: Unable to install zeroc-ice on FreeBSD 10.2

PostPosted: Fri Aug 19, 2016 10:44 am
by rleigh
Hi Jim,

That all sounds great. We would certainly be interested in a writeup of your experiences. We've recently added a new repo for such things (https://github.com/ome/community-docs). The main installation docs are all generated from scripts so that the whole installation sequence gets tested routinely on each supported platform. We would need to add FreeBSD to the installation scripts (omero-install) to get this into the main documentation page, but the community-docs would probably be a fine place to stage so others can access it until such time we have the full support in place.

It's on my todo list to add FreeBSD images to our OpenStack setup so we can create VMs on demand for building and testing. That's a prerequisite to doing the work on the scripting/docs side. We currently have two VMware images, but the hardware is too limited to do full building and deployment.

Regards,
Roger

Re: Unable to install zeroc-ice on FreeBSD 10.2

PostPosted: Fri Aug 19, 2016 10:28 pm
by rleigh

Re: Unable to install zeroc-ice on FreeBSD 10.2

PostPosted: Sat Aug 27, 2016 2:29 pm
by rleigh
The upstream pull requests are now merged, so this should start working by default for the next Ice release.

Re: Unable to install zeroc-ice on FreeBSD 10.2

PostPosted: Tue Aug 30, 2016 7:44 pm
by jimlong
Thank you very much, Roger!