From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.2 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id A92C2BC6B for ; Sun, 6 Jan 2008 16:14:52 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAH5/gEfRVca5kmdsb2JhbACQGwEBAQEHAgYpkiqEZQ X-IronPort-AV: E=Sophos;i="4.24,250,1196636400"; d="scan'208";a="20943460" Received: from rv-out-0910.google.com ([209.85.198.185]) by mail4-smtp-sop.national.inria.fr with ESMTP; 06 Jan 2008 16:14:50 +0100 Received: by rv-out-0910.google.com with SMTP id k20so5531918rvb.3 for ; Sun, 06 Jan 2008 07:14:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=/rZ3j9jxecjp4L2yfqGEUazfEYPbpcRCRdi9B8MMt2c=; b=Oac8+5HSWJU1sJgz2Ww1XYeSd0OBAxab8U8sl7K/mS0F+xCWh/oGhaIIKqN7w8lWc+RqJrAh7UtncdE5qh0DdgBuONyYkKRK7JGBbJcRQWaWaPA1PGdw1zIggTuU3BH+vvbkRGJWxSbJXzE8SfP+rVgCxnD2tn4zwyfT5J1joAo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NT5Zy6kfZsMs3z5ogbV2WZwuBuHTOwg+PACX1ful1v73sD6K4dzfMENXxq87o/B/qJGN5yx9c6B/w2aVqDFVrbJ1tJE4M3qxmRidt8H63ZO5J8lZqAaCuoArb/EIHU/1GvwkY7asxRxn+bBqCm3gJWA/CVqkCThJFZsfEnseFKI= Received: by 10.141.2.19 with SMTP id e19mr982359rvi.221.1199632484023; Sun, 06 Jan 2008 07:14:44 -0800 (PST) Received: by 10.140.134.3 with HTTP; Sun, 6 Jan 2008 07:14:43 -0800 (PST) Message-ID: <666572260801060714i1c6251a1r7e540f19dcb8e151@mail.gmail.com> Date: Sun, 6 Jan 2008 16:14:43 +0100 From: Adrien To: "Kuba Ober" Subject: Re : Re : Re: [Caml-list] Re: MinGW port w/o Cygwin? Cc: caml-list@yquem.inria.fr In-Reply-To: <200712261254.44486.ober.14@osu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200712200930.29585.ober.14@osu.edu> <476E7CA1.6000501@dravanet.hu> <666572260712230833j79ea3f41vc3649b6b3e17940f@mail.gmail.com> <200712261254.44486.ober.14@osu.edu> X-Spam: no; 0.00; mingw:01 cygwin:01 ocaml:01 cygwin:01 mingw:01 ocaml:01 compiler:01 compiler:01 lacks:01 flags:01 iirc:01 separators:01 iirc:01 flags:01 makefile:01 2007/12/26, Kuba Ober : > On Sunday 23 December 2007, Adrien wrote: > > 2007/12/20, Kuba Ober : > > > I guess that Ocaml maintainers should just drop that Cygwin requirement, > > > and tweak their build process to work "out of the box" with MSYS/MinGW. > > > > You shouldn't see cygwin as a _requirement_. > > Ocaml installation from source (let the binary distributions be a > > special case) use C. If there is no c compiler installed as it is > > under all windows installations (I mean right after setup is > > completed) ocaml simply can't be installed ; the problem is not with > > ocaml or cygwin but with windows. Cygwin is not a fancy requirement > > just one of the few ways to get a c compiler under windows. > > > > Also mingw without cygwin still lacks a lot of things. Capabilities > > are there but it seems header files have not been updated in ages and > > linker flags need to be different (you will often need -lws2_32 for > > many C apps especially). > > THe right way is to update mingw headers, submit to the maintainers, and go > from there. That's the OSS way. I know, I only lack of time to do this properly and I've been astonished to see some headers were older than Internet Explorer 5.5 (or even 5) ! It seemed to be the dev just didn't feel like updating the headers so it would take me some time to convince them with a nice and polished patch. > > Anyway, the result is a big headache for the developper. I perfectly > > understand the ocaml team is not willing to make a complete mingw/msys > > port ; it's such a mess. > > It's the only sane way to go. THere's no technical reason to require a unix > environment to build ocaml. Big applications build on Windows just fine... Ocaml doesn't rely on an unix environment. It makes use of it when available though. How could you run a configure script on windows without msys|mingw|cygwin ? [btw the result is incorrect on msys/mingw so don't use] The only solutions are else proprietary non-microsoft shells running only under windows with specific scripting languages or a proprietary microsoft shell running only under windows with a specific scripting language. If you consider python (or perl iirc, or even tcl/tk), the same rule apply and compiling from source under windows is not advised. OCaml on the other hand 1-works and 2-works even on unsupported toolchains. I too would love something better but I think we can't really complain. > > So there would be msvc, cygwin, cygwin/mingw, msys/mingw with > > different configuration files for each. While such a port would be > > easy to create it wouldn't be wise to create it imho ; it wouldn't > > help maintaining and would create bugs along with more work for the > > ocaml team. > Supporting Cygwin at all is a waste IMHO. Either you run Unix or Windows, > choose one and stick with it... > Cygwin works and is commercially supported. Porting efforts are also less important than for msys ; I would say porting from unix to cygwin is easier than porting from cygwin to windows. > > And then one could add a SFU port (Services For Unix) which lets you > > compile ocaml without problem except that it works so well ocaml > > thinks it is running under unix and uses forward-slashes as path > > separators. (everything that ./configure can enable is enabled) > > IIRC Windows accepts forward slashes everywhere just fine. I just checked and that's true. The problem was maybe with "/c/" (mingw) or "/dev/fs/C:/" (sfu) instead of windows's "c:". I'll have to check. > > compile with mingw just to remember last time I tried I spent two > > hours. I then used sfu, cd'ed in the source directory, ./configure, > > make, strip and within 90 seconds my rsync build was ready to > > download. SFU is free though not free as in free speech, but when > > you've spent hours on msys/mingw, you can accept anything and be > > really happy with it. *) > > Well, all it means is that Ocaml wasn't designed to build on Windows, that's > it. MSYS provides what reasonably can be provided without a Unix emulation > layer. THe fact that Oaml uses a Unix-centric build system and whatnot makes > things the way they are. The windows build could dispense with configure and > whatnot. MSYS is far from providing anything sufficient. SFU is not an emulation layer either : in my rsync example, I then ran my executable outside of sfu. I think the executables are native to windows. As I've said, msys has incredibly outdated headers : in one header, it defined internet explorer version as 3... (hint, if you need a header for msys, use those from wine). That's where the problem lies. I've already worked on updated headers and compiler flags for cygwin. You can get pthreads, dirent and tons of other things just by updating a few text files. MSYS won't be a proper platform if this is not done and wine has already done half the work. About the windows build, it is already avoiding configure scripts but then the options are determined by the lowest common factor because since most of the required tools are not provided by windows (cc, headers), you can't be sure about what is available. But then the ocaml Makefile.nt files are already doing this. Related is question 10 on this page : http://www.interopsystems.com/SurveyResults.htm (yes, nearly 87%) --- Adrien Nader