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 RAA14234; Wed, 16 Jan 2002 17:03:39 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA14119 for ; Wed, 16 Jan 2002 17:03:38 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g0GG3Z501837; Wed, 16 Jan 2002 17:03:35 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA12914; Wed, 16 Jan 2002 17:03:35 +0100 (MET) Date: Wed, 16 Jan 2002 17:03:35 +0100 From: Xavier Leroy To: Pixel Cc: caml-list@inria.fr Subject: Re: [Caml-list] -thread and ocamlc vs ocamlc.opt Message-ID: <20020116170335.B13963@pauillac.inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from pixel@mandrakesoft.com on Sun, Jan 13, 2002 at 10:39:11PM +0100 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > % ocamlc -thread threads.cma > % ocamlc.opt -thread threads.cma > Error on dynamically loaded library: /usr/lib/ocaml/dllthreads.so: undefined symbol: extern_sp This is a known bug in 3.04. The switch to dynamic loading of C libraries was bound to generate a few rough edges; this is the only one known so far. > % ocamlopt -thread threads.cmxa > Cannot find file threads.cmxa This is normal: you can't use threads in native programs, unless OCaml was set up to use POSIX threads (configure --with-pthread). > Questions: > - in which case are ocamlc and ocamlc.opt not equivalent? When there is a bug in one and not in the other :-) > - in which case are xxx and xxx.opt not equivalent? Can't answer for general xxx. > At least, it seems camlp4o.opt is pretty useless (one gets "native-code > program cannot do a dynamic load") > > I've been trying to reduce the size of the ocaml rpm which is getting quite > huge (27MB), and doing > for i in /usr/bin/*.opt ; do > ln -s `basename $i` `echo $i | sed "s/.opt$//"` > done > helps! Frankly, I would rather remove the .opt compilers from the RPM, rather than remove the non-.opt compilers. Concerning the RPM size, several things should be noted (with tongue in cheek): - If you had one package with gcc, gdb, libc and assorted goodies, it would be even larger - Mandrake contains even larger packages of even more dubious utility than OCaml - It is certainly possible to split it into different packages, if you think not all users will need everything - Mandrake could always switch to DVDs as their distribution format :-) > - should threads.cmxa be included somehow/somewhere? The doc says > ocamlopt -thread other options threads.cmxa other files > is that wrong? It also says you have to configure with POSIX threads for this to work. The reason this is not the default configuration is that you need to trust your POSIX thread implementation and have a good understanding of its limitations (slower thread creation, fewer max threads allowed). My experience as the initial developer of LinuxThreads suggest that these conditions are not often met... - Xavier Leroy ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr