[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-datamash] Windows Build Instructions - MinGW x64 or i686

From: Assaf Gordon
Subject: Re: [Bug-datamash] Windows Build Instructions - MinGW x64 or i686
Date: Tue, 2 Aug 2016 23:44:38 -0400


> On Aug 2, 2016, at 18:05, Clifford Sobchuk <address@hidden> wrote:
> Hi, where are the build instructions for Windows using either the MinGW 
> toolchain or Visual Studio. I have tried several times with the latest MinGW 
> on Windows7 enterprise and it fails the configure stage – then once that is 
> fixed it fails multiple places in the make stage. Surely the earlier windows 
> versions used the same build process?
> Thanks, Cliff.

When I build windows binaries, I use a Windows Server 2012 with cygwin version 
2.5.1, with gcc 5.3.0 and/or MinGW-gcc 4.9.2 .
I use the latest official tarball (currently datamash version 1.1.0).

The following commands will demonstrate (these are executed inside the cygwin 
shell terminal window):

    $ uname -a
    CYGWIN_NT-6.2 WIN-9FFSHRJAFVN 2.5.1(0.297/5/3) 2016-04-21 22:14 x86_64 

    $ echo `cmd /c ver`
    Microsoft Windows [Version 6.2.9200]

    $ gcc --version
    gcc (GCC) 5.3.0

    $ x86_64-w64-mingw32-gcc --version
    x86_64-w64-mingw32-gcc (GCC) 4.9.2

    $ i686-w64-mingw32-gcc --version
    i686-w64-mingw32-gcc (GCC) 4.9.2

    $ wget http://ftp.gnu.org/gnu/datamash/datamash-1.1.0.tar.gz
    $ tar -xf datamash-1.1.0.tar.gz
    $ cd datamash-1.1.0

Build for cygwin (will require cygwin's dlls):

    $ ./configure
    $ make

Build native windows exe (64bit):

    $ ./configure --host=x86_64-w64-mingw32 --disable-nls
    $ make

Build native windows exe (32bit):

    $ ./configure --host=i686-w64-mingw32 --disable-nls
    $ make

On a somewhat-related note, it was brought to my attention in a recent thread ( 
http://lists.gnu.org/archive/html/bug-datamash/2016-06/msg00002.html ) that 
datamash's exe files respect the current locale (as they should), but on 
windows it's hard to force a different locale (unlike on unix, where LC_ALL=C 
solves the issue).
As a temporary work-around, I've updated the file 'src/datamash.c" to always 
use simple "C" locale (mainly: use dot character as decimal separator),
by changing line 1069 from:

I will soon fix this issue in the git repository, but at the moment it's done 
manually before building a windows binary.

Hope this helps,
 - assaf

reply via email to

[Prev in Thread] Current Thread [Next in Thread]