Browse thread
[Caml-list] Dynlink problems
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Richard Jones <rich@a...> |
| Subject: | Re: [Caml-list] Dynlink problems |
Further investigations ... I'm calling caml_startup which appears to
call this function:
CAMLexport void caml_startup_code(code_t code, asize_t code_size,
char *data, char **argv)
{
// ...
sys_init("", argv);
// ...
}
The first argument to sys_init causes Sys.executable_name to be set to
"", which means that Dynlink.init fails here:
(* Initialize the linker for toplevel use *)
let init_toplevel () =
(* Read back the known global symbols and the known primitives
from the executable file *)
let ic = open_in_bin Sys.executable_name in <-- failure happens here
This looks like a bug in the case where we need to use Dynlink from a
shared library (.so file).
Note that the code expects to find a bytecode executable, not a native
binary or .so file, but of course I'm trying to run all of this from a
shared library embedded in a C program. There's simply no bytecode
executable around to look at.
What should I do?
Rich.
--
Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj
Merjis Ltd. http://www.merjis.com/ - all your business data are belong to you.
MAKE+ is a sane replacement for GNU autoconf/automake. One script compiles,
RPMs, pkgs etc. Linux, BSD, Solaris. http://www.annexia.org/freeware/makeplus/
-------------------
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