sox-devel@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* Building a Windows binary
@ 2013-03-08 16:40 Ulrich Klauer
  2013-03-09 17:55 ` Chris Bagwell
  0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Klauer @ 2013-03-08 16:40 UTC (permalink / raw)
  To: sox-devel

Hi,
recently, I've done some research and experimenting on how to build  
SoX binaries for Windows, and I've come to think that the best tool is  
MXE (M Cross Environment, http://mxe.cc/). Essentially, it is a  
collection of patches and build scripts with some makefile glue, made  
exactly for our purposes; i.e., cross-building libraries to link  
statically into Windows executables, all done on a Unix system.

You say, e.g., "make libsndfile", and it will automatically fetch the  
source for libsndfile as well as libflac, libogg etc. from the  
official download sites, apply any necessary patches (like one that  
adds the missing -lwsock32 to flac.pc), and build the libraries. Set  
PATH to include the provided cross-building tools (gcc is also built  
directly from source), then in the SoX directory, call configure with  
"--host=i686-pc-mingw32", and you are ready to build.

MXE already includes a very extensive set of libraries, almost  
everything we need, like magic, flac, png, sndfile, lame, gomp, ltdl  
... with their dependencies. Actually, there were only three missing  
(id3tag, twolame, wavpack), and of those, I already added twolame and  
wavpack (accepted in MXE upstream). To add id3tag should be no problem  
either.

The main advantage is that we can get up-to-date libraries, built in a  
reproduceable way, without the need to do manual tweaking on our side  
in most cases.

I made some test builds and mentioned them in an inconspicuous place  
on sox-users, so they have had a little bit of testing on Wine and on  
"real" Windows. They seem to be working OK.


Thus, my proposal is to use MXE for building a new 14.4.1 (or  
14.4.1.1, or 14.4.1a) Windows binary that includes flac and sndfile  
support; and probably for later releases as well. I could turn  
mingwbuild into an mxebuild that automates the build process (for MXE,  
then for SoX using MXE). I guess I could also build the whole Windows  
package myself, if necessary/preferred by Chris.

Ulrich


------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Building a Windows binary
  2013-03-08 16:40 Building a Windows binary Ulrich Klauer
@ 2013-03-09 17:55 ` Chris Bagwell
  2013-03-10  5:57   ` Ulrich Klauer
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Bagwell @ 2013-03-09 17:55 UTC (permalink / raw)
  To: sox-devel


[-- Attachment #1.1: Type: text/plain, Size: 1031 bytes --]

On Fri, Mar 8, 2013 at 10:40 AM, Ulrich Klauer <ulrich@chirlu.de> wrote:

>
>
> Thus, my proposal is to use MXE for building a new 14.4.1 (or
> 14.4.1.1, or 14.4.1a) Windows binary that includes flac and sndfile
> support; and probably for later releases as well. I could turn
> mingwbuild into an mxebuild that automates the build process (for MXE,
> then for SoX using MXE). I guess I could also build the whole Windows
> package myself, if necessary/preferred by Chris.
>

I guess the person submitting the most patches should also be calling the
shots. :-)

Sounds promising solution.  I especially like how it downloads everything
so we can move between build computers much faster.

Can you tell MXE to build and prefer static libraries so that we can ship a
minimal of DLL's?  Its not a show stopper if we don't but it does reduce
some run-time issues.

How about do as you suggest and create a mxebuild and we can support them
in parallel for at least a release and if its successful then we can switch
to only way.

Chris

[-- Attachment #1.2: Type: text/html, Size: 1495 bytes --]

[-- Attachment #2: Type: text/plain, Size: 397 bytes --]

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Building a Windows binary
  2013-03-09 17:55 ` Chris Bagwell
@ 2013-03-10  5:57   ` Ulrich Klauer
  0 siblings, 0 replies; 3+ messages in thread
From: Ulrich Klauer @ 2013-03-10  5:57 UTC (permalink / raw)
  To: sox-devel

Chris Bagwell <chris@cnpbagwell.com>:

> Sounds promising solution.  I especially like how it downloads everything
> so we can move between build computers much faster.

Yes, although "fast" is relative; it takes its time to build  
everything from scratch, especially GCC (about twenty minutes for me;  
a faster computer might help). But this can run in the background, of  
course.

> Can you tell MXE to build and prefer static libraries so that we can ship a
> minimal of DLL's?  Its not a show stopper if we don't but it does reduce
> some run-time issues.

Yes, it already builds static-only libraries by default. My test  
builds don't require any DLLs at all (not even zlib), except for those  
that have --enable-dl-XXX for legal reasons. (The newest is at  
http://www.chirlu.de/temp/sox-win32-experimental/, by the way; it is  
from relatively-current git master though, not from 14.4.0.)

I also found out recently that libtool recognizes an option  
"-all-static" when linking executables. It will then statically link  
everything, even indirect dependencies, and even when dynamic  
libraries are also present. I think I will make a configuration option  
for that and remove the workarounds.

Ulrich


------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-10  5:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-08 16:40 Building a Windows binary Ulrich Klauer
2013-03-09 17:55 ` Chris Bagwell
2013-03-10  5:57   ` Ulrich Klauer

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).