From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ulrich Klauer Newsgroups: gmane.comp.audio.sox.devel Subject: Building a Windows binary Date: Fri, 08 Mar 2013 17:40:37 +0100 Message-ID: <20130308174037.Horde.iDMiP1NNcXdROhSFCvQ2uZA@webmail.df.eu> Reply-To: sox-devel@lists.sourceforge.net NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1362760850 7577 80.91.229.3 (8 Mar 2013 16:40:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Mar 2013 16:40:50 +0000 (UTC) To: sox-devel@lists.sourceforge.net Original-X-From: sox-devel-bounces@lists.sourceforge.net Fri Mar 08 17:41:12 2013 Return-path: Envelope-to: gcasd-sox-devel@m.gmane.org Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of chirlu.de designates 80.67.31.36 as permitted sender) client-ip=80.67.31.36; envelope-from=ulrich@chirlu.de; helo=smtprelay02.ispgateway.de; User-Agent: Internet Messaging Program (IMP) H4 (5.0.19) Content-Disposition: inline X-Df-Sender: dWtsYXVlckBjaGlybHUuZGU= X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.67.31.36 listed in list.dnswl.org] -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1UE0Lb-0008CK-8X X-BeenThere: sox-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: sox-devel-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.comp.audio.sox.devel:270 Archived-At: Received: from lists.sourceforge.net ([216.34.181.88]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UE0M3-0006te-Aj for gcasd-sox-devel@m.gmane.org; Fri, 08 Mar 2013 17:41:11 +0100 Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1UE0Lg-0007aF-Gt; Fri, 08 Mar 2013 16:40:48 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1UE0Le-0007a7-KQ for sox-devel@lists.sourceforge.net; Fri, 08 Mar 2013 16:40:46 +0000 Received: from smtprelay02.ispgateway.de ([80.67.31.36]) by sog-mx-4.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1UE0Lb-0008CK-8X for sox-devel@lists.sourceforge.net; Fri, 08 Mar 2013 16:40:46 +0000 Received: from [80.67.16.115] (helo=webmailfront01.ispgateway.de) by smtprelay02.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1UE0LV-0003ys-2Z; Fri, 08 Mar 2013 17:40:37 +0100 Received: from 77-21-78-174-dynip.superkabel.de (77-21-78-174-dynip.superkabel.de [77.21.78.174]) by webmail.df.eu (Horde Framework) with HTTP; Fri, 08 Mar 2013 17:40:37 +0100 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