smtk2ssrf_test.AppImage: further testing

Anton Lundin glance at
Thu Feb 23 13:59:59 PST 2017

On 23 February, 2017 - Alessandro Volpi wrote:

> Dear Salva,
> I have tried once again to build subsurface and smtk2ssrf from the sources;
> once more I did not succeed in completing the build.
> I tried with Fedora 24, after having installed the hitherto missing package
> libgit2-devel ; the reeason for the failure
> can be found in file build.log :
> In file included from /home/ale/src/subsurface/smtk-import/smartrak.c:32:0:
> ----
> /home/ale/src/subsurface/./core/dive.h:20:0: warning: "MAX" redefined
>  #define MAX(x, y) ({                \
> In file included from /usr/lib64/glib-2.0/include/glibconfig.h:9:0,
>                  from /usr/include/glib-2.0/glib/gtypes.h:32,
>                  from /usr/include/glib-2.0/glib/galloca.h:32,
>                  from /usr/include/glib-2.0/glib.h:30,
>                  from /usr/include/mdbtools.h:33,
>                  from /home/ale/src/subsurface/smtk-import/smartrak.c:28:
> /usr/include/glib-2.0/glib/gmacros.h:288:0: note: this is the location of
> the previous definition
>  #define MAX(a, b)  (((a) > (b)) ? (a) : (b))
> ----
> ----
> "CMakeFiles/smtk2ssrf.dir/build.make:247: recipe for target 'smtk2ssrf'
> failed make[2]: *** [smtk2ssrf] Error 1"
> ----
> BTW I do not understand why the usual MAX(x,y) macro should be redefined ...

There's no such thing as the usual MAX(x,y) macro.

On my laptop I find that exact macro in 8 different header files in
/usr/include , from about as many different libraries, so its just a
matter of time before this kind of things happens.

And another angle of it, those where introduced in 475e058d, because
windows doesn't have those macros.

I'd suggest we throw a #undef before those macros in core/dive.h to get
rid of this sort of nonsens issues, our do as we did before 475e058d,
and use the ones from sys/param.h on non windows platforms, and ifdef
those macros to windows.


Anton Lundin	+46702-161604

More information about the subsurface mailing list