[IPOL discuss] IPOL on windows

Nicolas Limare nicolas.limare at cmla.ens-cachan.fr
Sun Oct 2 19:24:19 CEST 2011


Hi,

> As we have not decided anything, I guess our idea is still supporting
> the three main platforms right. My guess is that problems with windows
> are just a matter of insufficient testing rather that a decision.
> 
> If that is the case, we will put some work on testing some of the
> algorithms and document the outcome in the wiki. At the moment, one of
> the authors (Alvaro Pardo) has posted some information in his wiki:
> http://die.ucu.edu.uy/users/apardo/wiki/doku.php?id=compiling_ipol_with_visual_studio_2010.
> I've made a page in our wiki to migrate and expand this information:
> http://tools.ipol.im/wiki/author/code/ipol_on_windows/

Well, there is not a single unified policy on how a code published
on IPOL should compile. We only ask thet it is possible to compile it
on the 3 major environments (Win, Linux, Max OSX). For me, it means
that no *code* relies on anything specific to a platform. But this is
about the code, not about the building procedure, and so fare on the
wiki page there are only considerations about:
- how to install libpng and zlib libraries
- how to configure a project in Visual Studio

I think this is more related to "how to compile a program on Windows
with Microsoft tools" than "how to compile IPOL algorithms on
Windows". Or, it is a Windows developer manual, nothing specific to
IPOL.

> At the moment of writing, I guess most of the source codes available
> provide a makefile or just the plain C files. So we either provide
> detailed instructions for each platform or we include a way to compile
> it truly multiplatform.

Per IPOL requirements, each souche code must include a README.txt with
compilation instructions. The referees should check it, and ask for
more details if needed.

> What do you think? If we like the cmake idea, I can ask the members of
> our project to start writing cmake files for the projects they try.
> If not, what else can we do?

I know some use cmake and like it. Some algorithms are published in
IPOL with a cmake configuration, and it is fine for me. But if we
require the authors to use cmake, I, as a developer, will have two
problem:

* I use make to build and to take care of my code. `make beautify`
  fixes the indentation, `make lint` checks the code correctness,
  `make test` performs sont tests on the code results, `make release`
  builds an archive of the code. I could not find how to do it with
  cmake; if it is possible, can someone explain me?
* I think the possibility to select the compiler and compilation
  options at build time is very useful. I use a battery of `make
  CC=icc`, `make CC=suncc`, ... to ensure my code produces the same
  result with all the compilers available. And I can do `make
  CFLAGS=-g LDFLAGS=-lefence` for a debug version, `make OMP=1
  CC=pathcc CFLAGS="-O3 -ffast-math"` for a fast parallel version. How
  can I have the same flexibility with cmake?

[1]http://dev.ipol.im/git/?p=nil/simplest_color_balance.git;a=blob;f=makefile;hb=HEAD

8<----------8<----------8<----------8<----------8<----------8<----------

By the way, a little note about make vs cmake and the recent
discussion about atomic code vs libraries, which, I think, can be
connected to the general debates about C vs C++, console vs GUI, vi+cc
vs IDE, ...

The emperor of Chine once asked his court painter, "What's easy to
paint and what's hard to paint?" and the aswer was "Dogs are
difficult, daemons are easy". Simple, low-key things are hard to get
right but anybody can design a demon. Minimalistic solutions to a
problem are difficult, but adding multiple abstraction layers is
easy.

Actually, I think there is not one *good* solution. It's a matter of
personal taste and technical culture and understanding of the
programming things, these two strategies existed since the cathedral
and the bazaar[3] and I think no one will ever be convinced to change
their programming preferences. And as Pascal Getreuer wrote, everyone
must be allowed to work the way they want.

[2]Alex Kerr, "Dogs and Demons"
[3]Eric S. Raymond, "The Cathedral and the Bazaar"

-- 
Nicolas LIMARE - CMLA - ENS Cachan    http://www.cmla.ens-cachan.fr/~limare/
IPOL - image processing on line                          http://www.ipol.im/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://tools.ipol.im/mailman/archive/discuss/attachments/20111002/f3386c1b/attachment.pgp>


More information about the discuss mailing list