[argyllcms] Building Argyll CMS 1.3.2 from source under Windows 7

  • From: Don Craig <dmc@xxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Wed, 02 Feb 2011 12:01:30 -0800

I'm new to Argyll and wanted to try some things that needed
access to source. Building from source under Windows 7
was a sufficiently annoying process that I'm recording
it here. I think this is right, but no guarantees -
your mileage could easily vary.

1.   Download Argyll_V1.3.2_src.zip from
2.  Download ftjam-2.5.2.zip from
3.   Download ajam-2.5.2.zip from
4.   Download MinGW installer from
5.   Install MinGW by running the installer, I selected:
      C Compiler
      C++ Compiler
      MSYS Basic System
      MinGW Developer Toolkit
      and installed MinGW in C:\mingw
6.   You should now have a link to the MinGW shell under
      Start >  All Programs > MinGW > MinGW Shell
      Right click on MinGW Shell and select Properties.
      Select Advanced under the Shortcut tab.
      Select Run as administrator, then OK and OK.
7.   Run the MinGW shell, and agree to allow this program to make
     changes to this computer.
8.   You're now running a /bin/sh (not bash), and any additional shell
      configuration goes in ~/.profile.
      Using vim (which should have been installed), or any other useful
      text editor create .profile (the l and ll alias is optional):
      vim .profile
      aalias l='ls -FC'
      alias ll='ls -l'
      export MINGW
      <esc> # that is, type escape
      source .profile.
9.   Unzip Argyll_V1.3.2, ftjam-2.5.2, and ajam-2.5.2 into your
      filesystem somewhere.
      (Under MinGW, the C: drive is /c, the D: drive is /d)
      I happened to use 7-Zip, available from
10. cd to the ftjam-2.5.2 source directory
11. Type to the shell prompt:
      export JAM_TOOLSET
      make -f builds/win32-gcc.mk
12. That should build ftjam as jam.exe in ftjam-2.5.2/bin.ntx86
      cp -p bin.ntx86/jam.ext /bin
      to install it in your bin directory.
13. Now it's time to make ajam, go to the ajam-2.5.2 directory
14. Type to the shell prompt
      which should build ajam. {I'm doing this double bootstrap
      since I couldn't get ajam to build without a copy of jam
      already running. ftjam, on the other hand, builds just fine
      from scratch as instructed above.  And don't even think about
      the old jam at perforce.com.}
15. Type to the shell:
      mkdir /usr/local
      mkdir /usr/local/bin
      cp -p bin.ntx86/jam.exe /usr/local/bin
      This gives you both jams if you should need them -
      the MinGW install should have put /usr/local/bin ahead
      of /bin in your shell PATH, so ajam will take precedence.
16.  cd to the Argyll_V1.3.2 directory.
17.  Edit numlib/numsup.c. Add:
      #include <limits.h>
      after line 17.
      {This works, but it might break other build
      environments since limits.h is now required.
      It is required since otherwise PATH_MAX is
18.  Edit spectro/dispwin.c. Delete the static part of the
      forward declaration for int paintColor on line 2525
      and for the actual declaration on line 2766. The
      new versions of those lines become:
2525:     int paintColor(HWND hwnd);        /* Forward declaration */
2766: int paintColor(HWND hwnd) {
      {Having paintColor be static causes the error message:
      "invalid storage class for function 'paintColor'"
      Removing static from the definition makes paintColor
      a global function, but doesn't seem to cause any
      other problems. I had some theories about this being
      related to the ISO C99 deprecation of static functions,
      but there's lots of other static function declarations
      that work just fine. So I dunno...}
19.  Type to the shell
      export JAMBASE
20.  And as far as I know, everything will build. Type
      jam install
      to put all the binaries in Argyll_V1.3.2/bin

It's really, really important to be working with a clean zip archive
extraction.  If you have failed build attempts they will horse things
up in very obscure ways. I ended up deleting the source directories
and re-unzipping in order to make sure I had a clean build environment.

I also tried cygwin instead of MinGW, but it looks too much like Unix,
and the Argyll build ends up not finding libXxf86vm and libXss
which are something from the bowels of the Xorg X-Windows distro.
I have wrestled with X-Windows distributions in the distant past,
and that's not something I wish to attempt again - libXxf86vm and
libXss are not part of the current cygwin, so I abandoned.

Finally, let me thank Graeme Gill for making this massive effort
available to the great unwashed such as myself. I am looking forward
to diving into the code proper.

Don Craig

Other related posts: