Problems with CellProfiler 2.0 on Ubuntu 12.10

Hi all,

I recently installed CellProfiler on my desktop running Ubuntu 12.10 (Precise Pangolin) and I’ve encountered some problems. I’ve managed to overcome most of them, and the ones I haven’t been able to fix isn’t preventing me from using the program, but I thought I’d post them here in case others were having similar problems and they could be fixed.

I followed the instructions for installation via Option 2 as described here, and encountered a few issues with the installation:

  1. When I tried to compile I received I received an ld error saying that libjvm.so was missing. I had set LD_LIBRARY_PATH and checked my Makefile and it all appeared to be correct. In the end, I was able to fix this error using the tweak to cellprofiler/utilities/setup.py described in this post. I think maybe this file needs a fix itself to have a non amd64 option?

  2. After succesffully compiling when I ran CellProfiler I was still getting an error about libjvm.so not being found. The error was being spit up by cellprofiler/utilities/jutil.py. After playing around with that, I determined that it was failing because the java -cp ... findlibjvm call was producing nothing. So, I was able to fix this with a real kludge by changing line 99 in cellprofiler/utilities/jutil.py:

#jvm_dir = stdout.strip()
jvm_dir = "/usr/lib/jvm/java-6-sun/jre/lib/i386/server"

Though it works for me, this is obviously a terrible solution. Maybe something is wrong with the findlibjvm class for my version of java? Here’s some info on that:

$ java -version
java version "1.7.0_15"
OpenJDK Runtime Environment (IcedTea7 2.3.7) (7u15-2.3.7-0ubuntu1~12.10.1)
OpenJDK Server VM (build 23.7-b01, mixed mode)
  1. After fixing the libjvm.so issue I was able to run CellProfiler and process images. :smile: There are a few minor things remaining that I 100% don’t care about (no “Tahoma” font, I’ll live… 8) ). However, I am still getting tons of Gtk errors spit out at me that are a bit more concerning (though not killing my ability to use the program). Here’s what happens when I run CellProfiler.py:
$ python CellProfiler.py 
running build_ext
skipping '_cpmorphology2.c' Cython extension (up-to-date)
skipping '_watershed.c' Cython extension (up-to-date)
skipping '_propagate.c' Cython extension (up-to-date)
skipping '_filter.c' Cython extension (up-to-date)
skipping '_lapjv.c' Cython extension (up-to-date)
skipping '_convex_hull.c' Cython extension (up-to-date)
running build_ext
skipping 'javabridge.c' Cython extension (up-to-date)

(python:9886): Gtk-CRITICAL **: IA__gtk_range_set_range: assertion `min < max' failed
Version: 2013-03-20T16:20:08 SVN:10199 / 20130320162008

(python:9886): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion `GTK_IS_WIDGET (widget)' failed

I continue to get these sorts of errors as windows are opened and closed and manipulated, etc. For example, if I open an image and then close it I get this:

(python:9886): LIBDBUSMENU-GTK-CRITICAL **: watch_submenu: assertion `GTK_IS_MENU_SHELL(menu)' failed

I haven’t done any thorough research into fixing this problem (because hey, I’m processing images), but a look across the posts here didn’t turn up anything. If anyone had any insight I’d be curious…

That’s all, thanks for this amazing program!!! :smiley:

Hi tyturing,

I would recommend trying to use the version of gtk from the ubuntu repositories (use make -f Makefile.CP2 all instead of make -f Makefile.CP2 gtk all)–that should stave off some of the more terrifying error messages, but we will have to go through and test on the more popular linux versions, which may take some time. Regarding the java issues–are you setting JAVA_HOME as well as LD_LIBRARY_PATH? If so, I’ll spend some time and try to reproduce your error, as that’s a fix I don’t remember using in the past (I’ve run CP on Ubuntu 12.04 LTS, but not 12.10–I’ll try to produce a .deb soon, but our priority now is developing support for Red Hat/CentOS). As an aside, are you sure you’re using 12.10? 12.10 is quantal quetzal, 12.04 is precise pangolin–this is probably nothing, but if you’ve hardcoded the keyword ‘precise’ somewhere on your quantal system, you might see some weird stuff…

Cheers,

Samuel

Hi Samuel,

Thanks very much for your reply.

First, sorry, yes, you’re right, I’m using 12.10 and that’s actually quantal quetzal. I only recently upgraded from 12.04 so ‘precise pangolin’ is still lodged in my brain as the one I’m using. I don’t think ‘precise’ is hardcoded anywhere on my system…

Second, regarding the java stuff, yes I have set JAVA_HOME and LD_LIBRARY_PATH. Here’s what I’ve got set:

$ echo $JAVA_HOME
/usr/lib/jvm/java-6-sun

$ echo $LD_LIBRARY_PATH
/usr/lib/jvm/java-6-sun/jre/lib/i386/server

$ ls /usr/lib/jvm/java-6-sun/jre/lib/i386/server
libjsig.so  libjvm.so  Xusage.txt

So, libjvm.so is right where I would assume the compiler is looking for it. That’s why that error was so confusing for me…

Finnaly, regarding the gtk errors, I’m afraid I’m not understanding your instructions. I did the build via the CellProfiler.py script, not by directly using the Makefile. When I try issuing the command you recommended (in the CellProfiler directory) this is what I get:

$ sudo make -f Makefile.CP2 all
mkdir -p "" && cd "" && \
					wget --continue --tries=10 --timeout=60 --no-check-certificate  "https://svn.broadinstitute.org/CellProfiler/trunk/CellProfiler/cellprofiler/utilities/findlibjvm.class" && \
					touch "/findlibjvm.class"
mkdir: cannot create directory `': No such file or directory
make: *** [/findlibjvm.class] Error 1

Might this relate to the java issue?

Many thanks,

tyrturing

Aha! You shouldn’t need sudo for this–that’s why it’s trying to stick things in the root directory, which isn’t where you want it. Just make -f Makefile.CP2 all should make your life better.

(Note also that we’ll be rolling out better makefiles soon, with full Ubuntu support, so that will also help).

Sorry for the late response–I failed to subscribe to this forum question and never realized you’d submitted another question!

Thanks for your reply!

You’re right: I can compile it by not using sudo (I had to change ownership of the directories, as I had placed CellProfiler in /usr/local as root). Two other issue arose though, one that I’ve fixed and one I’m still struggling with:

  1. The error I’ve fixed: the zlib file that was specified in the Makefile was not up-to-date. The Makefile tells wget to look for zlib-1.2.5.tar.bz2, but that’s not available at znet.net. I changed that to zlib-1.2.8.tar.gz (the current file that is available) and that worked.

  2. The error I haven’t fixed: when compiling I get the following error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 21, in <module>
  File "build/bdist.linux-i686/egg/setuptools/package_index.py", line 2, in <module>
  File "/usr/local/CellProfiler/lib/python2.6/urllib2.py", line 93, in <module>
    import hashlib
  File "/usr/local/CellProfiler/lib/python2.6/hashlib.py", line 138, in <module>
    sha224 = __get_builtin_constructor('sha224')
  File "/usr/local/CellProfiler/lib/python2.6/hashlib.py", line 66, in __get_builtin_constructor
    import _sha256
ImportError: No module named _sha256
make: *** [/usr/local/CellProfiler/bin/easy_install] Error 1

I’ve looked on-line, and one other person had this problem (see http://stackoverflow.com/questions/16436903/no-module-sha256-installing-cellprofiler), but no fix was ever posted (other than bypassing the Makefile). I have both libsasl2-dev and libssl-dev installed, so I’m not sure what to try. Any ideas would be greatly appreciated!

Thanks,

Blake

Okay, so I would about face on the current build and follow the instructions here: https://github.com/CellProfiler/CellProfiler/wiki/CellProfiler-Developer%27s-version-installation-for-Linux

I imagine that that will make your life much easier.

We’re working on producing .deb’s and .rpm’s–coming soon!

To clarify, follow the instructions at the bottom of that page.

Yeah, the instructions on the github page are what I folllowed originally, and it’s still working for me but with a few small error messages and hiccups. :smile:

I look forward to the .deb and .rpm files!!! :smiley:

Ah, but did you try to scripts referenced in part three (developmental part) at the bottom? That was added much more recently. It comes, of course, without warranty.

I see, didn’t notice that new section at first. I tried the ubuntubuild.sh script, and it seemed to be clipping along, but it ended with the following, cryptic error:

make: *** [precheck-java] Error 2

I’m stll getting the same set of Gtk errors when I start CellProfiler, but otherwise seems fine… If you have any idea about what this latest error means I’ll give it a try!

Thanks!

Hmm–well, try making sure all is well and good with java. Make sure the jdk is downloading and unpacking, that JAVA_HOME is set appropriately. Also check ubuntubuild.sh–maybe it’s an old version and is using Makefile.CP2.standard.64 instead of Makefile.CP2.ubuntu.64?