From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA18748; Tue, 29 Jul 2003 18:28:46 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA29255 for ; Tue, 29 Jul 2003 18:28:44 +0200 (MET DST) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h6TGShT11538 for ; Tue, 29 Jul 2003 18:28:43 +0200 (MET DST) Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 19hXL9-0000Fh-00 for ; Tue, 29 Jul 2003 17:28:43 +0100 Date: Tue, 29 Jul 2003 17:28:43 +0100 Cc: caml-list@inria.fr Subject: Re: [Caml-list] Dynlink problems Message-ID: <20030729162843.GB32764@redhat.com> References: <20030728094918.GA19609@redhat.com> <005201c354f2$1f2df430$ca00a8c0@warp> <20030728174154.GA19639@redhat.com> <20030729174830D.garrigue@kurims.kyoto-u.ac.jp> <20030729154345.GA32764@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030729154345.GA32764@redhat.com> User-Agent: Mutt/1.5.4i From: Richard Jones X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 dynlink:01 camlexport:01 char:01 argv:01 bug:01 freshmeat:01 autoconf:01 automake:01 compiles:01 rpms:01 bin:01 ltd:98 caml:01 bytecode:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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