caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Segmentation Fault on #load
@ 2003-10-27 19:23 Eric Dahlman
  0 siblings, 0 replies; 8+ messages in thread
From: Eric Dahlman @ 2003-10-27 19:23 UTC (permalink / raw)
  To: caml-list

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

Hello,

 

I am a new ocaml user and I am having problems trying to get it to load
compiled code into the top level.  Specifically if I try to load a .cmo
or .cma file I get a segmentation violation.  This is under cygwin and
here is an example 

 

$ ocaml

        Objective Caml version 3.07+2

 

# #load pretty.cmo;;

Segmentation fault (core dumped)

 

I have been trying to track this down but have not been having too much
luck.  What could be going wrong and what should I be looking for either
as a potential source of problems or as a solution.  I was hoping to be
able to get a bit more information on what is going wrong but alas I
also could not figure out how to.

 

Thanks,

 

-Eric


[-- Attachment #2: Type: text/html, Size: 24771 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: [Caml-list] Segmentation Fault on #load
@ 2003-10-28 15:47 Beck01, Wolfgang
  2003-10-28  9:05 ` David Brown
  2003-10-28 16:11 ` Stefano Zacchiroli
  0 siblings, 2 replies; 8+ messages in thread
From: Beck01, Wolfgang @ 2003-10-28 15:47 UTC (permalink / raw)
  To: edahlman, caml-list


You wrote:
> $ ocaml
>        Objective Caml version 3.07+2
>
> # #load pretty.cmo;;
> Segmentation fault (core dumped)

Loading object files into the ocaml toplevel is not a good idea.
It's like loading pretty.cmo in your text editor (which looks
not pretty).

If you have the source code of pretty.cmo, load it (#load "pretty.mL").
If not, you have to build a toplevel (the 'ocaml' command)
linked to your object file or library. To do this, read the manual page of
ocamlmktop. This program works like ocamlc, but builds a program
that works like the ocaml command. This should be in a FAQ.


Wolfgang

-------------------
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] 8+ messages in thread
* RE: [Caml-list] Segmentation Fault on #load
@ 2003-10-28 19:56 Kevin S. Millikin
  2003-10-28 21:37 ` Eric Dahlman
  0 siblings, 1 reply; 8+ messages in thread
From: Kevin S. Millikin @ 2003-10-28 19:56 UTC (permalink / raw)
  To: 'Oleg Trott', David Brown, Beck01, Wolfgang; +Cc: edahlman, caml-list

On Tuesday, October 28, 2003 1:38 PM, Oleg Trott 
[SMTP:oleg_trott@columbia.edu] wrote:
>  Technically, it's possible for "#load" to cause seg-fault if 
"pretty" uses
>  FFI and there is a bug somewhere. Otherwise, there may be a problem
>  with Eric's copy of OCaml.

"pretty" is the pretty printer from George Necula's CIL.  It does not 
contain foreign code, but does call Obj.magic.

It appears to work for me (Ocaml 3.07 compiled with cygwin), but not 
for Eric (Ocaml 3.07+2, cygwin).

----
Kevin S. Millikin           Architecture Technology Corporation
Research Scientist          Specialists in Computer Architecture
(952)829-5864 x162          http://www.atcorp.com



-------------------
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] 8+ messages in thread
* RE: [Caml-list] Segmentation Fault on #load
@ 2003-10-29  8:20 Beck01, Wolfgang
  0 siblings, 0 replies; 8+ messages in thread
From: Beck01, Wolfgang @ 2003-10-29  8:20 UTC (permalink / raw)
  To: caml-list; +Cc: caml-list



>> > Loading object files into the ocaml toplevel is not a good idea.
> > It's like loading pretty.cmo in your text editor (which looks
> > not pretty).
> 
> No, this is supposed to work.  It should load the bytecode into the
> toplevel.
> 
> Dave

I didn't know that. It even works with libraries. Nice.


Wolfgang

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

end of thread, other threads:[~2003-10-29  8:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-27 19:23 [Caml-list] Segmentation Fault on #load Eric Dahlman
2003-10-28 15:47 Beck01, Wolfgang
2003-10-28  9:05 ` David Brown
2003-10-28 19:37   ` Oleg Trott
2003-10-28 16:11 ` Stefano Zacchiroli
2003-10-28 19:56 Kevin S. Millikin
2003-10-28 21:37 ` Eric Dahlman
2003-10-29  8:20 Beck01, Wolfgang

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