From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id B9EF27F1DD for ; Fri, 11 Jan 2013 10:28:27 +0100 (CET) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of r0ller@freemail.hu) identity=pra; client-ip=195.228.245.70; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="r0ller@freemail.hu"; x-sender="r0ller@freemail.hu"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of r0ller@freemail.hu) identity=mailfrom; client-ip=195.228.245.70; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="r0ller@freemail.hu"; x-sender="r0ller@freemail.hu"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@fmx20.freemail.hu) identity=helo; client-ip=195.228.245.70; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="r0ller@freemail.hu"; x-sender="postmaster@fmx20.freemail.hu"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AscAAOHZ71DD5PVGkWdsb2JhbABEhjmkXJJ7DgEBAQEJCwsHFAMkgiUjBEcLGwkFDAIJHQI+CRIGEwkJh3QBAxMIpS+IMAFKA4ZmgSKKUHYKgxqBEwOXJoQ8jWeBZj0 X-IronPort-AV: E=Sophos;i="4.84,451,1355094000"; d="scan'208";a="189434127" Received: from fmx20.freemail.hu ([195.228.245.70]) by mail1-smtp-roc.national.inria.fr with SMTP; 11 Jan 2013 10:28:27 +0100 Received: (qmail 47127 invoked from network); 11 Jan 2013 10:28:25 +0100 Received: from 127.0.0.1 (HELO fmx20.freemail.hu) (84.3.92.117) by localhost with SMTP; 11 Jan 2013 10:28:25 +0100 Received: from webmail by smtp gw id r0B9SPKf032464; Fri, 11 Jan 2013 10:28:25 +0100 (CET) Date: Fri, 11 Jan 2013 10:28:25 +0100 (CET) From: r0ller To: Gerd Stolpmann cc: caml-list@inria.fr In-Reply-To: <1357834108.3150.198.camel@thinkpad> Message-ID: X-Originating-IP: [84.3.92.117] X-HTTP-User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0) X-Original-User: r0ller MIME-Version: 1.0 Content-Type: TEXT/plain; CHARSET=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Freemail: message scanned Subject: Re: [Caml-list] ocamlc compiles hello world, ocamlopt not Hi Gerd, Minix3 is an ELF based system indeed. I asked the guys on the minix3 forum = and one of the developers said that neither the default minix toolchain (cl= ang) nor the minix port of gcc prepends leading underscores. However, he ha= d a hint about checking if the ocaml package itself is trying to guess duri= ng its build whether leading underscore prepending is done on the host syst= em or not. If so, that guessing might have gone wrong in case of minix3. Af= ter googling a bit, I found something indicating that point may be valid, (= cited from http://asm.sourceforge.net/howto/conventions.html#AEN647 ): Some C compilers prepend an underscore before every symbol, while others do= not. Particularly, Linux a.out GCC does such prepending, while Linux ELF GCC doe= s not. If you need to cope with both behaviors at once, see how existing packages = do. For instance, get an old Linux source tree, the Elk, qthreads, or OCaml= ... If that's true, I'd need to recompile the ocaml package whilst trying to in= dicate somehow that the minix3 system does not need leading underscore prep= ending, right? Do you think this to be a valid assumption? If so, do you ha= ppen to know how can I influence the ocaml build in such a way? Thanks®ards, r0ller Gerd Stolpmann =C3=ADrta: >Am Donnerstag, den 10.01.2013, 15:48 +0100 schrieb r0ller:> > Hi Gerd,> > > > Thanks for the quick answer! Please, find the output of nm attached -for = the first try, size limit was exceeded, hopefully now it'll get through as = attachment.> > Interesting. I guess you use an ELF-based system (Minix-3.2)? If not it> could be a limitation of a.out.> > Another theory: the symbol names coming from assembler sources seem to> always have a leading underscore, which seems to have been auto-added by> the assembler. This is a very old convention you don't find on modern OS> anymore, so it could be that this is the source of the problem. See> http://stackoverflow.com/questions/2627511/why-do-c-compilers-prepend-under= scores-to-external-names,> but pay attention to the fact that at some day the underscore was> handled differently, and was used for internal symbols. So what could> have happened: The assembler still thinks that symbols from the C> compiler are prefixed with an underscore, but this is in fact not true.> This would be a problem of the installed compiler toolchain. Maybe you> do not use the right assembler matching the C compiler?> > Gerd> > > > > > Thanks®ards,> > r0ller> > > > Gerd Stolpmann =C3=ADrta:> > >Am Donnerstag, den 10.01.2013, 14:57 +0100 schrieb r0ller@freemail.hu:> > These errors would mean that stdlib.a and libasmrun.a do not contain the> > symbols they are supposed to contain.> > What's the output of> > > > nm /usr/local/lib/ocaml/libasmrun.a?> > You should normally find here the missing symbols the linker is> > complaining about.> > > > Gerd> > > > ------------------------------------------------------------>> > Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de>> > Creator of GODI and camlcity.org.>> > Contact details: http://www.camlcity.org/contact.html>> > Company homepage: http://www.gerd-stolpmann.de>> > *** Searching for new projects! Need consulting for system>> > *** programming in Ocaml? Gerd Stolpmann can help you.>> > ------------------------------------------------------------>> > >> > > > > > -- > > Caml-list mailing list. Subscription management and archives:> > https://sympa.inria.fr/sympa/arc/caml-list> > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners> > Bug reports: http://caml.inria.fr/bin/caml-bugs> > -- > ------------------------------------------------------------> Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de> Creator of GODI and camlcity.org.> Contact details: http://www.camlcity.org/contact.html> Company homepage: http://www.gerd-stolpmann.de> *** Searching for new projects! Need consulting for system> *** programming in Ocaml? Gerd Stolpmann can help you.> ------------------------------------------------------------> > > -- > Caml-list mailing list. Subscription management and archives:> https://sympa.inria.fr/sympa/arc/caml-list> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners> Bug reports: http://caml.inria.fr/bin/caml-bugs