[ome-devel] OME-XML compilation error

Roger Leigh rleigh at dundee.ac.uk
Thu Jun 12 16:12:29 BST 2014


On 12/06/2014 14:49, Christoph Sommer wrote:
> Hi,
>
> I want to finalize the CellH5 reader classes for bioformats. While
> setting up bioformats, I encounter a compilation error in the OME-XML
> java libraries:
> (Netbeans / current develop branch)
>
>> --- maven-compiler-plugin:3.1:compile (default-compile) @ ome-xml ---
>> Changes detected - recompiling the module!
>> Compiling 181 source files to
>> C:\Users\sommerc\NetBeansProjects\bioformats\components\ome-xml\target\classes
>> -------------------------------------------------------------
>> COMPILATION ERROR :
>> -------------------------------------------------------------
>> /C:/Users/sommerc/NetBeansProjects/bioformats/components/ome-xml/target/generated-sources/ome/xml/model/FilterSet.java:[62,1]
>> illegal character: \92
>> [... many many more...]
>> 100 errors

Dear Christophe,

This is caused by using "incorrect" line endings when building on
Windows.  The python genshi library, used to generate this code, can't
cope with CRLF line endings and this results in broken java code being
generated.  (it's looking for "\[LF]" for line continuations, not
"\[CR][LF]" which is why you see lots of trailing "\" characters).

See: http://www.openmicroscopy.org/community/viewtopic.php?f=6&t=7386

Essentially, you need to have LF (Unix) line endings when building,
which implies setting 'core.autocrlf=input' for the git repo which
avoids LF->CRLF conversion on checkout.

Note that setting core.autocrlf on Windows can be annoying; there's a
registry setting set on install, and a global value in the git install
directory.  These appear to override the per-user/per-repository
configuration values, but I've not determined exactly how or why this
happens--it looks like git on Windows is perhaps buggy here.


Kind regards,
Roger Leigh

The University of Dundee is a registered Scottish Charity, No: SC015096


More information about the ome-devel mailing list