Commit 954e38e3 authored by Kim Nguyễn's avatar Kim Nguyễn
Browse files

Clean-up the root directory.

parent 02f356b1
<box title="Rpm packages" link="rpm">
In order to install the cduce rpm packages you will need to install
the following packages
ocaml >= 3.06
findlib >= 0.8
pcre-ocaml>= 4.22
ocamlnet >= 0.96
pxp >= 1.1.93
expat >= 1.95.6 (just for the expat package)
<p> All these packages can be found in the Altlinux distribution: for Asia
<a href="">i586</a>,
<a href="">src</a>; European mirror <a href="">i586</a>, <a href="">src</a>
<p>N.B. rpm will check that you installed all these packages. If you have them installed but not via rpm then install CDuce by <code>rpm -Uvh --nodeps cduce-X.X.X-X.rpm</code>
Installation Notes for Windows XP/MinGW
It is possible to compile CDuce under cygwin with the MinGW toolchain.
Currently, the resulting executable still depends on the cygwin1.dll.
The suspect is pcre, but the source of the "pollution" has not been
The dependencies can be checked with the "cygcheck" command under
cygwin. Note that cygcheck searches in the PATH, i.e., if a binary is
not in the path, one must give the full path. To check a binary in
the mingw directory (e.g., C:\ocamlmgw\bin\cduce), one must give the
Mingw path (C:/ocamlmgw/bin/cduce) to cygcheck, not the cygwin path
When compiling under the MinGW toolchain, the option -mno-cygwin must
always be passed to the C compiler and linker. It is also necessary
to ensure that one is not linking against any cygwin libraries at any
point. The MinGW libraries are located in /usr/lib/...
1) In Cygwin, add the packages for MinGW support to the ones already
mentioned in INSTALL.WIN32.
<maybe more, which may be the cause of our problem?>
Remove the prce packages from Cygwin, to make sure that the pcre
used is the one installed under Mingw.
2) Install tcl/tk in Windows
Install Tcl/Tk in a windows top directory, eg, C:\Tcl
binaries available as described in ocaml notes (README.win32).
Build ocaml 3.10 for the mingw toolchain as specified in README.win32,
but with the following addition from the ocaml mailing list:
From: Arnold Guillaumot <arnold.guillaumot <at>>
Subject: Re: Compiling with Cygwin/MinGW
Newsgroups: gmane.comp.lang.ocaml.lib.gtk
Date: 2007-09-05 18:55:39 GMT
I succeeded in the past to build ocaml and lablgtk with MinGW/MSYS
(without Cygwin), together with ocamlmklib.
In the ocaml tree, change the following files:
1) ocamlmklib
The 'trick' is to copy the Makefile part of ocamlmklib in the Makefile.nt
edit tools/Makefile.nt and change the Line 26
all: ocamldep ocamlprof ocamlcp.exe ocamlmktop.exe primreq
all: ocamldep ocamlprof ocamlcp.exe ocamlmktop.exe primreq
append the following lines after the ocamlmktop part:
# To help building mixed-mode libraries (Caml + C)
ocamlmklib.exe: myocamlbuild_config.cmo ocamlmklib.cmo
$(CAMLC) $(LINKFLAGS) -o ocamlmklib.exe myocamlbuild_config.cmo
ocamlmklib.cmo: myocamlbuild_config.cmi ../config/Makefile
cp ../ .
cp ocamlmklib.exe $(BINDIR)/ocamlmklib.exe
rm -f ocamlmklib.exe ocamlmklib.mlp ../config/Makefile
echo '(* THIS FILE IS GENERATED FROM ocamlmklib.mlp *)' >
sed -e "s|%%BINDIR%%|$(BINDIR)|" \
-e "s|%%RANLIB%%|$(RANLIB)|" \
ocamlmklib.mlp >>
rm -f
It seems that this is not in the ocaml distribution because it doesn't
work under MSVS, only under MinGW, and since there is only one
adjust PATH:
4) findlib
Patch configure replacing
stdlib = `get_stdlib`
stdlib = /cygdrive/c/ocamlmgw/lib
./configure -bindir /cygdrive/c/ocamlmgw/bin
Patch Makefile.config replacing
OCAML_CORE_MAN = /usr/local/man
OCAML_CORE_MAN = /cygdrive/c/ocamlmgw/man
(since ocaml for mingw does not install the man directories, the
mandir option does not work).
make all
make opt
make install
5) ulex
This gets stuck with the error "can't found ocamlbuildlib.cma in
ocamlbuild -where", which is not surprising, since ocamlbuild -where
returns /ocamlbuildlib/lib, which doesn't exist. See ocaml bug 4379.
This is supposedly fixed in ocaml 3.10.1, but it still doesn't seem to
Until this bug is fixed, patch Makefile to use
ocamlbuild -install-lib-dir "C:\ocamlmgw\lib\ocamlbuild"
(or whereever your mingw installation is). This workaround is
suitable for cygwin, but it may not work in Mingw/MSYS.
Remember to also add -classic-display to ocamlbuild, since we are
building with ocaml 3.10.
make all
make all.opt
make install
6) PCRE:
Since the pcre that comes with cygwin cannot be used in mingw, install
pcre before pcre-ocaml. This is simpler if pcre is not installed in
Go back to cygwin's setup.exe and install gcc-g++ (C++ compiler).
Download pcre-7.2 from or
To configure pcre-7.2:
If pcre is installed in cygwin, patch so that need_relink is
always "no", that may avoid the cygwin dependency.
./configure --prefix="C:/ocamlmgw" --exec-prefix="C:/ocamlmgw" --includedir=/usr/include/mingw --disable-cpp --enable-utf8 CFLAGS="-mno-cygwin -I /usr/include/w32api -I /usr/include/mingw"
Patch the Makefile to replace cygwin with mingw everywhere it occurs
(except in -mno-cygwin).
Patch the libtool file similarly.
make install
This installs the libs in the ocaml mingw directory
(e.g. C:\ocamlmgw\lib, but the .h files in /usr/include/mingw. This
should be suitable for continued compilation using the mingw
toolchain, but not for a pure mingw compilation.
Check with cygcheck whether, eg, pcregrep.exe, depends on the
cygwin1.dll and cygpcre-0.dll.
7) pcre-ocaml:
Edit Makefile.conf to contain
export STATIC = yes
export INCDIRS := /usr/include/mingw
export LIBDIRS := C:/ocamlmgw/lib
export GCC
export MINGW
(If cc is not set, it defaults to cc, which causes 'make' to fail
spectacularly during
ocamlc -c -cc "cc" -ccopt "-fPIC -O2 -DPIC -mno-cygwin -I /usr/include/mingw -o pcre_stubs.o" pcre_stubs.c
sometimes even to the point of crashing cygwin.)
make install
The file pcre_make.win32/Makefile.mingw does not seem to work, either
it is for Mingw/MSYS or it has not been updated.
The file README.win32 concerns MS Visual Studio, i.e., it is
To check that pcre actually works in ocaml:
make a file that uses Pcre, eg
open Prce;;
compile it with
ocamlc -I "C:/ocamlmgw/lib/site-lib/pcre"
8) pxp
./configure -without-wlex -without-wlex-compat -lexlist utf8,iso88591 -without-pp
make all
make opt
make install
9) CDuce
./configure --prefix="C:/ocamlmgw" --mliface="C:/cygwin/usr/src/ocaml-3.10.0/"
patch Makefile.conf to set FORPACK=true
(For some reason that fails in
Patch Makefile.distrib to set
LINK = $(CAMLOPT) -custom -linkpkg
in line 71 to statically link the library.
make all
make install
To make the windows installer
To use the script, you need the Inno setup tool, which is available
You should get the basic package (Stable Release) and the QuickStart
Pack. To install, you first run the Inno installer (isetup-5.2.2.exe
or later) and then the QuickStart Pack installer (ispack-5.2.2.exe or
The installer script uses the files
CDuce inno setup script 1.iss
You can either double-click on the setup script
"CDuce inno setup script 1.iss"
(which is located in the win32 directory) to launch Inno or launch
Inno tool first and then open the script with File->Open.
If the other files are placed correctly, you generate "CDuce
setup.exe" by selecting Project->Compile Setup or by pressing Ctrl+F9.
The installer is called CDuce setup.exe and is placed in the folder
If you want to use different files (e.g., change the icons) or if you
have moved a file, you can either edit the setup script or use the
Inno menus.
The text presented during installation is selected in
Project->Setup Options->Application.
The installer icon and the background image are selected in
Project->Setup Options->Appearance.
Note that the files are found using relative paths, so if your cduce
is not located in /usr/src/cduce/cduce/trunk, Inno might have trouble
finding some of them, in particular the cygwin dll.
The script contains all the information, the stuff in all the other
sections, Icons, Registry, etc, just get converted to text in the
One adds stuff to the sections by right-clicking.
The stuff concerning the icons shown on files with specific suffixes
and which application is launched when one double-clicks a file with a
certain suffix is in the Registry section.
It might be a good idea to exit cygwin before running the installer.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment