caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] compiling PXP , OCAMLNET AND PCRE to win32
@ 2002-08-16 17:27 PJ Durai
  2002-08-17 14:28 ` Gerd Stolpmann
  0 siblings, 1 reply; 7+ messages in thread
From: PJ Durai @ 2002-08-16 17:27 UTC (permalink / raw)
  To: ocaml list

hello

I am trying to install PXP on a win2000 machine. But I successively need the
other two packages.

PXP needs OcamlNet needs Pcre.

None of these are part of core ocaml distribution.

Are there precompiled modules available for win32?
If not instructions to compile and install ?

My setup:
Windows 2000 Pro
Visual C++ 6
Ocaml 3.05 (MSVC version)
Recent Cygwin

Appreciate your time.

cheers
pj

My apologies if this is not the right forum to ask. I have tried in c.l.ml
and ocaml-beginners yahoo group and got no replies.
-------------------
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] 7+ messages in thread

* Re: [Caml-list] compiling PXP , OCAMLNET AND PCRE to win32
  2002-08-16 17:27 [Caml-list] compiling PXP , OCAMLNET AND PCRE to win32 PJ Durai
@ 2002-08-17 14:28 ` Gerd Stolpmann
  2002-08-17 14:50   ` Markus Mottl
  2002-08-17 16:30   ` PCRE on Win32-VC (Re: [Caml-list] compiling PXP , OCAMLNET AND PCRE to win32) Yutaka OIWA
  0 siblings, 2 replies; 7+ messages in thread
From: Gerd Stolpmann @ 2002-08-17 14:28 UTC (permalink / raw)
  To: PJ Durai; +Cc: ocaml list


Am 2002.08.16 19:27 schrieb(en) PJ Durai:
> hello
> 
> I am trying to install PXP on a win2000 machine. But I successively need the
> other two packages.
> 
> PXP needs OcamlNet needs Pcre.
> 
> None of these are part of core ocaml distribution.
> 
> Are there precompiled modules available for win32?
> If not instructions to compile and install ?
> 
> My setup:
> Windows 2000 Pro
> Visual C++ 6
> Ocaml 3.05 (MSVC version)
> Recent Cygwin

PCRE is the problem. Once you have it, the rest can be built as suggested
by the instructions found in the packages.

I don't know how to build PCRE for win32, but I would expect that it is
doable.

Alternatively, it is still possible to build PXP with an older version
of netstring instead of ocamlnet. This version doesn't need PCRE:

http://ocaml-programming.de/packages/netstring-0.10.1.tar.gz

Gerd
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
------------------------------------------------------------
-------------------
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] 7+ messages in thread

* Re: [Caml-list] compiling PXP , OCAMLNET AND PCRE to win32
  2002-08-17 14:28 ` Gerd Stolpmann
@ 2002-08-17 14:50   ` Markus Mottl
  2002-08-17 16:30   ` PCRE on Win32-VC (Re: [Caml-list] compiling PXP , OCAMLNET AND PCRE to win32) Yutaka OIWA
  1 sibling, 0 replies; 7+ messages in thread
From: Markus Mottl @ 2002-08-17 14:50 UTC (permalink / raw)
  To: Gerd Stolpmann; +Cc: PJ Durai, ocaml list

Gerd Stolpmann schrieb am Samstag, den 17. August 2002:
> PCRE is the problem. Once you have it, the rest can be built as suggested
> by the instructions found in the packages.
> 
> I don't know how to build PCRE for win32, but I would expect that it is
> doable.

Being a lucky Unix-user, I have never tried to build PCRE under Windows.
In case anybody has succeeded and wants to contribute his knowledge, I'd
appreciate a README.win32 file, which I'd put into the distribution then.
John Small had already contributed one a long time ago, but since the
C-library is not part of the distribution anymore, his README.win32 had
become obsolete.

Regards,
Markus Mottl

-- 
Markus Mottl                                             markus@oefai.at
Austrian Research Institute
for Artificial Intelligence                  http://www.oefai.at/~markus
-------------------
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] 7+ messages in thread

* PCRE on Win32-VC (Re: [Caml-list] compiling PXP , OCAMLNET AND PCRE to win32)
  2002-08-17 14:28 ` Gerd Stolpmann
  2002-08-17 14:50   ` Markus Mottl
@ 2002-08-17 16:30   ` Yutaka OIWA
  2002-08-17 20:23     ` Markus Mottl
  2002-08-19 17:03     ` Yutaka OIWA
  1 sibling, 2 replies; 7+ messages in thread
From: Yutaka OIWA @ 2002-08-17 16:30 UTC (permalink / raw)
  To: caml-list

>> On Sat, 17 Aug 2002 16:28:03 +0200, Gerd Stolpmann <info@gerd-stolpmann.de> said:

Gerd> I don't know how to build PCRE for win32, but I would expect that it is
Gerd> doable.

It is possible, I have done, but currently some hacks are needed.

I compiled PCRE source by Visual C++ 6 using hand-written Makefile
(see the document named NON-UNIX-USE in PCRE distribution),
passed some additional build-option to the pcre-ocaml library.
It works, at least in my computer, with static linking.

Some of the problems I found are already solved and reported to
Markus. It is fixed in pcre-ocaml-4.28.2 (OCamlMakefile update).

One problem not solved is that OCamlMakefile pass the option
'--ccopt pcre' to ocamlc, and thus VC's linker searches the file pcre.obj,
not pcre.lib. I have an ad-hoc solution to this problem,
but I don't know whether it is correct or not.
Once I find the correct answer, I'll report it.

# A Question:
# In what pathname should I place the native PCRE library?
# Name "pcre.lib"? "libpcre.lib"?
# Path "$(OCAMLLIBDIR)/contrib"? or "/winnt/system32" or whatever?
# Or should it be merged into "libpcre_stubs.lib"?

## Does someone have a good knowledge of dynamic linking in Win32?
## I have almost no knowledge of it.

-- 
Yutaka Oiwa              Yonezawa Lab., Dept. of Computer Science,
      Graduate School of Information Sci. & Tech., Univ. of Tokyo.
      <oiwa@yl.is.s.u-tokyo.ac.jp>, <yutaka@oiwa.shibuya.tokyo.jp>
PGP fingerprint = C9 8D 5C B8 86 ED D8 07  EA 59 34 D8 F4 65 53 61
-------------------
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] 7+ messages in thread

* Re: PCRE on Win32-VC (Re: [Caml-list] compiling PXP , OCAMLNET AND PCRE to win32)
  2002-08-17 16:30   ` PCRE on Win32-VC (Re: [Caml-list] compiling PXP , OCAMLNET AND PCRE to win32) Yutaka OIWA
@ 2002-08-17 20:23     ` Markus Mottl
  2002-08-17 21:07       ` Lionel Fourquaux
  2002-08-19 17:03     ` Yutaka OIWA
  1 sibling, 1 reply; 7+ messages in thread
From: Markus Mottl @ 2002-08-17 20:23 UTC (permalink / raw)
  To: Yutaka OIWA; +Cc: caml-list

On Sun, 18 Aug 2002, Yutaka OIWA wrote:
> One problem not solved is that OCamlMakefile pass the option
> '--ccopt pcre' to ocamlc, and thus VC's linker searches the file pcre.obj,

Are you sure that this option is passed? This option would actually
not make much sense so I'd be grateful if you could tell me the exact
command line.

> # A Question:
> # In what pathname should I place the native PCRE library?
> # Name "pcre.lib"? "libpcre.lib"?
> # Path "$(OCAMLLIBDIR)/contrib"? or "/winnt/system32" or whatever?
> # Or should it be merged into "libpcre_stubs.lib"?

When PCRE is statically linked, then it probably does not really matter,
you should only make sure that the path is mentioned in LIBDIRS before
compilation of PCRE-OCaml: then the compiler should automatically link
in the required functions statically.

In case you manage to build a dynamic version of PCRE, then you'll
probably have to put the library in some place where the system can
find it.

> ## Does someone have a good knowledge of dynamic linking in Win32?
> ## I have almost no knowledge of it.

Sorry, I don't have the slightest idea, but suppose that it is
conceptually similar to other systems.

Regards,
Markus Mottl

-- 
Markus Mottl                                             markus@oefai.at
Austrian Research Institute
for Artificial Intelligence                  http://www.oefai.at/~markus
-------------------
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] 7+ messages in thread

* RE: PCRE on Win32-VC (Re: [Caml-list] compiling PXP , OCAMLNET AND PCRE to win32)
  2002-08-17 20:23     ` Markus Mottl
@ 2002-08-17 21:07       ` Lionel Fourquaux
  0 siblings, 0 replies; 7+ messages in thread
From: Lionel Fourquaux @ 2002-08-17 21:07 UTC (permalink / raw)
  To: 'Markus Mottl'; +Cc: 'Yutaka OIWA', caml-list


> From: owner-caml-list@pauillac.inria.fr [mailto:owner-caml-
> list@pauillac.inria.fr] On Behalf Of Markus Mottl
> Sent: Saturday, August 17, 2002 10:23 PM
> To: Yutaka OIWA
> Cc: caml-list@inria.fr
> Subject: Re: PCRE on Win32-VC (Re: [Caml-list] compiling PXP ,
OCAMLNET
> AND PCRE to win32)
> 
> > ## Does someone have a good knowledge of dynamic linking in Win32?
> > ## I have almost no knowledge of it.
> 
> Sorry, I don't have the slightest idea, but suppose that it is
> conceptually similar to other systems.
> 

	Yes, but sometimes you must remember that the implementation is
very different: Unix dynamic linking is something like a delayed link.
Windows DLLs are already fully linked and use a table of pointers for
imported symbols, and the indirection is usually hidden by the C
compiler (using special attributes for these symbols).

-- 
  Lionel Fourquaux


-------------------
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] 7+ messages in thread

* Re: PCRE on Win32-VC (Re: [Caml-list] compiling PXP , OCAMLNET AND PCRE to win32)
  2002-08-17 16:30   ` PCRE on Win32-VC (Re: [Caml-list] compiling PXP , OCAMLNET AND PCRE to win32) Yutaka OIWA
  2002-08-17 20:23     ` Markus Mottl
@ 2002-08-19 17:03     ` Yutaka OIWA
  1 sibling, 0 replies; 7+ messages in thread
From: Yutaka OIWA @ 2002-08-19 17:03 UTC (permalink / raw)
  To: caml-list

I've created a (possibly incomplete) binary snapshot of 
the pcre-ocaml-4.28.2 for Win32-MSVC, because there is a request for it.

http://www.yl.is.s.u-tokyo.ac.jp/~oiwa/pub/caml/pcre-ocaml-4.28.2-windows.tar.gz

* Known problem:

Currently, MSVC's LINK warns about some import symbol problems.
I did not find the reason yet (I'm not a Win32 expert.)

* To Use A Binary:

  Copy pcre.lib to somewhere the MSVC linker searches for libraries (or simply in ".").
  Place libpcre-stubs.lib and other ocaml-related files to some directory and
  pass an appropriate -I options to ocamlc/ocamlopt.
  I have only tested it with -threads option.

  If you want to place the file pcre.lib to somewhere outside default MSVC
  search path, pass options "--ccopt /LINK --ccopt /LIBPATH:somewhere" to ocamlc.

* Build From Sources:

Note:
Those files are just picked up by hand from my working directory.
So some required files may be missing, or some files may not be useful.
I have actually not tried the following "stand-alone" build process.
Sorry, but please hack it if it does not work well ;-)

  Source file archives for PCRE-3.9 and pcre-ocaml-4.28.2 are needed.

  The files in the directory "pcre-files" are hand-written Makefile and
  hand-configured pcre header files.
  (on Unix platform, they are automatically generated by configure.)

  Untar pcre-3.9.tar.gz,
  modify my version of Makefile appropriately (include path),
  then use cygwin's make utility to build "pcre.lib" by command line
  "make -f path/to/my/Makefile" in the pcre-3.9 directory.

  Untar pcre-ocaml-4.28.2.tar.gz, then a command

  make all opt STATIC=yes CFLAGS=-Ipath/to/pcre-files LIBS= LIBDIRS= THREADS=yes CLIBS=pcre.lib

  (hopefully :-) builds pcre-ocaml library.
  Note that pcre-ocaml's build process makes the file named
  "pcre.lib". Obviously its content is pcre-ocaml, not PCRE-C.
  Please don't confuse those two files.

-- 
Yutaka Oiwa              Yonezawa Lab., Dept. of Computer Science,
      Graduate School of Information Sci. & Tech., Univ. of Tokyo.
      <oiwa@yl.is.s.u-tokyo.ac.jp>, <yutaka@oiwa.shibuya.tokyo.jp>
PGP fingerprint = C9 8D 5C B8 86 ED D8 07  EA 59 34 D8 F4 65 53 61
-------------------
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] 7+ messages in thread

end of thread, other threads:[~2002-08-19 17:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-16 17:27 [Caml-list] compiling PXP , OCAMLNET AND PCRE to win32 PJ Durai
2002-08-17 14:28 ` Gerd Stolpmann
2002-08-17 14:50   ` Markus Mottl
2002-08-17 16:30   ` PCRE on Win32-VC (Re: [Caml-list] compiling PXP , OCAMLNET AND PCRE to win32) Yutaka OIWA
2002-08-17 20:23     ` Markus Mottl
2002-08-17 21:07       ` Lionel Fourquaux
2002-08-19 17:03     ` Yutaka OIWA

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