trac tickets and alternative build system

Hauke Heibel hauke.heibel at googlemail.com
Mon Apr 26 11:50:58 EDT 2010


Hi,

I tried to submit a track ticket today though it seems to have failed.
But I can anyways be a little bit more verbose over here.

I am trying to compile OpenSlide with Visual Studio 2010. For that
matter, I forked the git repository and started to create a CMake
configuration. I am not yet quite done but I am sure that it will work
even though I cannot yet compile with the most recent dependencies.

The first question is whether you are even interested in a CMake build
system? I think it makes a lot of sense since only then you will be
able to easily support build targets as e.g. Visual Studio without a
lot of manual modifications CMake is open source and allows you to aim
at a wide range of build targets.

Talking about my recent experiences, I compiled (and downloaded)

jpeg lib (version 7.0 according to jpeglig.h)
tiff lib (versions 42 and 43 for bigtiff according to the tiff.h)
zlib (version 1.2.3 according to zlib.h)
openjpeg (version 1.3.0 according to openjpeg.h)
gtk+ (just downloaded 32bit and 64bit pre-built binaries, version 2.0)

all in 64 bit since I am particularly interested in 64 bit builds.

I've seen on the web that you have a 32bit binary built for Windows
but as I said, I am more interested in a 64bit version.

As mentioned before, I have quite a few issues when trying to build
the library and I am going to name a few of them. Since Windows
binaries are on your road map I hope you are interested in solutions
as much as I am.

1) the git repository is missing config.h.in (though it is present in
the tarball)

2) stdbool.h and inttypes.h are not available under MSVC

I can create the config.h with CMake such that this is reflected
though the defines from config.h are not used in the code. Even when
they are reflected, MSVC is not really C99 compliant when code is
compiled as C code thus I am wondering whether it were possible to
compile the code as C++ code. In that case, those headers just need to
be disabled for MSVC builds.

3) MSVC does make problems with implicit casting.

This can easily be fixed by adding explicit C-style casts like e.g.
(struct my_src_mgr *) and I already did that in my fork at many
places.

4) PRId64 is not defined and I have no idea how to fix it.

5) void __attribute ((constructor)) _openslide_init(void);

The constructor attribute is not supported under MSCV. I temporarily
hacked around it by declaring the function as void
_openslide_init(void);

6) struct _openslide_cache_key key = { .x = x, .y = y, .layer = layer };

is not supported. As a workaround I created the temporary and set the
three values manually. ;)

Ok, I think that's that for a start. I am still wondering how you
compiled your 32 bit binaries under Windows. Did you do it with
Cygwin?

Well, and even though it is not yet running over here thank you for
the great work!

Kind regards,
Hauke


More information about the openslide-users mailing list