We're Hiring!

Build error for bio-formats C++ bindings

Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats
Please note:
Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats

If you are having trouble with image files, there is information about reporting bugs in the Bio-Formats documentation. Please send us the data and let us know what version of Bio-Formats you are using. For issues with your code, please provide a link to a public repository, ideally GitHub.

Build error for bio-formats C++ bindings

Postby Cosinus42 » Fri Aug 16, 2013 11:06 am

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!
Cosinus42
 
Posts: 4
Joined: Fri Aug 16, 2013 10:54 am

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

Postby rleigh » Mon Aug 19, 2013 9:33 am

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
User avatar
rleigh
 
Posts: 217
Joined: Tue Mar 13, 2012 11:45 am

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

Postby Cosinus42 » Tue Aug 20, 2013 6:52 am

Thank you Roger for your detailed reply. That solved my problem!
Cosinus42
 
Posts: 4
Joined: Fri Aug 16, 2013 10:54 am

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

Postby Loic » Mon Dec 02, 2013 12:15 pm

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!
Loic
 
Posts: 5
Joined: Mon Dec 02, 2013 11:42 am

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

Postby dpwrussell » Tue Dec 03, 2013 9:40 am

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
User avatar
dpwrussell
 
Posts: 18
Joined: Tue May 15, 2012 1:26 pm

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

Postby Loic » Mon Dec 09, 2013 5:43 pm

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!
Loic
 
Posts: 5
Joined: Mon Dec 02, 2013 11:42 am

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

Postby dpwrussell » Mon Dec 16, 2013 9:54 am

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
User avatar
dpwrussell
 
Posts: 18
Joined: Tue May 15, 2012 1:26 pm

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

Postby Loic » Mon Dec 16, 2013 12:32 pm

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.
Loic
 
Posts: 5
Joined: Mon Dec 02, 2013 11:42 am


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest