caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Eugene Kotlyarov <ekot@narod.ru>
To: brian donovan <lists@lophty.com>, caml-list@inria.fr
Subject: Re: [Caml-list] Building findlib/OCamlfind on Win32 system
Date: Mon, 10 May 2004 15:22:22 +0400	[thread overview]
Message-ID: <409F65EE.6000002@narod.ru> (raw)
In-Reply-To: <409F1A40.8080407@lophty.com>

[-- Attachment #1: Type: text/plain, Size: 793 bytes --]

brian donovan wrote:

> Can anyone give me any tips on getting findlib/OCamlfind up and running 
> properly on Win32?  I'd be very grateful.
> 
There is always the same problems with Unix-oriented soft on Win32.
1. Make sure that your ocaml install path contains no spaces e.g. 
c:\ocamlmgw
2. in your OCAMLLIB variable use forward slashes e.g. c:/ocamlmgw/lib
3. apply following patch to findlib configure script
   patch <configure.diff
4. run it with -mspath option
   ./configure -mspath
after it make everything else e.g. make, make opt, make install, make clean.

This should work fine for both MSVC and MingW OCaml ports.

And you should not build findlib in OCaml file hierarchy, you should 
build it some temporary directory, 'make install' will copy everything
to the right places.


[-- Attachment #2: configure.diff --]
[-- Type: text/plain, Size: 1605 bytes --]

--- configure.orig	2004-04-04 15:42:39.000000000 +0400
+++ configure	2004-05-10 12:52:36.453125000 +0400
@@ -103,6 +103,12 @@
     eval "$v=\"$p\""
 }
 
+apply_mspath () {
+    v=$1
+    eval "p=\"\$$v\""
+    p="`cygpath -m -l \"$p\"`"
+    eval "$v=\"$p\""
+}
 
 ######################################################################
 # Here the main program begins:
@@ -115,6 +121,7 @@
 ocaml_sitelib=""
 ocamlfind_config=""
 use_cygpath=0
+use_mspath=0
 with_toolbox=0
 with_topfind=1
 
@@ -135,6 +142,9 @@
 	-cygpath) use_cygpath=1
 	         shift
 		 ;;
+  	-mspath) use_mspath=1
+  	         shift
+ 		 ;;
 	-with-toolbox) with_toolbox=1
 	         shift
 		 ;;
@@ -151,6 +161,7 @@
 		  echo "  -sitelib path        set the location of the site-specific packages" 1>&2
                   echo "  -config path         set the location of the configuration file" 1>&2
 		  echo "  -cygpath             fix paths for cygwin environment" 1>&2
+ 		  echo "  -mspath              fix paths for MSVC environment" 1>&2
 		  echo "  -with-toolbox        also build the toolbox" 1>&2
 		  echo "  -no-topfind          don't install topfind script into stdlib directory" 1>&2
 		  exit
@@ -380,6 +391,13 @@
     parts="$parts findlib-toolbox"
 fi
 
+if [ ${use_mspath} -gt 0 ]; then
+    echo "Applying mspath..."
+    apply_mspath ocaml_core_bin
+    apply_mspath ocamlfind_bin
+    apply_mspath ocamlfind_config
+fi
+
 echo "# Makefile.config written by configure" >Makefile.config
 echo "OCAML_CORE_STDLIB=${ocaml_core_stdlib}" >>Makefile.config
 echo "OCAML_CORE_BIN=${ocaml_core_bin}" >>Makefile.config

  parent reply	other threads:[~2004-05-10 11:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-10  5:59 brian donovan
2004-05-10  8:21 ` Yutaka OIWA
2004-05-10 17:42   ` Solved! ... " brian donovan
2004-05-10 18:17     ` Yutaka OIWA
2004-05-10 11:22 ` Eugene Kotlyarov [this message]
     [not found]   ` <409F825B.4050006@lophty.com>
     [not found]     ` <409FA788.2000106@narod.ru>
2004-05-10 17:27       ` Solved ! " brian donovan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=409F65EE.6000002@narod.ru \
    --to=ekot@narod.ru \
    --cc=caml-list@inria.fr \
    --cc=lists@lophty.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).