caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re: [Caml-list] Initial port of ocaml for mingw (long)
@ 2001-09-26 13:06 CaptnJamesKirk
  2001-09-26 16:44 ` [Caml-list] Looking for Graph Operations-library Mattias Waldau
  2001-09-26 16:47 ` Mattias Waldau
  0 siblings, 2 replies; 11+ messages in thread
From: CaptnJamesKirk @ 2001-09-26 13:06 UTC (permalink / raw)
  To: ayerkes; +Cc: caml-list

In a message dated 9/25/2001 3:29:34 PM Central Daylight Time, 
ayerkes@gmvnetwork.com writes:

> Actually, my thought was to build with cygwin itself at least in the
>  short term.  The important thing (to me) is the ability to write nice
>  software and distribute it without the cygwin dll.  It's a bonus too
>  that ocaml.exe works properly without it too, but the main thing was
>  the ability to run ocamlopt and get an exe out that you can pass
>  around easily.  I built with cygwin's gcc (-mno-cygwin), tho.  I think
>  that it may not be realistic to build ocaml otherwise given that it
>  uses unix tools to create the prims list, however it can easily be
>  used without cygwin.
>  
>  I should've made it more clear that you need cygwin gcc as yet to build.
>  The important point was that it's possible to get it away from
>  dependence on cygwin1.dll...  

After I fired off my last message, I started to wonder if that's what you 
did, so I tried it myself under cygwin. Copying libncurses.a to libpdcurses.a 
still works (though this may need to be changed to use the regular ncurses 
which is part of the standard cygwin distro). I ran into some other problems, 
and here's what happened.

(first untarring the ocaml source, then patching, then untarring the boot 
stuff...)

1) make
First break is at utils/misc.mli, where it says cannot open pervasives.cmi. 
The only thing that worked for me here was to...
2) make world
which exits shortly with a cryptic (at least for me) error at [coldstart], 
but then
3) make
seems to be happy until it gets to bigarray. It needs bigarray.cmi but 
doesn't have it since it doesn't have big_int.cmi.  Making the 3 cmis you 
mention in otherlibs/num (int_misc.cmi, string_misc.cmi, and arith_flags.cmi) 
may be the first step, but it doesn't fix it. The only way I could build 
big_int.cmi was to cd to "otherlibs/num" and type "make big_int.cmi" there, 
after building nat.cmi as well.  Two more tries indicated that "ratio.cmi" 
and "num.cmi" also have to be built in the "otherlibs/num" directory. THEN, 
we have to cd to "otherlibs/bigarray" and do "make bigarray.cmi" there. Then,
4) make
goes all the way to ocamldebugger where it exits with "Uncaught exception: 
Not_found." I can't figure out how to fix it, so I do your next steps of "rm 
byterun/io.h", "make -C asmrun depend", and "make -C byterun depend". These 
last two have many warnings, most of which seem tied to redefinitions in 
fail.h.
5) make opt
then says I need arith_status.cmi in otherlibs/num, but once that's built it 
finishes without further error.

However, after doing "make install" and "make installopt" and trying to run 
ocaml.exe, I get "Cannot exec /usr/local/ocamlrun". In fact, all of the 
executables return that error.

And now I don't know how to fix that...

Oh, and as long as we're working on it, it would be VERY nice if we could get 
labltk to build as well.

/John



  
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 11+ messages in thread
* RE: [Caml-list] Looking for Graph Operations-library
@ 2001-09-26 21:50 Chris Tilt
  0 siblings, 0 replies; 11+ messages in thread
From: Chris Tilt @ 2001-09-26 21:50 UTC (permalink / raw)
  To: caml-list

Although I am not an accomplished functional programmer,
I would be happy to share a parameterized (functor-based)
graph module that provides basic directed graph data
structures and itterators. It allows arbitrary vertex
and edge types with the use of a functor interface. There
is also an accompanying algorithm module that currently
only implements shortest path and a skeleton function.
Let me know it sounds useful. I included the signature
below (sorry for the extra length). Performance is good
even though the vertex and edge maps are purely functional.
A pretty printer uses the graphviz "dot" format. Sorry
there is no parser :-(

Cheers, Chris
mailto:cet@webcriteria.com

(* Module [Pgraph]: graphs over ordered vertex identifiers with
   parameterized vertex, and edge types *)

module type ParameterizedGraphType =
  sig
    type t
      (* type of the vertex identifier *)
    type edge
      (* edge attributes *)
    type vertex
      (* vertex attributes *)
    val compare: t -> t -> int
	(* compare is used to order vid *)
    val formatEdge: t -> t -> edge -> string
    val formatVertex: t -> vertex -> string
  end


module type S =
  sig
    type vid
    type pVertex
    type pEdge
    type vertex = Vertex of vid * pVertex
    type edge = Edge of vid * vid * pEdge
    type t
    type graph = t

    module GraphAttributes : ParameterizedGraphType
    module VertexMap : Map.S with type key = vid

    val empty: t
    val isEmpty: t -> bool
    val numVertices: t -> int
    val numEdges: t -> int
    val vidOf: vertex -> vid
	(* find a vertex by name, throws Not_found if vid not in graph *)
    val vertexOf: vid -> t -> vertex
    val numEdgeDuplicates: vid -> vid -> t -> int
    val firstChildOf: vid -> t -> vid
    val vertexAttributeOf: vid -> t -> pVertex
    val hasVertex: vid -> t -> bool
    val removeAllEdges: t -> t
    val hasEdge: vid -> vid -> t -> bool
    val addVertex: vertex -> t -> t
    val addEdge: edge -> t -> t
	(* addEdgeAccumulate adds/updates an edge where the edge value
	   is the result of applying the supplied accumulator function
	   to the old edge value and supplied edge value *)
    val addEdgeAccumulate: edge -> (edge -> edge -> edge) -> t -> t
    val edges: t -> edge list
    val vertices: t -> vertex list
    val edgesFrom: vid -> t -> edge list
    val edgesTo: vid -> t -> edge list
    val mapVertices: (vertex -> vertex) -> t -> t
	(* applies a mapping function to all vertices in the graph,
	   replacing each vertex in the graph with the result of the
	   function application. Careful if you change the vid *)
    val iterVertices: (vertex -> unit) -> t -> unit
    val iterEdges: (edge -> unit) -> t -> unit
    val formatEdge: edge -> string
    val formatVertex: vertex -> string
    val printDotGraph: string -> out_channel -> t -> unit

  end
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ:
http://caml.inria.fr/FAQ/
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/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


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

end of thread, other threads:[~2001-10-01 10:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-26 13:06 [Caml-list] Initial port of ocaml for mingw (long) CaptnJamesKirk
2001-09-26 16:44 ` [Caml-list] Looking for Graph Operations-library Mattias Waldau
2001-09-26 16:47 ` Mattias Waldau
2001-09-26 17:08   ` Markus Mottl
2001-09-26 17:13   ` Brian Rogoff
2001-09-26 18:04     ` Mattias Waldau
2001-09-26 18:29       ` Brian Rogoff
2001-09-26 19:23       ` Markus Mottl
2001-09-27  6:16   ` Jean-Christophe Filliatre
2001-10-01 10:00   ` Francois Pottier
2001-09-26 21:50 Chris Tilt

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