[ImageJ-devel] SCIFIO via Avian, was Re: [VIGRA] Avian VM and Bio-Formats

Johannes Schindelin Johannes.Schindelin at gmx.de
Fri Nov 29 13:17:22 CST 2013

Hi Ulli,

On Fri, 29 Nov 2013, Ullrich Koethe wrote:

> > > 'mvn install' stops with
> > >
> > > [ERROR] The goal you specified requires a project to execute but
> > > there is no POM in this directory.
> >
> > I am an idiot! Avian uses the "make" command. That will compile things
> > into a subdirectory of build/. It actually requires JAVA_HOME to point
> > to a JDK and javac to be in the PATH. Sorry for not describing this
> > correctly.
> >
> OK, I tried make, but the makefile doesn't support Visual Studio (only on
> Windows Phone, not on Windows 7). So I guess I'll have to start over on a
> Linux box, because a mingw build will most certainly be incompatible with the
> maven-compiled stuff, which used Visual Studio.

There are ways to use GCC with the nar-maven-plugin. The ImageJ launcher
uses that method for a long time already, so I am certain that it works.

> And anyway, mingw64 isn't supported either, only mingw32. cmake is not
> that bad, after all...

Again, I did not have problems with ming64 with nar-maven-plugin. But
maybe you are referring to Avian?

And why are you trying to get things to work on the platform that is
notorious for being the most difficult to develop platform-independently
for? Is Windows not something that we should try to support *after*
everything else works instead of *before*? If you want to have a realistic
chance to get things going, always try Linux first. It is *the*
best-supported platform for cross-platform development. I know, I am
writing this on a Mac, but even on a Mac you can install Linux in a
VirtualBox, so there is really no excuse for making this harder to get
going than necessary.

Sorry if this sounds harsh, but I am trying to get the VIGRA/ImgLib2
bridge going, not the *Windows* VIGRA/ImgLib2 bridge. Of course, my
extensive knowledge with cross-platform development will be helpful to
resolve that problem, too, but should we not rather try to solve the
current problems first before we tackle the problem called Windows? I
mean, I am happy to help you with that, sure, but I would really like to
get at the meat of the current problem first, and solve it, so that that
is said and done.

> > > >     'wip' of https://github.com/dscho/vigra-imglib2
> > >
> > > 'mvn install' stops with
> > >
> > > [ERROR] Error: Class net.imglib2.Interval could not be found.
> >
> > That is funny. It works here without a hitch, but maybe only because I
> > had cloned and "mvn install"ed https://github.com/imagej/imglib
> > earlier. Will investigate.
> >
> When Tobias tried his code on my machine, we had a similar problem.

As I said, Windows is notorious for being hard to compile
platform-independent code on. It is not only the insistence on a
non-standard C++ ABI (you cannot mix and match Visual C++-compiled code
with GNU C++-compiled code because GNU C++ *adheres* to the standard while
Visual C++ does not). It is also the chronical problems with a lack of
standardized installation paths for headers and libraries, the lack of
speed with its filesystem drivers (and as a consequence insane runtimes of
compilation and Git operations compared to every other operating system).
And of course it is the complete and utter lack of POSIX routines,
something industry outside Microsoft's area of influence settled on a long
time ago.

So maybe it would really be a good idea to follow my suggestion and tackle
the real problems first, and only then the WIndows-specific ones?

> We solved it by adding some paths explicitly
> (vigra-imglib2/target/classes and
> $HOME/.m2/repository/net/imglib2/imglib2/2.0.0-SNAPSHOT/imglib2-2.0.0-SNAPSHOT.jar).

Oh, I misunderstood  what you meant by "similar problem" above, then.

> I applied the same change to your pom file, and got a bit further. The
> error message is now
> [ERROR] Error: Could not find class file for
> 'net.imglib2.vigra.VigraImg3DUnsignedByte'.

Yes, there is another thing I completely forgot to mention: in
vigra-imglib2, I ran "mvn dependency:copy-dependencies" a long time ago
(back when I mentioned to Tobias that I was working on this),
so long ago that I forgot in the meantime. Very sorry for this!

> > > BTW, Tobias' VIGRA bindings work on my machine (Windows 7 with
> > > Visual Sudio 2012).
> >
> > Okay. I fear that he duplicated a large part of my work to get there, but
> > then, I cannot look at it anyway
> >
> No, there is no duplication. The two approaches are completely complementary
> -- yours is for embedding Java in a VIGRA program, and Tobias' is to call
> VIGRA code from Java. You can have a look at
>   https://github.com/tpietzsch/vigra-imglib2/tree/buffer

Thank you for sharing that information with me.


More information about the ImageJ-devel mailing list