Thursday, July 17, 2014

Compile Mksquashfs 4.3 for Windows with Cygwin

Here is a way to compile the squashfs-tools, to produce squashfs from windows.

You must install cygwin with those packages :

  • gcc-core
  • make
  • zlib-devel (which is in the "Libs" section, but not in "devel" section)

Then download squashfs-tools from sourceforge.

Here is the simple procedure :

    tar xvzf squashfs4.3.tar.gz

    cd squashfs4.3/squashfs-tools

    make EXTRA_CFLAGS="-Dlinux -DFNM_EXTMATCH='(1<<5)' -D'sigtimedwait(a,b,c)=sigwaitinfo(a,b)'"
...et voilĂ  !

I did not found any problem, but this trick replaces "sigtimedwait" with "sigwaitinfo". Those two functions does the same except that sigtimedwait has a timeout. So you may expect some lock up, in some conditions.

Happy squashing with that !

1 comment: