Building rawproc

I’ve been hacking on rawproc for almost two years now, and probably the most head-hurting part of it has been making a coherent build system. For long time, I just used a hack Makefile that loaded a per-architecture localmake.txt in a subdirectory, and I’d be using that still if it weren’t for a certain stubbornness on my part with software things I don’t understand. Goes with my need to organize shelf contents, I guess.

Anyhow, my goal was to move to the GNU autoconf tools (Okay, CMake folks, let me recover from this first), AND be able to do the whole thing on both Linux and Windows boxes. Windows proved to be the challenge; I’ve long been building to Windows 32- and 64-bit installers on Linux with mingw-w64, a really nice capability, but native MinGW with MSYS on Windows 7/10 proved vexing until last night, when I finally got a clean build totally with the MSYS shell. It still took a bit of munging of wxWidgets, but even that isn’t too terrible now.

The fruit of my efforts is at Building rawproc · butcherg/rawproc Wiki · GitHub. It may yet be a bit obtuse, but the essence is there for someone with a bit of MinGW experience to follow. Even if you don’t want to compile rawproc, the process is illustrative of the sort of challenges you run into on Windows MinGW. Oh, and the Linux process is also there; yet to be described is the cross-compile process, but I’ll try to do that soon.

FWIW (been saying that a lot, lately… )

@ggbutcher
Why don’t you use MSYS2. All your dependencies seem already available.
It can be installed using instructions from MSYS2 website

then you have to install required packages and dependencies with pacman. An example of MSYS2 installation here

1 Like

Yep, got everything but wxWidgets 3.1, has 3.0.2.

I remember trying it about a year ago, but I had problems with pacman on my work computer. Looks like it’s time to re-investigate…

Just finished a successful build with MSYS2. It wasn’t as straightforward as one would hope

  • MSYS2 Libraw wanted libjasper, but it wouldn’t link with the installed library.
  • MSYS2 wxWidgets wx-config didn’t deliver all the -llibs needed.

So, I compiled Libraw and wxWidgets and all was good. In fact, the gcc 7.2 in MSYS2 was able to compile the wxWidgets-3.1.0 release source tree without modification; the bug discussed in the build page was actually in an earlier mingw version, wxWidgets accommodated it in the github tree, and MinGW eventually fixed it. Also, MSYS2 allowed me to compile to a 64-bit executable, which previously I’d only been able to do in LInux with the cross-compiler

MSYS2 required a lot of subsequent tool installation, to include the compiler, that took a lot of time as I discovered missing tools.

In conclusion, I’m going to keep the MSYS2 build for development. I’ll update the build instructions later. Thanks @gaaned92

3 Likes

Happy you succeeded.
Sometime ago, I tried to compile Libraw but was unsuccessfull (I don’t remember why). Waiting for your build instructions to learn how to do.

For Libraw, here’s my non-crosscompiled configure:

../configure --enable-openmp --enable-lcms --disable-examples \
--disable-jpeg --disable-jasper --disable-shared

I just started turning things off until it compiled. The big two were --disable-examples (not sure what’s going on there) and --disable-shared (I like to statically link things like Libraw, for distribution)

My only remaining vexation with Libraw is getting it to link lcms in MinGW/Windows. I think I’m missing something that has to be installed, some libtool M4 thing or somesuch. Works fine in the Linux->Windows cross-compile.

Using mingw-w64 in Ubuntu to build my Windows .exe and installers works a whole lot better than compiling natively. I just try it because it bothers me not to be able to do it… :smiley:

I just updated the “Building rawproc” wiki page at GitHub with both words about MSYS2 and Linux crosscompiling to Win32.

1 Like