We're Hiring!

Building Insight on Linux

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Building Insight on Linux

Postby a.herbert » Mon Jul 25, 2011 3:48 pm

Hi,

I've downloaded the latest codebase and am trying to build the insight client.

I downloaded from the GIT repository and have run the ./build.py script in the top level directory. This runs to the end and builds lots of files into the dist directory. However it does not build Insight. A scan of all the jar files in the dist directory cannot find the class org.openmicroscopy.shoola.Main. (Note: I use the nice http://java.net/projects/jarscan/ utility for this.)

I move to the components/insight/build directory and try:

Code: Select all
ant -lib tools


I then get a horrible stack trace error from ant about a missing method from org.apache.tools.ant.util.FileUtils:

Buildfile: build.xml

BUILD FAILED
java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.getFileUtils()Lorg/apache/tools/ant/util/FileUtils;
at org.apache.tools.ant.taskdefs.optional.dotnet.ImportTypelib.<clinit>(ImportTypelib.java:48)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at org.apache.tools.ant.AntTypeDefinition.getTypeClass(AntTypeDefinition.java:161)
at org.apache.tools.ant.AntTypeDefinition.getExposedClass(AntTypeDefinition.java:135)
at org.apache.tools.ant.ComponentHelper.getElementName(ComponentHelper.java:577)
at org.apache.tools.ant.Project.getElementName(Project.java:1769)
at org.apache.tools.ant.IntrospectionHelper.getElementName(IntrospectionHelper.java:1087)
at org.apache.tools.ant.IntrospectionHelper.setAttribute(IntrospectionHelper.java:513)
at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:368)
at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:322)
at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:191)
at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:158)
at org.apache.tools.ant.Task.perform(Task.java:363)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:125)
at org.apache.tools.ant.taskdefs.ImportTask.execute(ImportTask.java:142)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:133)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
at org.apache.tools.ant.Main.runBuild(Main.java:658)
at org.apache.tools.ant.Main.startAnt(Main.java:188)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)


I have had a look inside the tools/ant-1.6.2.jar file and the class org.apache.tools.ant.util.FileUtils does exist but does not have the method getFileUtils().

I note that just below this line in the stack trace is a reference to a org.apache.tools.ant.taskdefs.optional.dotnet.ImportTypelib class. This loads .tlb files to a dotnet assembly:
http://www.docjar.com/docs/api/org/apache/tools/ant/taskdefs/optional/dotnet/ImportTypelib.html

Given that I am on Linux I think this is the source of the error. Any ideas why the build is trying to load this?

If anyone has got this to work on Linux then advice would be useful.

Incidentally if I import the projects into Eclipse then I can build and run it from Eclipse ignoring the ant files. I would just like to generate the standalone omero.insight.jar through the correct build process using ant.

Thanks,

Alex
a.herbert
 
Posts: 53
Joined: Tue Jan 11, 2011 1:35 pm

Re: Building Insight on Linux

Postby jmoore » Mon Jul 25, 2011 5:49 pm

Hi Alex,

left over from our migration to git earlier this year, Insight is still not integrated into the main build (build.py). See #3940 for more info.

Instead, you will need to follow the instructions under the OmeroInsightContributing wiki page. This means roughly:

Code: Select all
cd components/insight/build
java build compile run


Alternatively, you can load the insight project into eclipse.

Cheers,
~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Building Insight on Linux

Postby a.herbert » Tue Jul 26, 2011 9:54 am

Hi Josh,

I think you meant to use 'java' in your code sample and not 'ant'. I got the distribution package using:

Code: Select all
cd components/insight/build
java build dist


Thanks for the help.

Alex
a.herbert
 
Posts: 53
Joined: Tue Jan 11, 2011 1:35 pm

Re: Building Insight on Linux

Postby jmoore » Tue Jul 26, 2011 10:10 am

Thanks for the correction, Alex! I've modified my post so that no one will copy and paste it by mistake.

Cheers,
~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany


Return to Developer Discussion

Who is online

Users browsing this forum: Google [Bot] and 1 guest