From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 2074ABB9A for ; Tue, 15 Nov 2005 04:52:16 +0100 (CET) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.200]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jAF3qF9J010697 for ; Tue, 15 Nov 2005 04:52:15 +0100 Received: by zproxy.gmail.com with SMTP id x3so1523100nzd for ; Mon, 14 Nov 2005 19:52:15 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=GUxw5aXDKGG/+z8vxqfLrngrmdayJ9uV79uib7Jg+5pyPRWYpBbJhiMIc5wJtk884mkool8FRIZoii5SWY3tEhAUnFYm5EiH6WalmQDTYgEcSq0J4tNF5zygLtt8IN5r6e9uuqSQ0szpXynyUH8XA41FaNm+gkT/o392+cmJqq4= Received: by 10.65.153.12 with SMTP id f12mr6624871qbo; Mon, 14 Nov 2005 19:52:15 -0800 (PST) Received: by 10.64.10.5 with HTTP; Mon, 14 Nov 2005 19:52:15 -0800 (PST) Message-ID: Date: Tue, 15 Nov 2005 16:52:15 +1300 From: Jonathan Roewen To: caml-list@yquem.inria.fr Subject: [Caml-list] ocamlc -output-obj problems MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Miltered: at nez-perce with ID 43795B6F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocamlc:01 -output-obj:01 ocamlc:01 -output-obj:01 interprete:01 globals:01 hashtbl:01 hashtbl:01 bigarray:01 ocaml:01 libcamlrun:01 stub:01 makefile:01 cflags:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 Hi, I'm having serious problems with ocamlc -output-obj. It seems if I create a global variable, the interpreter won't run (it gets into caml_interprete, but I don't know where it goes wrong once in that function). Without any globals present, it runs fine. let table =3D Hashtbl.create 8;; Hashtbl.add table 42 "hello world";; the above code, as simple as it is, causes things to break. Remove it, and it'll run. I experience the same problems when linking against Bigarray library, and having a global value in my Console module. The only custom parts in my ocaml environment are now just libcamlrun.a, providing stub functions that return errors/raise exceptions for functions I don't want/need to support. My makefile is: CFLAGS=3D-DCAML_NAME_SPACE -O -fno-defer-pop -ffreestanding -I ../include -I ../byterun -I ../ocaml/lib/ocaml -nostdlib -nostartfiles -nostdinc bytekernel.o: asm.mli keyboard.ml VFS.ml PCI.ml busManager.ml bytekernel.ml =09ocamlc -output-obj -o bytekernel.o asm.mli keyboard.ml VFS.ml PCI.ml busManager.ml bytekernel.ml kernel.elf: asm_loader.o irq.o c_loader.o bytekernel.o idt.o asm_stubs.o fake_math.o console_stubs.o =09ld -s -static -nostdlib -Ttext 0x1000000 -e asm_start -L ../libc -L ../libm -L ../byterun \ =09=09-o kernel.elf asm_loader.o irq.o c_loader.o idt.o asm_stubs.o bytekernel.o fake_math.o console_stubs.o \ =09=09-lcamlrun `gcc -print-file-name=3Dlibgcc.a` -lm -lc -L ../ocaml/lib/ocaml -lbigarray Someone got half a clue on this? Kindest Regards, Jonathan