Page 1 of 1

Build error for bio-formats C++ bindings

PostPosted: Fri Aug 16, 2013 11:06 am
by Cosinus42
Hi,

I am very new to bio-formats and I would like to include it within my C++ code. Therefore, I tried to build the C++ bindings following the instructions: http://www.openmicroscopy.org/site/supp ... ndows.html

But when I run the command 'mvn -DskipTests package dependency:copy-dependencies cppwrap:wrap', the build fails and I receive the following Error message:

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec(xsd-fu-metadata-store) on project scifio: Command execution failed. Cannot run program "python" (in directory "C:\Program Files\bioformats-develop\components\xsd-fu"): CreateProcess error=2, The system cannot find the file specified

I would be very helpful if anybody had an idea, what to do!

Re: Build error for bio-formats C++ bindings

PostPosted: Mon Aug 19, 2013 9:33 am
by rleigh
Hi,

This should be fairly straightforward to resolve. You firstly need to install Python version 2.7.5 (http://www.python.org/download/) and add it to your PATH so that you can run it directly. The installer should ask you if you want to add it to the default/system path (just say yes). You also need to install genshi (http://genshi.edgewall.org/wiki/Download) which is a python module we use to generate java code from the OME data model. Depending upon how familiar you are with Python, there are several different ways to get genshi; you can download it by hand using the above link, or you can use "pip install genshi" to download and install using the "pip" tool (you need to install pip first, e.g. from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip and add it to your PATH as well). See http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows

If you run into any problems doing this, or any additional trouble after getting past this step, please do get back to us.

Regards,
Roger

Re: Build error for bio-formats C++ bindings

PostPosted: Tue Aug 20, 2013 6:52 am
by Cosinus42
Thank you Roger for your detailed reply. That solved my problem!

Re: Build error for bio-formats C++ bindings

PostPosted: Mon Dec 02, 2013 12:15 pm
by Loic
Hello,

Similarly to Cosinus42, I'm trying to use bio-format with C++ code. I followed the same steps and also had a problem when running the maven command to generate the bindings ( mvn -DskipTests package dependency:copy-dependencies cppwrap:wrap ).

The error I get is different though:
[exec] Execute failed: java.io.IOExeption: Cannot run program "git": CreateProcess error=2, the system cannot find the specified file.

I also get the following error in the build report:
Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.4:execute (default) on project scifio: java.lang.NullPointerException -> [Help 1]

I have no experience in Java programming or the use of maven so I would appreciate any help.
Thank you!

Re: Build error for bio-formats C++ bindings

PostPosted: Tue Dec 03, 2013 9:40 am
by dpwrussell
This should be easily fixed by installing 'git'. Depending on your platform, one of these should do the trick: http://git-scm.com/downloads

Cheers,

Douglas

Re: Build error for bio-formats C++ bindings

PostPosted: Mon Dec 09, 2013 5:43 pm
by Loic
Thank you Douglas for your answer.

I installed Git and now get the following error:

fatal: Not a git repository (or any of the parent directories): .git

Do I need to create a git repository in the scifio directory before running the mvn command?
Sorry if my questions are very basic :?
Thank you!

Re: Build error for bio-formats C++ bindings

PostPosted: Mon Dec 16, 2013 9:54 am
by dpwrussell
Sorry for slow reply Loic,

How did you get the bioformats code? If you didn't clone it from git (which seems unlikely given that you were able to try building before you had git installed) then it wont work as what you have isn't a git repository. I think this could be made clearer in the docs, I'll have a look at that.

Now that you have git installed, getting the source code from github is very easy. You'll want to do this wherever you want the 'bioformats' directory with the source to live, i.e. not from inside the current source you have downloaded as that will end up being very confusing.

Code: Select all
git clone https://github.com/openmicroscopy/bioformats.git


This will create a directory 'bioformats', which will have all the source in it. You can then proceed as per the original instructions.

Cheers,

Douglas

Re: Build error for bio-formats C++ bindings

PostPosted: Mon Dec 16, 2013 12:32 pm
by Loic
Thank you very much Douglas, that solved my problem.

Just for info, the first time (when I had all the errors), I downloaded the files from the link in the tutorial:
http://downloads.openmicroscopy.org/bio-formats/4.4.9/

Also, this time, when I downloaded them with git ( at https://github.com/openmicroscopy/bioformats.git), I guess I got the last version (called "develop") but it didn't work. I then downloaded the "dev_4_4" version and it worked perfectly :D

Anyway, thank you again!

Loïc.