Updated compilation environment on Windows.

Here it is : https://gmic.eu/update293.json
This file will be updated every hour, just like the update293.gmic is.

Great, thanks!
Already put it into my new parser and it seems to work!
Not sure if you can answer this, but any reason why the options for a choice parameter are an object instead of a list/array in the JSON output? Seems a bit weird to me to do it like this :
{“0”, “first choice”, “1”, “second choice”, “2”, “third choice”}
instead of this:
[“first choice”, “second choice”, “third choice”]

1 Like

No idea, I don’t really know anything about JSON except how to format it. I don’t use it myself. The output format has been mainly proposed by @myselfhimself, maybe he has an answer for this.

Found one more thing: the parameter type “button” is not correctly exported to the JSON, it gets set as “unknown”.

While we are at it, I think there is a mistake in “template.gmic” in the first example for the “jdoe_about” filter: the last line with the closing curly braces is unnecessary, it does not have a matching opening brace.

1 Like

@Tobias_Fleischer
hello the ids are due to my computer science experience - eg. in html forms where choices are machine-processable keys to be digested by the remote endpoint - and it was my request

they are much easier to track than the values themselves
 by asking for this in the JSON format specification, I also wanted a unique permanent id for each choice string, especially as the choice string are object to change or internationalization
if we were using a list of just values without immutable keys, ids/keys would be there, but implicitly only
 and gmic-community contributors may think that items are flippable, while some programmatic applications may depend on those ids or implicit indexes

json does not allow for non-string dict keys unless I am mistaken, hence the string integer keys

I hope this is clear and makes sense to you
this is really open to change anyways, as few people use the gmic json output for now

Thanks for your reply, @myselfhimself
Well, I was asking because G’MIC relies on the index, not the string itself, so the string contents of the choices array do not matter at all, only the index does, therefore these lists always have an immutable order. But I don’t care much tbh, I now just skip every second entry then when parsing the JSON. :slight_smile:

1 Like

@Tobias_Fleischer the latest compiling setup by @David_Tschumperle for building libgmic is using msys2 
 I am trying to replicate the environment for gmic-py the new Python binding for G’MIC

I am struggling on a build error here, after having forced cimg_OS==2 (ie. Windows) within MSYS:

where it seems that gcc does not look up and use windows-version of stdio.h, process.h etc

If you end up with a satisfactory MSVC setup that I could reproduce in a Github Workflow recipe for a Windows docker host (already packed with Microsoft compiling sdks, envs
)
 I’d be glad to to reuse it
 Here is the recipe I am working on for example

Should be fixed now.

Fixed as well.

never mind, gmic-py now compiles for windows in a msys2 docker
 I will add missing .dll and we should have something portable and released on pypi.org soon


fixed in gmic-py’s build environment too

I have now also set up a new Windows compilation environment with MSYS2/MinGW.
Using the latest 2.9.3pr sources, I get lots of warnings like these when compiling the CLI:

gmic.h:261:8: warning: type ‘struct gmic’ violates the C++ One Definition Rule [-Wodr]
gmic.h:261:8: note: type ‘long long unsigned int’ should match type ‘long long int’
gmic.h:345:9: warning: type of ‘add_commands’ does not match original declaration [-Wlto-type-mismatch]
gmic.h:473:15: note: a field of same name but different type is defined in another translation unit
gmic.cpp:2657:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used

As far as I can see, most of these come from the enabled LTO, right?
The generated CLI file seem to work fine (although unfortunately still rather slow/sluggish on Windows compared to Linux).

I’ll check that, but I didn’t have these warnings last time I’ve set up the MSYS2 compilation environment.

I’ve installed the latest update for all packages with pacman, then compiled G’MIC once again, and I get absolutely no warnings:

with g++ 10.2.0 from MSYS2.

I am also using g++ 10.2.0 with MSYS2, everything up to date.
I just download the source from the G’MIC website, then change into the “src” folder and call “make cli”, just like you did. The only difference is that I also include and link OpenCV, maybe that is causing the warnings. Will test it again later.

Also, a difference is that I’m using the sources from the ‘develop’ branch of the G’MIC repository, so latest source code for 2.9.3.

Wooooow, big news! I updated my free Visual Studio 2019 Community Edition to the latest version 16.8.1, and it seems this one can now compile G’MIC natively, even with OpenMP support and full optimisations! And it only takes a couple of minutes, just like MinGW/g++. And the speed of the resulting binary seems to be even a bit faster than the MinGW build!
Is there a good performance measurement/stress test I can run with G’MIC? Like a command that requires quite a bit of power, but also does parallel processing if available? Then I could directly compare the versions.

1 Like

Good news!
Yes, all commands listed there can be used for performance comparisons :

1 Like

Weird, I get lots of warnings once I try to compile it like you do. Somehow I doubt just the slightly newer source base you are using is the issue here.

would you agree to paste your cl.exe or other compiling/linking commands’ output? (for gmic-py)
I use a very fresh Github docker image using windows 2019 for building, but control it in the blind through a .yml file and python options

Have you used the CMake approch for building or just click-based configuration?

I have no problem sharing any information that might be helpful to you :slight_smile:
But I don’t know what you need exactly. For Visual Studio compiles, I just call msbuild or open the solution with the IDE, then hit “build all”.