Using 'crossroad' to compile Windows versions of G'MIC on Linux

Ahahah. Well that’s a build from scratch (you had no Windows libraries installed before) and we install a whole bunch of dependencies for it (some of them useless, but that’s how package dependency work), up to the lowest software level. You don’t see such install usage on a new Linux build only because most dependencies are already there. :stuck_out_tongue:

I gave another try today, and indeed the gmic_gimp_qt.exe executable is build.
I get a lot of strange warnings at the beginning, things like:

$ make
Scanning dependencies of target gmic_gimp_qt_autogen
[  1%] Automatic MOC for target gmic_gimp_qt
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
I/O error : Permission denied
I/O error : Permission denied
Failed to write XML file; For permission problems, try rerunning as root
AutoMoc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[  1%] Built target gmic_gimp_qt_autogen
[  2%] Automatic RCC for translations.qrc
AutoRcc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
I/O error : Permission denied
I/O error : Permission denied
Failed to write XML file; For permission problems, try rerunning as root
[  3%] Generating ui_dialogsettings.h
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
I/O error : Permission denied
I/O error : Permission denied
Failed to write XML file; For permission problems, try rerunning as root
[  4%] Generating ui_filtersview.h
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[  5%] Generating ui_headlessprogressdialog.h
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[  6%] Generating ui_inoutpanel.h
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[  8%] Generating ui_languageselectionwidget.h
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[  9%] Generating ui_mainwindow.h
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[ 10%] Generating ui_multilinetextparameterwidget.h
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[ 11%] Generating ui_progressinfowidget.h
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[ 12%] Generating ui_progressinfowindow.h
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[ 13%] Generating ui_SearchFieldWidget.h
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[ 15%] Generating ui_zoomlevelselector.h
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[ 16%] Automatic RCC for gmic_qt.qrc
AutoRcc: ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Scanning dependencies of target gmic_gimp_qt
[ 17%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/ClickableLabel.cpp.obj
[ 18%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/Common.cpp.obj
[ 19%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/OverrideCursor.cpp.obj
[ 20%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/DialogSettings.cpp.obj
[ 22%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/FilterParameters/AbstractParameter.cpp.obj
[ 23%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/FilterParameters/BoolParameter.cpp.obj
[ 24%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/FilterParameters/ButtonParameter.cpp.obj
[ 25%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/FilterParameters/ChoiceParameter.cpp.obj
[ 26%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/FilterParameters/ColorParameter.cpp.obj
[ 27%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/FilterParameters/ConstParameter.cpp.obj
[ 29%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/FilterParameters/CustomDoubleSpinBox.cpp.obj
[ 30%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/FilterParameters/FileParameter.cpp.obj
[ 31%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/FilterParameters/FilterParametersWidget.cpp.obj
[ 32%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/FilterParameters/FloatParameter.cpp.obj
[ 33%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/FilterParameters/FolderParameter.cpp.obj
[ 34%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/FilterParameters/IntParameter.cpp.obj
[ 36%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/FilterParameters/LinkParameter.cpp.obj
[ 37%] Building CXX object CMakeFiles/gmic_gimp_qt.dir/src/FilterParameters/MultilineTextParameterWidget.cpp.obj
...

I don’t know why. If you have an idea…

Now, I’ll run my VM and test the executable. More news later :slight_smile:

More news: After having put the .dll files in the right place, the cross-compiled plug-in finally works !
Now, I have two more issues :

  • I’d really like to use the qmake procedure, instead of cmake to compile the plug-in, because this is the way Sébastien compiles it, and I’m sure all optim flags will be set as desired. Also there are possible options to pass to qmake to enable some wip stuffs (e.g. filter translations). Is there a way to deal with qmake inside crossroads ?

  • Similarly, I cannot use cmake inside crossroad to crosscompile the CLI version gmic.exe for Windows, as I get:

CMake 3.14.0 or higher is required.  You are running version 3.13.4

When I try lowering the required version number in the CMakeLists, the compilation fails anyway (which means the required version number is indeed right).
So, I’d prefer to use my own Makefile for compiling gmic.exe. This is the way I’m doing it when I develop, and I’m clearly more familiar with it (and all the options I can set for the compil).
Do you think it’s possible to use the classical Makefile inside crossroad as well ?

Thanks!

Looks like it’s not using the right libraries (it’s a shared object .so not a .dll). I didn’t have these. But really this whole MOC business is new to me. I never developed a software using this process and have no idea even what this does. So I really don’t know if these warnings can be ignored or not.

1 Like

Well, at the end, the plug-in works, so I think they can be safely ignored indeed :slight_smile:

I’m currently trying to update my compilation environment on my VM machine, so at the end, it may happen I won’t finally use crossroads to compile the plug-in. We’ll see.
The fact that the packaging tools are easier to install on Windows, as well as the fact I can test easily on a real Windows environment is something nice.
Thanks for all your help anyway.

1 Like

Not right now as I never looked into how qmake works. But if it’s even just half well-thought, it will have a generic process for cross-compilation then it will be very easy to add support.

As I was saying to someone else on Twitter today: Crossroad is developed on the concept of standard/generic compilation rules (and not per-project recipes like some other tools; that’s how I can use it so easily even on random projects). For instance any meson/autotools/cmake project should be easily cross-compilable by just setting up some common environment or build system variables.

There are actually 2 parts of Crossroad:

  1. It sets up various environment variable and also a few wrappers to common tools (gcc, g++, cpp and pkg-config) which ends up calling the real tools after tweaking a few more variables. Every build system share these variables and tools.

  2. Then there is the build system-specific part, which is mostly “how does the build system discover the tools?” (and sometimes a few more settings). In autotools, it just works with a host/target prefix concept. In meson/cmake, it works with a toolchain file.

Adding a new build system is only about the point 2.
So adding qmake support may just be as simple as adding some CLI options to the qmake call (like in autotools) or adding a small toolchain files (meson, cmake…).
This is assuming there is a standard cross-compilation concept in qmake, as there is in meson, autotools, cmake.

I don’t have too much time to spend on this right now. I would say patches are welcome though. :wink:
Or maybe if some day I am bored, I might get documented a bit about how qmake handles cross-compilation and improve Crossroad. But don’t hold your breath!

  • Similarly, I cannot use cmake inside crossroad to crosscompile the CLI version gmic.exe for Windows, as I get:

Ah well… Crossroad just uses what is available on your native system. If Ubuntu does not even provide a recent CMake, there is not much I can do (my Fedora is nearly 2 versions late and I have CMake 3.17.4. How late is Ubuntu?! 3.13.4 was released 1,5 years ago!). Apart from updating the distribution, or installing CMake independently from the package manager, I can’t really advise you. You set the minimum requirement yourself in your CMakeLists. :stuck_out_tongue:

Do you think it’s possible to use the classical Makefile inside crossroad as well ?

Of course. The point 1. above will still be true while being inside the Crossroad environment. But then you’ll have to do the work yourself to handle the point 2. yourself. Basically you want to build with x86_64-w64-mingw32-gcc | x86_64-w64-mingw32-g++ (use the one inside Crossroad, which is a wrapper which will end up calling the distribution one after updating some environment variables just for the compilation call). And you want to search dependencies with x86_64-w64-mingw32-pkg-config (as you could see, in the patch I contributed yesterday for instance, this is the bug I fixed in gmic-qt CMakeLists which was hardcoding pkg-config instead of using the one auto-detected by CMake) and so on.

Selecting the right compiler, preprocessor or dependency search tool is one of the jobs done by build systems such as autotools, CMake or meson (and likely qmake too). So yeah if you do your own Makefile, it’s still totally possible to use Crossroad (which will still be very helpful because it sets up a lot more behind the scene than just the build system part). Just handle the tool selection appropriately yourself. :slightly_smiling_face:

2 Likes

And this is why I haven’t compiled anything for a decade. Don’t have the time or patience and have a faulty computer. Thanks @David_Tschumperle for supporting Windows. With each new iteration, G’MIC is running better than ever. E.g. my custom guided filters used to take many more minutes to run for a large image.

I cross-compile all the time with qmake through MXE (not Natron, but other projects), so it should work just fine. Have not tried crossroad yet, but will try to dedicate some time this weekend if possible.

One question; Does crossroad only support mingw packages from the distro? I use custom MSYS2 packages for Natron, is it possible to install them, or just zip the MSYS2 folder from Windows and use that on Linux?

@Jehan, I’ve finally succeeded in setting up an up-to-date compilation environment on my Windows VM, with all the latest packages from MSYS2 (particularly the latest compiler gcc version 10), so I think I’ll stick with it for the moment. Having a recent version of the compiler was my major concern.

Right now, I’m building new binary packages for G’MIC 2.9.3_pre for Windows. Hopefully, they will run better than our previous Windows releases :slight_smile:

I used to think that cross-compilation was hard, back 10 years ago. What I realized over the years is that cross-compilation is actually nearly as simple as native compilation. The only annoying part is that the build environment is a bit more messy because you obviously have a mix of native and target tools, libraries and other data. So you indeed have to be a bit more careful on redirecting your build system to the right tool.
But the more I digged in, the more I realized this part could just be automatized, and furthermore even generically since the concepts were the same whatever the project.
All it takes is a project well maintained and using standard tools (often there is just one or two patches to apply to a project build system as the developer didn’t always have genericity in mind when making some custom build rules, but that’s it; then I contribute the patches to the project and done!).

I would have thought so anyway. It’s one of the major build systems, there has to be some genericity built-in. :slightly_smiling_face:
But I am always careful before saying this with certainty as I have the bad experience with scons, which I used years ago (as it was used by at least one software I used to compile, though nowadays, I don’t see it much more fortunately). I realized every feature had to be implemented by a scons-using project, they didn’t try to enforce any kind of “standard rules for scons projects” (and in particular nothing generic for cross-compilation, but not even for native compilation; for instance, if not mistaken, they didn’t even propose a standard prefix syntax, each and every projects had to implement it themselves! :astonished:). So it was impossible to support scons generically in Crossroad. It’s still possible to cross-build scons project, but then you are basically in the same situation as cross-building generic Makefile (without higher-level system such as autotools/cmake) and have to do all the menial work (which crossroad can do for you for meson/autotools/cmake).

No Crossroad supports MSYS2, OpenSUSE and Fedora (30 to 32) repositories. See the crossroad source command inside a Windows Crossroad environment (the command allows you to see possible source and to switch source). Nowadays I mostly use the MSYS2 packages as they provide more software and are often more up-to-date.

And yes, you can fully build all your dependency tree yourself, or just import them manually from some other third-party if you prefer. Just install them inside $CROSSROAD_PREFIX (in the standard FHS structure) so that Crossroad finds them. This is basically what Crossroad itself does when installing dependencies from any of the supported sources.

For information, it is to be noted than normally you should build everything with the same toolchain. In particular, it is advised to build everything with the same compiler (and compiler version). So what we do when we build a software using MSYS2 dependencies while we compile with our distribution cross-compiler is not exactly ideal and link-time failure might happen. Now the DLL format is a bit more robust (according to the same link), and in 8 years of very regular cross-compilation, I had incompatibility issues at link time maybe twice or thrice at most. Anyway using such external source of packages and compiling while not leaving our comfy Linux is such a great convenience that this is absolutely worth it. :slightly_smiling_face:

Ok no problem. What suits you is the best. :slightly_smiling_face:

I use mxe for rawproc, and it Just Works. I stumbled around for a bit with the gcc version (5.5) until I found the plugins for the subsequent versions, and now I’m compiling my Windows targets with gcc 9.3. It also supports the static linking for my critical libs (libraw, lcms2, librtprocess, lensfun, wxWidgets), indeed, my windows executables are entirely static. Some might not think that’s prudent, but I got tired of chasing dependencies I wanted vs the OS.

I went to try crossroad, but I got stymied in the python dependencies. I’m not a python person… :stuck_out_tongue_closed_eyes:

I wen to try dockcross and guess what, their windows containers are based on mxe…

So my rawproc build directories for linux, win64, and win32 (although I’m probably going to dump win32 for 1.0) all sit side-by-side on my Ubuntu box, and are all built for release with a single script. No separate VMs, machines, and even the ./configures only differ with the addition of --host=win_target …

You are quite right. Things are much simpler nowadays. It was a pain a decade ago and worse another decade back. Indeed, I was dealing with non-generic packages that depended on non-generic packages, so I had to stumble through every single bloody step without the assistance of meaningful error outputs. :man_facepalming:

It would be nice to be able to update easily GMIC for Natron. David was kind enough to make a non interactive version of the morph tool on my request a couple weeks ago and I was struggling on how to bring it to Natron wich was my first concern… as we really miss a warp tool in Natron.

I don’t use Natron (never found the time) but I do second @bonalex01’s sentiment. Made similar a request for @Carmelo_DrRaw’s PhotoFlow.

I don’t know how Natron does it. I prefer to be able to update the G’MIC components myself (or via a package manager) and have a setting within Natron (PhotoFlow, etc.) to choose the installation (good when one has multiple versions of G’MIC). Other than that, the host app needs an update button to retrieve the latest filters for that version.

One thing to know is that G’MIC moves fast in terms of versioning and compatibility falls off just as fast. For example, my and @Reptorian’s filters will almost always require the latest 1-4 versions. Say I commit a change to my code today. Likely, you wouldn’t be able to retrieve it if you don’t have the latest G’MIC.

Reading this thread has been very helpful for me, thanks for the incredibly useful tool.

I am now confronted with a relatively obscure issue (w64 with c++17 std::mutex with Debian cross-compiler), is there a place where I could ask about that? I can also hijack this thread, though.