[ome-users] Building C++ bindings

josh.moore at gmx.de josh.moore at gmx.de
Thu Nov 20 19:33:35 GMT 2008


Hi Mario,

Mario Valle writes:
 > Could you confirm that the following steps are the correct one to build OMERO C++ ? I have 
 > various doubts (in parenthesis). I'm doing this on a Mac OSX 10.4 PCC.
 > 
 > 0) Check prerequisites. (Only Ice 3.3.0? Ant? Something else?)

Xtools for the build (or some other compiler tool), Ice, Java, and
Python are the build requirements. For the non-OSX'ers amongst you,
I'm personally just running into a nptl library issue under Centos,
which I'll be sure to include in the documentation.

 > 1) Install Ice 3.3.0 (Ok, this still fails to build on Mac 10.4 PPC. I'm opening a bug 
 > report with ZeroC) (Here is the first lines of the errors. Does this ring any bell?)
 > g++ -c -I.. -I../../include -DFREEZE_API_EXPORTS -I/opt/local/include/db46  -g -O2 
 > -DNDEBUG -ftemplate-depth-128 -Wall -D_REENTRANT BackgroundSaveEvictorI.cpp
 > BackgroundSaveEvictorI.cpp: In constructor 
 > `Freeze::BackgroundSaveEvictorI::BackgroundSaveEvictorI(const Ice::ObjectAdapterPtr&, 
 > const std::string&, DbEnv*, const std::string&, const Freeze::ServantInitializerPtr&, 
 > const std::vector<Freeze::IndexPtr, std::allocator<Freeze::IndexPtr> >&, bool)':
 > BackgroundSaveEvictorI.cpp:158: error: no matching function for call to 
 > 'Ice::LocalObject::LocalObject(const void**)'
 > ../../include/Ice/LocalObject.h:27: note: candidates are: Ice::LocalObject::LocalObject()
 > ../../include/Ice/LocalObject.h:27: note: 
 > Ice::LocalObject::LocalObject(const Ice::LocalObject&)
 > BackgroundSaveEvictorI.cpp:158: error: no matching function for call to 
 > 'Ice::ServantLocator::ServantLocator(const void**)'
 > ../../include/Ice/ServantLocator.h:72: note: candidates are: 
 > Ice::ServantLocator::ServantLocator()
 > ../../include/Ice/ServantLocator.h:72: note: 
 > Ice::ServantLocator::ServantLocator(const Ice::ServantLocator&)

Not off the top of my head, sorry. But something else: I judge from
the path /opt/local/include/db46 that you're using MacPorts. If so, did the
Ice install not work for you? If not, how did you build/install db46?

 > 2) Take the OMERO source
 > svn co http://cvs.openmicroscopy.org.uk/svn/omero/trunk omero
 > (is this needed to build OMERO C++? Or is the installation of the normal kit sufficient?)

Yes, this is all we've got! :)

 > 3) Setup the sources
 > cd omero
 > java omero setup
 > (See above. It asks the same questions answered during normal installation)

Correct.

 > 4) Enable Ice
 > no.ice=false
 > ice.home=/usr/share/Ice
 > (should I modify it under the OMERO installation or under the downloaded source (see 2)?)

In trunk, this is no longer necessary. We ship the slice files to
prevent having to set ice.home, and "no.ice" no longer makes sense
since everything is blitz based.

In Beta3.x, however, this is both necessary and correct, with the
caveat that ice.home must point to a valid Ice 3.3 directory such that
it contains a directory "slice/".

 > 5) Setup the PATH to slice2cpp and DYLD_LIBRARY_PATH to the corresponding .dylib

Correct.

 > 6) Go to the omero direcory (under the installation or the source?) and execute
 > java omero build-cpp
 > (or should I execute ant?)

"ant" alone will build everything but skip C++ because of how long the
build takes. So this is what you want.

 > Well, at this point I have pages and pages of warnings and then BUILD FAILED. Ok, I have 
 > to fix point 1 before complaining. Here is an example:

Agreed on point 1! :) Unfortunately, the build can't do much of
anything without the code generators slice2*.

 > $ java omero build-cpp
 > Buildfile: build.xml
 > 
 > check-ivy:
 > :: Ivy 2.0.0-beta2 - 20080225093827 :: http://ant.apache.org/ivy/ ::
 > :: loading settings :: file = /Users/mvalle/omero-cpp/omero/etc/ivysettings.xml
 > [Error] :43:30: cos-nonambig: "":license and WC[##any] (or elements from their 
 > substitution group) violate "Unique Particle Attribution". During validation against this 
 > schema, ambiguity would be created for those two particles.

These warnings are a bizarre by-product of java installation issues
involving XML libraries for which I have yet to find a solution. Mea culpa.

 > Thanks for clarifying!
 > 				mario

Thanks for your patience!
~Josh.



More information about the ome-users mailing list