caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Building PCRE-OCaml on Win32
@ 2005-10-27 19:54 Roger Levy
  2005-10-27 19:58 ` [Caml-list] " Gerd Stolpmann
  2005-10-27 20:16 ` Peter Jolly
  0 siblings, 2 replies; 10+ messages in thread
From: Roger Levy @ 2005-10-27 19:54 UTC (permalink / raw)
  To: caml-list

I'm having difficulty installing PCRE-OCaml in my Cygwin OCaml 
installation.  I have the packages OCaml 3.08.1-1, libpcre 6.3-1, and 
pcre 6.3-1 all from a default recent Cygwin installation, so it seems to 
me that I should be able to install PCRE-OCaml (I'm getting the most 
recent version, 5.10.1) straight away.  Here is what I get, though:

=====

/tmp/pcre-ocaml-5.10.1 $ make
[everything succeeds, though there is one warning:
pcre_stubs.c:1: warning: -fPIC ignored for target (all code is position 
independent)
]

/tmp/pcre-ocaml-5.10.1 $ make install
make[1]: Entering directory `/tmp/pcre-ocaml-5.10.1/lib'

Installing library with ocamlfind
ocamlfind install  pcre META pcre.mli pcre.cmi pcre.cma pcre.cmxa pcre.a 
libpcre_stubs.a dllpcre_stubs.so
ocamlfind: Package pcre is already installed; please remove it first - 
(directory /usr/lib/ocaml/site-lib/pcre already exists)
make[1]: *** [libinstall] Error 2
make[1]: Leaving directory `/tmp/pcre-ocaml-5.10.1/lib'
make: *** [install] Error 2

=====

If I try to uninstall, however, I get the following problem:

=====

/tmp/pcre-ocaml-5.10.1 $ make uninstall
make[1]: Entering directory `/tmp/pcre-ocaml-5.10.1/lib'

Uninstalling library with ocamlfind
ocamlfind remove  pcre
ocamlfind: Package `pcre' not found
make[1]: *** [libuninstall] Error 2
make[1]: Leaving directory `/tmp/pcre-ocaml-5.10.1/lib'
make: *** [uninstall] Error 2

=====

Now, the directory /usr/lib/ocaml/site-lib/pcre is actually empty; if I 
delete it and try to install, the following happens:

=====

$ make install
make[1]: Entering directory `/tmp/pcre-ocaml-5.10.1/lib'

Installing library with ocamlfind
ocamlfind install  pcre META pcre.mli pcre.cmi pcre.cma pcre.cmxa pcre.a 
libpcre_stubs.a dllpcre_stubs.so
ocamlfind: dllpcre_stubs.so: No such file or directory
make[1]: *** [libinstall] Error 2
make[1]: Leaving directory `/tmp/pcre-ocaml-5.10.1/lib'
make: *** [install] Error 2

=====

Any suggestions? I really hate using the str library for regular 
expressions, since it has global state.

I notice that Brian Donovan asked the same thing (though he was trying 
to install it using the MSVC and Win32 makefiles, both of which failed) 
about 18 months ago, and didn't seem to get a satisfactory reply!

http://caml.inria.fr/pub/ml-archives/caml-list/2004/05/55a1a6ea9c641248fdc4da86e52f58b9.en.html

Many thanks in advance for any help!

Best,

Roger


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Building PCRE-OCaml on Win32
  2005-10-27 19:54 Building PCRE-OCaml on Win32 Roger Levy
@ 2005-10-27 19:58 ` Gerd Stolpmann
  2005-10-27 20:06   ` Roger Levy
  2005-10-27 20:16 ` Peter Jolly
  1 sibling, 1 reply; 10+ messages in thread
From: Gerd Stolpmann @ 2005-10-27 19:58 UTC (permalink / raw)
  To: Roger Levy; +Cc: caml-list

Also look into /usr/lib/ocaml/site-lib/stublibs and delete the
PCRE-related DLL files.

Gerd

Am Donnerstag, den 27.10.2005, 20:54 +0100 schrieb Roger Levy:
> I'm having difficulty installing PCRE-OCaml in my Cygwin OCaml 
> installation.  I have the packages OCaml 3.08.1-1, libpcre 6.3-1, and 
> pcre 6.3-1 all from a default recent Cygwin installation, so it seems to 
> me that I should be able to install PCRE-OCaml (I'm getting the most 
> recent version, 5.10.1) straight away.  Here is what I get, though:
> 
> =====
> 
> /tmp/pcre-ocaml-5.10.1 $ make
> [everything succeeds, though there is one warning:
> pcre_stubs.c:1: warning: -fPIC ignored for target (all code is position 
> independent)
> ]
> 
> /tmp/pcre-ocaml-5.10.1 $ make install
> make[1]: Entering directory `/tmp/pcre-ocaml-5.10.1/lib'
> 
> Installing library with ocamlfind
> ocamlfind install  pcre META pcre.mli pcre.cmi pcre.cma pcre.cmxa pcre.a 
> libpcre_stubs.a dllpcre_stubs.so
> ocamlfind: Package pcre is already installed; please remove it first - 
> (directory /usr/lib/ocaml/site-lib/pcre already exists)
> make[1]: *** [libinstall] Error 2
> make[1]: Leaving directory `/tmp/pcre-ocaml-5.10.1/lib'
> make: *** [install] Error 2
> 
> =====
> 
> If I try to uninstall, however, I get the following problem:
> 
> =====
> 
> /tmp/pcre-ocaml-5.10.1 $ make uninstall
> make[1]: Entering directory `/tmp/pcre-ocaml-5.10.1/lib'
> 
> Uninstalling library with ocamlfind
> ocamlfind remove  pcre
> ocamlfind: Package `pcre' not found
> make[1]: *** [libuninstall] Error 2
> make[1]: Leaving directory `/tmp/pcre-ocaml-5.10.1/lib'
> make: *** [uninstall] Error 2
> 
> =====
> 
> Now, the directory /usr/lib/ocaml/site-lib/pcre is actually empty; if I 
> delete it and try to install, the following happens:
> 
> =====
> 
> $ make install
> make[1]: Entering directory `/tmp/pcre-ocaml-5.10.1/lib'
> 
> Installing library with ocamlfind
> ocamlfind install  pcre META pcre.mli pcre.cmi pcre.cma pcre.cmxa pcre.a 
> libpcre_stubs.a dllpcre_stubs.so
> ocamlfind: dllpcre_stubs.so: No such file or directory
> make[1]: *** [libinstall] Error 2
> make[1]: Leaving directory `/tmp/pcre-ocaml-5.10.1/lib'
> make: *** [install] Error 2
> 
> =====
> 
> Any suggestions? I really hate using the str library for regular 
> expressions, since it has global state.
> 
> I notice that Brian Donovan asked the same thing (though he was trying 
> to install it using the MSVC and Win32 makefiles, both of which failed) 
> about 18 months ago, and didn't seem to get a satisfactory reply!
> 
> http://caml.inria.fr/pub/ml-archives/caml-list/2004/05/55a1a6ea9c641248fdc4da86e52f58b9.en.html
> 
> Many thanks in advance for any help!
> 
> Best,
> 
> Roger
> 
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
> 
-- 
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
Telefon: 06151/153855                  Telefax: 06151/997714
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Building PCRE-OCaml on Win32
  2005-10-27 19:58 ` [Caml-list] " Gerd Stolpmann
@ 2005-10-27 20:06   ` Roger Levy
  0 siblings, 0 replies; 10+ messages in thread
From: Roger Levy @ 2005-10-27 20:06 UTC (permalink / raw)
  To: caml-list

Gerd Stolpmann wrote:
> Also look into /usr/lib/ocaml/site-lib/stublibs and delete the
> PCRE-related DLL files.

Hmm...I don't even have a /usr/lib/ocaml/site-lib/stublibs directory!

Do you mean /usr/lib/ocaml/stublibs?  That directory is empty; removing 
it doesn't change the error messages that I get with make install.

Thanks though...

Roger


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Building PCRE-OCaml on Win32
  2005-10-27 19:54 Building PCRE-OCaml on Win32 Roger Levy
  2005-10-27 19:58 ` [Caml-list] " Gerd Stolpmann
@ 2005-10-27 20:16 ` Peter Jolly
  2005-10-27 21:30   ` Roger Levy
  2005-11-08  2:44   ` Igor Pechtchanski
  1 sibling, 2 replies; 10+ messages in thread
From: Peter Jolly @ 2005-10-27 20:16 UTC (permalink / raw)
  To: Roger Levy; +Cc: caml-list

Roger Levy wrote:
> Installing library with ocamlfind
> ocamlfind install  pcre META pcre.mli pcre.cmi pcre.cma pcre.cmxa pcre.a 
> libpcre_stubs.a dllpcre_stubs.so
> ocamlfind: dllpcre_stubs.so: No such file or directory

This is your problem.  It is attempting to install a .so file, which
_cannot_ exist, since (a) Cygwin uses .dll for shared libraries rather
than .so, and (b) the Cygwin port of OCaml does not support shared
libraries in any case.

Rebuild PCRE for static linking only, and it should install happily.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Building PCRE-OCaml on Win32
  2005-10-27 20:16 ` Peter Jolly
@ 2005-10-27 21:30   ` Roger Levy
  2005-11-08  2:44   ` Igor Pechtchanski
  1 sibling, 0 replies; 10+ messages in thread
From: Roger Levy @ 2005-10-27 21:30 UTC (permalink / raw)
  To: caml-list

Peter Jolly wrote:
> Roger Levy wrote:
> 
>>Installing library with ocamlfind
>>ocamlfind install  pcre META pcre.mli pcre.cmi pcre.cma pcre.cmxa pcre.a 
>>libpcre_stubs.a dllpcre_stubs.so
>>ocamlfind: dllpcre_stubs.so: No such file or directory
> 
> 
> This is your problem.  It is attempting to install a .so file, which
> _cannot_ exist, since (a) Cygwin uses .dll for shared libraries rather
> than .so, and (b) the Cygwin port of OCaml does not support shared
> libraries in any case.
> 
> Rebuild PCRE for static linking only, and it should install happily.

Thank you!  This worked.  (FWIW: I did this by uncommenting the line

export STATIC = yes

in the top-level Makefile.conf)

I don't understand how to refer to the pcre module with ocamlc or the
toplevel, but I suspect this is more of a newbie question so I'm moving
it into the caml-beginnners list.

Many thanks.

Roger


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Building PCRE-OCaml on Win32
  2005-10-27 20:16 ` Peter Jolly
  2005-10-27 21:30   ` Roger Levy
@ 2005-11-08  2:44   ` Igor Pechtchanski
  1 sibling, 0 replies; 10+ messages in thread
From: Igor Pechtchanski @ 2005-11-08  2:44 UTC (permalink / raw)
  To: Peter Jolly; +Cc: Roger Levy, caml-list

On Thu, 27 Oct 2005, Peter Jolly wrote:

> Roger Levy wrote:
> > Installing library with ocamlfind
> > ocamlfind install  pcre META pcre.mli pcre.cmi pcre.cma pcre.cmxa pcre.a
> > libpcre_stubs.a dllpcre_stubs.so
> > ocamlfind: dllpcre_stubs.so: No such file or directory
>
> This is your problem.  It is attempting to install a .so file, which
> _cannot_ exist, since (a) Cygwin uses .dll for shared libraries rather
> than .so, and (b) the Cygwin port of OCaml does not support shared
> libraries in any case.
>
> Rebuild PCRE for static linking only, and it should install happily.

FWIW, the experimental 3.08.1-2 version of ocaml on Cygwin does support
shared libraries (at least to the extent of allowing loading them from the
top-level).  I'm slowly working towards adding full shared library support
so that all tools do the right thing when building packages.

Igor Pechtchanski
Volunteer O'Caml maintainer for Cygwin
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Building PCRE-OCaml on Win32
  2004-05-11 19:43 brian donovan
  2004-05-12 17:25 ` Markus Mottl
@ 2004-05-15 12:31 ` Eugene Kotlyarov
  1 sibling, 0 replies; 10+ messages in thread
From: Eugene Kotlyarov @ 2004-05-15 12:31 UTC (permalink / raw)
  To: caml-list

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

brian donovan wrote:

> 
> If anyone has gotten PCRE-OCaml working on Win32 w/the MinGW port of 
> OCaml 3.0.7 w/out MSVC installed, please skip the rest of my email 
> (describing what I tried and what happened) and tell me what I need to do.
I've just tried to make it work.

First thing you need is PCRE itself built for MingW, unfortunately
Cygwin package won't work.

In PCRE folder do
$ ./configure CFLAGS='-mno-cygwin -O2'
$ make
$ cp .libs/libpcre.a /lib/mingw/
$ cp pcre.h /usr/include/mingw/

Make will give you error in the end but that's not a problem.

Then in pcre-ocaml folder set variables in Makefile.conf to following

export STATIC = yes
export MINGW := 1
export INCDIRS :=/usr/include/mingw
export LIBDIRS :=/lib/mingw
export CFLAGS := -O2 -mno-cygwin -DPCRE_STATIC

Then remove
CFLAGS = -O2
line from lib/makefile

Replace OCamlMakefile with latest version (6.11.0) and apply attached
patch to it.

Than do make and make examples for testing. If it will work you can then
do make install.



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

--- OCamlMakefile.orig	2004-05-14 23:16:01.734375000 +0400
+++ OCamlMakefile	2004-05-14 19:21:55.781250000 +0400
@@ -421,7 +421,7 @@
   RES_CLIB     := lib$(CLIB_BASE).$(EXT_LIB)
 endif
 
-ifndef MSVC
+ifndef WIN32
   DLLSONAME := dll$(CLIB_BASE).so
 endif
 
@@ -431,7 +431,7 @@
 		$(NCRESULT).cmi $(NCRESULT).cmx $(NCRESULT).o \
 		$(RES_CLIB) $(IMPL_CMO:.cmo=.annot)
 
-ifndef MSVC
+ifndef WIN32
   ifndef STATIC
     NONEXECS += $(DLLSONAME)
   endif
@@ -440,7 +440,7 @@
 ifndef LIBINSTALL_FILES
   LIBINSTALL_FILES := $(RESULT).mli $(RESULT).cmi $(RESULT).cma \
 		      $(RESULT).cmxa $(RESULT).$(EXT_LIB) $(RES_CLIB)
-  ifndef MSVC
+  ifndef WIN32
     ifndef STATIC
       ifneq ($(strip $(OBJ_LINK)),)
         LIBINSTALL_FILES += $(DLLSONAME)
@@ -815,7 +815,7 @@
 .SUFFIXES:		.mli .ml .cmi .cmo .cmx .cma .cmxa .$(EXT_OBJ) \
                         .mly .di .d .$(EXT_LIB) .idl .c .$(EXT_CXX) .h .so \
                         .rep .zog .glade
-ifndef MSVC
+ifndef WIN32
 $(DLLSONAME):		$(OBJ_LINK)
 			$(OCAMLMKLIB) $(INCFLAGS) $(CLIBFLAGS) \
 				-o $(CLIB_BASE) $(OBJ_LINK) $(CLIBS:%=-l%) \



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Caml-list] Building PCRE-OCaml on Win32
@ 2004-05-13 22:32 HENRIKSON, JEFFREY
  0 siblings, 0 replies; 10+ messages in thread
From: HENRIKSON, JEFFREY @ 2004-05-13 22:32 UTC (permalink / raw)
  To: lists; +Cc: caml-list

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

This makefile currently builds pcre-ocaml on mingw for "dynlinked"
bytecode compilation.  I could not get a working native code build.  I
think there is an uncorrected problem in Ocaml in this direction.  The
common failure is to get a compiled, linked executable that crashes
before running the first line of Ocaml code.  I complained about this on
caml-list (not very well) and didn't get an answer.  If I have some
time, I'll refine those complaints.

Yes, you must build pcre by yourself if you don't want to depend on the
cygwin runtime.  You're on your own with depending on cygwin, as I have
heard mixing cygwin and mingw C runtimes can produce very hard to
diagnose bad problems.

I will also paste here a shell script for compiling pcre sans cygwin.
There's also a code generation command that you have to run, (to
generate maketables.c?) but it's easy enough to figure out.


Jeff Henrikson


Pcre-4.4:

gcc -mno-cygwin -DPOSIX_MALLOC_THRESHOLD=10 -c pcre.c
gcc -mno-cygwin -DPOSIX_MALLOC_THRESHOLD=10 -c maketables.c
gcc -mno-cygwin -DPOSIX_MALLOC_THRESHOLD=10 -c get.c
gcc -mno-cygwin -DPOSIX_MALLOC_THRESHOLD=10 -c study.c
gcc -shared -mno-cygwin pcre.o maketables.o get.o study.o -o
libpcre-mingw.dll -
Wl,--out-implib,libpcre-mingw.dll.a





-----Original Message-----
From: Jeff Henrikson [mailto:jehenrik@yahoo.com] 
Sent: Wednesday, May 12, 2004 1:31 PM
To: brian donovan
Subject: Re: PCRE-OCaml for OCaml 3.0.7 (MinGW) on Win32


Hi,

Yes there are some issues with building pcre-ocaml on mingw.  I didn't
know about them all when I submitted that patch.  I actually believe
there are problems with ocaml itself on mingw, specifically with regard
to linking C code.  I have had identical problems in my other C modules
too, unique to mingw.

Sorry but I am not at work today, where my pcre-ocaml build lives.  I
can send you my current makefile tomorrow.

Not all the things one would like to do work in this ocaml release under
mingw.  There are some super freaky things like building excutables that
crash before running a line of code and such.  I asked some imprecise
questions about them on the list a while back, but didn't get answered.
This was all for ocaml-3.07.  I have not taken the time to ask them more
precisely.

Right now I believe I limit myself to building a bytecode "dynlinked"
dll.

I think that first makefile I sent out didn't even have -mno-cygwin in
it.  Use it.

Apologies.


Jeff Henrikson



+++ brian donovan [11/05/04 21:25 +0800]:
> Hello,
> 
> I'm attempting to get PCRE-OCaml 5.0.8 working on a WinXP system on
> which I've installed Cygwin (all packages) and the MinGW port of OCaml

> 3.0.7 (precompiled w/installer).  Findlib/OCamlfind 1.0.4 is already 
> installed.
> 
> I've encountered some difficulties in getting PCRE-OCaml 5.0.8 going
> and  found your email in the header of a MinGW-based makefile included

> in the package.  While I can see that it's been many months since
Markus 
> Mottl included your makefile w/his work (predating the release of
OCaml 
> 3.0.7 it seems), I'm emailing in the hope that you're still working
with 
> OCaml on Win32 and can advise me on building PCRE-OCaml.
> 
> I'd be grateful for any guidance thatyou can give.
> 
> Thanks,
> brian donovan

-- 

[-- Attachment #2: Makefile.mingw --]
[-- Type: application/octet-stream, Size: 1789 bytes --]

#
# MinGW based makefile, adapted by Jeff Henrikson, jehenrik@yahoo.com,
# November 2003.
#
# usage:
# make -f Makefile.mingw
# make -f Makefile.mingw opt
#
# File is provided as is.  Let the buyer beware!

#LIB_PATH=d:\ocaml\libs
#INC_PATH=d:/ocaml/lib d:/ocaml/includes
INC_PATH=$(shell ocamlc -where)


all: pcre.cma
opt: pcre.cmxa

pcre.cmo: pcre.cmi pcre.ml
	ocamlc -c pcre.ml -o pcre.cmo

pcre.cmi: pcre.mli
	ocamlc -c pcre.mli -o pcre.cmi
	

	#These were the MS commands:
	#cl /nologo /c /MT pcre_stubs.c /Fopcre_stubs.s.obj $(addprefix /I,$(INC_PATH))
	#lib /nologo /debugtype:CV /OUT:dllpcre_stubs.dll.a pcre_stubs.s.obj
	#echo $(INC_PATH)
	# 

# -D__MINGW32__ 
pcre_stubs.o: pcre_stubs.c
	gcc -mno-cygwin -I $(INC_PATH) -I/usr/include -I /usr/include/w32api -c pcre_stubs.c

#libpcre_stubs.a: pcre_stubs.o
#	ar cr libpcre_stubs.a pcre_stubs.o
#	ranlib libpcre_stubs.a


libpcre_stubs.a: pcre_stubs.o
	ar cr libpcre_stubs.a pcre_stubs.o
	ranlib libpcre_stubs.a

dllpcre_stubs.dll: pcre_stubs.o
	gcc -g -mno-cygwin -shared -L `ocamlc -where` -o dllpcre_stubs.dll pcre_stubs.o -L . -lpcre-mingw `ocamlc -where`/ocamlrun.a
	chmod 777 dllpcre_stubs.dll

pcre.cmx: pcre.cmi pcre.ml
	ocamlopt -c pcre.ml -o pcre.cmx

pcre.cmxa: pcre.cmx -g libpcre_stubs.a libpcre-mingw.dll
	ocamlopt -verbose -a -o pcre.cmxa pcre.cmx \
  		 -cclib -lpcre-mingw -cclib -lpcre_stubs 

pcre.cma: pcre.cmo dllpcre_stubs.dll
	ocamlc -a -o pcre.cma pcre.cmo  \
  		-dllib -lpcre_stubs
#  		-cclib -lpcre_stubs -cclib libpcre-mingw.dll
#  		-cclib -lpcre_stubs -cclib -lpcre-mingw 
#try: ocamlc -o test.exe pcre.cma test.ml


install:
	ocamlfind install pcre META pcre.cma pcre.cmxa pcre.cmi pcre.mli \
		pcre.lib
uninstall:
	ocamlfind remove pcre

clean:
	rm *.cm* *.o libpcre_stubs.dll dllpcre_stubs.dll




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Building PCRE-OCaml on Win32
  2004-05-11 19:43 brian donovan
@ 2004-05-12 17:25 ` Markus Mottl
  2004-05-15 12:31 ` Eugene Kotlyarov
  1 sibling, 0 replies; 10+ messages in thread
From: Markus Mottl @ 2004-05-12 17:25 UTC (permalink / raw)
  To: brian donovan; +Cc: caml-list

On Wed, 12 May 2004, brian donovan wrote:
> The PCRE-OCaml 5.0.8 package (which you can browse here : 
> <http://www.oefai.at/~markus/ocaml_sources/pcre-ocaml-5.08.0/> ... 
> download here : 
> <http://www.ai.univie.ac.at/~markus/home/ocaml_sources.html>), dated in 
> the README file as having been prepared in January 2003, contains a 
> README.win32 file with instructions divided into two sections : "Install 
> libpcre" and "Install ocaml-pcre" and advises at the top "Need Cygwin, 
> MSVC, findlib.".  I do not have access to MSVC at present, but I was 
> encouraged by the presence of a Makefile.mingw (itself dated November 
> 2003)  in the pcre_make.win32 folder alongside the Makefile.win32 
> referenced in the "Install libpcre" portion of the win32 readme.

Well, PCRE-OCaml is a bit more up-to-date than January 2003 ;-)

The README was last modified at this time, the package itself was last
updated at the end of April this year.

Otherwise, I cannot be very helpful, since I don't have access to any
Windows machine right now and wouldn't want to bother with those anyway.

The README.win32 was written by Artem Prisyaznuk last year, and I
don't know whether it is still valid.  Maybe anybody else has already
successfully installed PCRE-OCaml under Windows and can help Brian?

Regards,
Markus

-- 
Markus Mottl          http://www.oefai.at/~markus          markus@oefai.at

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Caml-list] Building PCRE-OCaml on Win32
@ 2004-05-11 19:43 brian donovan
  2004-05-12 17:25 ` Markus Mottl
  2004-05-15 12:31 ` Eugene Kotlyarov
  0 siblings, 2 replies; 10+ messages in thread
From: brian donovan @ 2004-05-11 19:43 UTC (permalink / raw)
  To: caml-list

With findlib/OCamlfind now working, I'm one step closer to getting OCaml 
HTTP going.

OCaml HTTP also requires OCamlnet (>= 0.94) and PCRE-OCaml (>= 4.28.2) 
and OCamlnet depends on Markus Mottl's PCRE-OCaml, so that's next up.    
As a newbie, I would normally post my questions to ocaml_beginners 
first, but a previous question in the same vein didn't elicit any 
responses there and though I emailed the author of the MinGW makefile 
(mentioned further on), I haven't yet received a reply.  I am using the 
MinGW port of OCaml 3.07 on WinXP for learning purposes and have a 
complete (all packages) Cygwin install.

If anyone has gotten PCRE-OCaml working on Win32 w/the MinGW port of 
OCaml 3.0.7 w/out MSVC installed, please skip the rest of my email 
(describing what I tried and what happened) and tell me what I need to do. 

The PCRE-OCaml 5.0.8 package (which you can browse here : 
<http://www.oefai.at/~markus/ocaml_sources/pcre-ocaml-5.08.0/> ... 
download here : 
<http://www.ai.univie.ac.at/~markus/home/ocaml_sources.html>), dated in 
the README file as having been prepared in January 2003, contains a 
README.win32 file with instructions divided into two sections : "Install 
libpcre" and "Install ocaml-pcre" and advises at the top "Need Cygwin, 
MSVC, findlib.".  I do not have access to MSVC at present, but I was 
encouraged by the presence of a Makefile.mingw (itself dated November 
2003)  in the pcre_make.win32 folder alongside the Makefile.win32 
referenced in the "Install libpcre" portion of the win32 readme.

First, it occurred to me to wonder whether I did in fact need to install 
libpcre, as I have a full Cygwin install and I see pcre in the package 
list (<http://www.cygwin.com/packages/>).  So my first question is : if 
I already have pcre through Cygwin, do I still need this libpcre?

Assuming that I did need it, I tried following the instructions in the 
win32 readme for installing libpcre.

Unfortunately, there's an oddity in the win32 readme (aside from it not 
mentioning the presence of the Makefile.mingw).  The 4th step in the 
instructions for installing libpcre is "Read 'non-unix-use' and make 
changes [...]", but I've checked every file and  README.win32 contains 
the only instance of the phrase "non-unix-use" within any of the files 
in the package.

Skipping that step, I proceeded to : make -f Makefile.win32

Doing this, I knew that it probably would not work (because of skipping 
step 4 and also because I didn't have MSVC on my system).  Make stopped 
immediately with the message :

*** No rule to make target 'maketables.c', needed by 
'maketables.s.obj'.  Stop.

Then, I tried the MinGW makefile : make -f Makefile.mingw

Result :

*** No rule to make target 'pcre.mli', needed by 'pcre.cmi'.  Stop.

I then chanced the 2nd set of instructions ("Install ocaml-pcre"), 
hoping that maybe I didn't need libpcre but rather only ocaml-pcre.  The 
lib directory has its own Makefile.win32 and I followed the instructions :

make -f Makefile.win32 all

Make chugged for a second and produced the following lines (note : my 
OCaml install lives in C:/ocaml3.0.7) :

echo C:/ocaml3.0.7/lib
cl /nologo /c /MT pcre_stubs.c /Fopcre_stubs.s.obj /IC:/ocaml3.0.7/lib
make: cl: Command not found
make: *** [pcre_stubs.lib] Error 127

Checking the makefile, I saw the use of cl and Googled my problem.  It 
turns out that cl is MVC's compiler. 

Thanks for any advice.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-11-08  2:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-27 19:54 Building PCRE-OCaml on Win32 Roger Levy
2005-10-27 19:58 ` [Caml-list] " Gerd Stolpmann
2005-10-27 20:06   ` Roger Levy
2005-10-27 20:16 ` Peter Jolly
2005-10-27 21:30   ` Roger Levy
2005-11-08  2:44   ` Igor Pechtchanski
  -- strict thread matches above, loose matches on Subject: below --
2004-05-13 22:32 HENRIKSON, JEFFREY
2004-05-11 19:43 brian donovan
2004-05-12 17:25 ` Markus Mottl
2004-05-15 12:31 ` Eugene Kotlyarov

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).