From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p7A8PMNL032502 for ; Wed, 10 Aug 2011 10:25:22 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtkBACpAQk5RZ90vkWdsb2JhbABBp0kUAQEBAQkLCwcUAyKBQAEBAQEDOk8CAQgSBgoUEDIXDgIEARqHZ71OhWdfBJMJkG0 X-IronPort-AV: E=Sophos;i="4.67,349,1309730400"; d="scan'208";a="105133608" Received: from mtaout01-winn.ispmail.ntl.com ([81.103.221.47]) by mail4-smtp-sop.national.inria.fr with ESMTP; 10 Aug 2011 10:25:15 +0200 Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20110810082513.ODNA2720.mtaout01-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com>; Wed, 10 Aug 2011 09:25:13 +0100 Received: from romulus.metastack.com ([81.102.132.77]) by aamtaout04-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20110810082513.BCTX25656.aamtaout04-winn.ispmail.ntl.com@romulus.metastack.com>; Wed, 10 Aug 2011 09:25:13 +0100 Received: from remus.metastack.local ([172.16.0.1]) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id p7A8P9Id009802 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 10 Aug 2011 09:25:09 +0100 Received: from Remus.metastack.local ([fe80::547c:3c42:e1da:eda2]) by Remus.metastack.local ([fe80::547c:3c42:e1da:eda2%10]) with mapi id 14.01.0289.001; Wed, 10 Aug 2011 09:25:07 +0100 From: David Allsopp To: "matthieu.dubuget@gmail.com" , Caml Mailing List Thread-Topic: [Caml-list] Trying to setup mingw OCaml 3.12.1 + fresh cygwin Thread-Index: AQHMVdh9l+REd+3Mk0q3skpGAgPVZ5UVuYkA Date: Wed, 10 Aug 2011 08:25:02 +0000 Message-ID: References: <4E3FF432.3000705@gmail.com> In-Reply-To: <4E3FF432.3000705@gmail.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.0.7] Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 81.102.132.77 X-Cloudmark-Analysis: v=1.1 cv=JvdXmxIgLJv2/GthKqHpGJEEHukvLcvELVXUanXFreg= c=1 sm=0 a=40hZHaDki8MA:10 a=qaT99oF4BSAA:10 a=cTs9vV391PwA:10 a=kj9zAlcOel0A:10 a=xqWC_Br6kY4A:10 a=nwNgbNS1hvWGeE6I9nEA:9 a=W7xSj3hQBd2t5xDYtCkA:7 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p7A8PMNL032502 Subject: RE: [Caml-list] Trying to setup mingw OCaml 3.12.1 + fresh cygwin Matthieu Dubuget wrote: > Hello, > > I'm trying to setup a system to test it on my code base. > > Currently, I have installed > - cygwin + mingw64-i686-gcc-core > - a patched flexdll (basically: makes use of i686-w64-mingw32-gcc instead > of gcc -mno-cygwin) > - compiled and installed ocaml > > $ ocamlc -config > > version: 3.12.1 > > standard_library_default: C:/cygwin/home/matt/ocamlmgw/lib > > standard_library: C:/cygwin/home/matt/ocamlmgw/lib > > standard_runtime: ocamlrun > > ccomp_type: cc > > bytecomp_c_compiler: i686-w64-mingw32-gcc -O -mms-bitfields -Wall > > -Wno-unused > > bytecomp_c_libraries: -lws2_32 > > native_c_compiler: i686-w64-mingw32-gcc -O -mms-bitfields -Wall > > -Wno-unused > > native_c_libraries: -lws2_32 > > native_pack_linker: i686-w64-mingw32-ld -r -o > > ranlib: i686-w64-mingw32-ranlib > > cc_profile: > > architecture: i386 > > model: default > > system: mingw > > asm: i686-w64-mingw32-as > > ext_obj: .o > > ext_asm: .s > > ext_lib: .a > > ext_dll: .dll > > os_type: Win32 > > default_executable_name: camlprog.exe > > systhread_supported: true Good to know that 64-bit MinGW is working - that said, I thought the MinGW port was broken in 3.12.1 or is that not affected with the 64-bit compiler? Could you share details on how you configured OCaml? > - compiled and installed findlib, menhir, ounit, ocamlcsv, frontc, > xmllight, camomile, batteries > > I have a problem with camlzip. In fact, the problem is not really ocaml- > related... I do not know how to compile zlib with mingw64-i686-gcc, and use > it to compile camlzip? I use the following two commands to compile zlib 1.2.5 (with shared lib support) with normal 32-bit mingw: sed -i -e "s/MODE=0/MODE=1/" -e "s/)gcc/\0 -mno-cygwin/" win32/Makefile.gcc make BINARY_PATH=C:/Dev/OCaml/bin LIBRARY_PATH=C:/Dev/OCaml/lib INCLUDE_PATH=C:/Dev/OCaml/lib -f win32/Makefile.gcc all install Presumably a few tweaks at the top of Makefile.gcc should allow you to compile a 64-bit version? For camlzip 1.04 I add the following META file (borrowed from BSD ports, IIRC): --- name="zip" version="1.04" description="reading and writing ZIP, JAR and GZIP files" requires="unix" archive(byte)="zip.cma" archive(native)="zip.cmxa" linkopts = "" --- You need to edit its Makefile - change ZLIB_LIB to -lzdll if you want to link against zlib1.dll (-lz will give you static linking). You need to change ZLIB_LIBDIR to be where you installed your custom zlib or the resulting binary will be linked against Cygwin's zlib (for me that's C:/Dev/OCaml/lib, therefore). I then build with make all allopt and install with ocamlfind install camlzip *.dll *.a zip.{cmxa,cm[aix],mli} {zlib,gzip}.{cm[ix],mli} META The examples work and definitely don't depend on cygz.dll HTH, David