I just wanted to share my experience with building CellProfiler on Ubuntu 10.04. Firstly I followed the instructions at cellprofiler.org/wiki/index.php/CP2.0_on_Linux and that probably solved most problems, but there was a few more I had to deal with, including one I couldn’t solve.
I first got errors
That was fixed by setting in my .bashrc
Then I got an error like this:
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-i686-2.6/javabridge.o -L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server -ljvm -o /media/endless/bioinfo/CellProfiler/cellprofiler/utilities/javabridge.so /usr/bin/ld: cannot find -ljvm
I was not able fix this by changing LD_LIBRARY_PATH. Instead, I was able to fix this problem by manually changing cellprofiler/utilities/setup.py
- library_dirs = [os.path.join(java_home,'jre','lib','amd64','server')] + library_dirs = [os.path.join(java_home,'jre','lib','i386','server')]
That’s not a fix for everyone of course, because it ruins it for the amd64 people. I tried using the platform.machine() method from the platform python library, but that gave me i686, not i386 as required. There is no i686 directory in the folder. So perhaps someone with more python experience can step in and fix it for everyone?
My final problem was with vigra. While
python CellProfiler.py --build-and-exit now works, running it without --build-and-exit throws this error
vigra import: failed to import the vigra library. Please follow the instructions on
"http://hci.iwr.uni-heidelberg.de/vigra/" to install vigra
Traceback (most recent call last):
File "/media/endless/bioinfo/CellProfiler/cellprofiler/modules/classifypixels.py", line 14, in <module>
ImportError: No module named vigra
<error chopped for brevity>
I installed the libvigraimpex2ldbl and libvigraimpex-dev packages from the official Ubuntu repos to no avail. Building from source didn’t work either. I compiled it fine, but I still don’t seem to be able to “import vigra” from python scripts. make check throws no errors, only warnings. This is only tangentially related to CellProfiler, but can anyone help?
I seem to be able to run the example pipeline downloaded from the URL, perhaps it is only the ClassifyPixels module that will cause problems? Not sure if that will affect me or not…