From: Jonathan Roewen <jonathan.roewen@gmail.com>
To: caml-list@yquem.inria.fr
Subject: [Caml-list] ocamlc -output-obj problems
Date: Tue, 15 Nov 2005 16:52:15 +1300 [thread overview]
Message-ID: <ad8cfe7e0511141952r7960c4a5gfdf651259e82d22c@mail.gmail.com> (raw)
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 = 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=-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
ocamlc -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
ld -s -static -nostdlib -Ttext 0x1000000 -e asm_start -L ../libc -L
../libm -L ../byterun \
-o kernel.elf asm_loader.o irq.o c_loader.o idt.o asm_stubs.o
bytekernel.o fake_math.o console_stubs.o \
-lcamlrun `gcc -print-file-name=libgcc.a` -lm -lc -L
../ocaml/lib/ocaml -lbigarray
Someone got half a clue on this?
Kindest Regards,
Jonathan
next reply other threads:[~2005-11-15 3:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-15 3:52 Jonathan Roewen [this message]
2005-11-15 4:23 ` skaller
2005-11-15 5:03 ` Jonathan Roewen
[not found] ` <ad8cfe7e0511142131j4c53bae8td7f3af42e6cecf72@mail.gmail.com>
2005-11-15 5:32 ` Jonathan Roewen
2005-11-15 7:13 ` Jonathan Roewen
2005-11-15 8:14 ` Jonathan Roewen
2005-11-15 13:01 ` Alessandro Baretta
2005-11-15 13:33 ` skaller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ad8cfe7e0511141952r7960c4a5gfdf651259e82d22c@mail.gmail.com \
--to=jonathan.roewen@gmail.com \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox