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


-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to