From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 0B11EBBAF for ; Tue, 8 Sep 2009 14:26:02 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArkBAH7qpUrD2MUql2dsb2JhbACbPgEBAQEBCBUHvnWEGAWBVA X-IronPort-AV: E=Sophos;i="4.44,352,1249250400"; d="scan'208";a="46190619" Received: from bluelynx4.ukhost4u.com ([195.216.197.42]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Sep 2009 14:26:01 +0200 Received: from [78.105.203.81] (helo=feast.lan) by bluelynx4.ukhost4u.com with esmtpa (Exim 4.69) (envelope-from ) id 1Mkzln-0005DJ-4k for caml-list@inria.fr; Tue, 08 Sep 2009 13:25:59 +0100 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Mime-Version: 1.0 (Apple Message framework v1075.2) Subject: Re: [Caml-list] Compiling OCaml under OS X 10.6 From: John Whitington In-Reply-To: Date: Tue, 8 Sep 2009 13:25:56 +0100 Content-Transfer-Encoding: 7bit Message-Id: <4F186FB6-2E74-41DB-94DC-482C05653AEE@coherentgraphics.co.uk> References: <57A1F725-CDB5-4361-8E8C-FE99732338BB@coherentgraphics.co.uk> To: OCaml Mailing List X-Mailer: Apple Mail (2.1075.2) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bluelynx4.ukhost4u.com X-AntiAbuse: Original Domain - inria.fr X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - coherentgraphics.co.uk X-Source: X-Source-Args: X-Source-Dir: X-Spam: no; 0.00; ocaml:01 bytecode:01 gcc:01 ocamlopt:01 ocamlopt:01 cmx:01 libasmrun:01 stdlib:01 pervasives:01 stdlib:01 pervasives:01 gcc:01 libasmrun:01 usr:01 lib:01 Hi. On 3 Sep 2009, at 03:28, Andres Varon wrote: > On Sep 1, 2009, at 12:32 PM, John Whitington wrote: > >> Hi Folks, >> >> Has anyone managed this? Bytecode seems fine, native not so. >> >> I've tried just ./configure and ./configure -cc "gcc -m64" with the >> source bzip of 3.11.1 as suggested in INSTALL. Both compile fine, >> but give: >> >> feast:trunk john$ ocamlopt -c a.ml >> feast:trunk john$ ocamlopt -o a a.cmx >> ld: warning: in libasmrun.a, file is not of required architecture >> Undefined symbols: >> "_caml_ml_set_binary_mode", referenced from: >> .L139 in stdlib.a(pervasives.o) >> .L157 in stdlib.a(pervasives.o) >> _camlPervasives__102 in stdlib.a(pervasives.o) >> _camlPervasives__102 in stdlib.a(pervasives.o) >> ... (several hundred more lines) >> >> This is with XCode 3.2 64-bit (from the Snow Leopard DVD), the gcc >> is i686-apple-darwin10-gcc-4.2.1. >> >> lipo -info libasmrun.a gives: >> input file /usr/local/lib/ocaml/libasmrun.a is not a fat file >> Non-fat file: /usr/local/lib/ocaml/libasmrun.a is architecture: >> x86_64 >> >> One possibly-salient error from the build: >> ld: warning: -read_only_relocs cannot be used with x86_64 >> >> Configure log: http://www.coherentpdf.com/configure.txt >> make world.opt log: http://www.coherentpdf.com/build.txt > > > I just installed Snow Leopard in my laptop and the x86_64 ocaml > appears to work fine. I noticed that in your configure log the gcc > compiler is still listed at the end as 'gcc', while in mine it is > 'gcc -m64'. Perhaps you need to cleanup with 'make distclean' and > reconfigure before compiling the x86_64 target? It turned out these errors were spurious - I nuked the machine and installed 10.6 clean, and it was fine. However, 3.11.1 seems to have a bug 3.11.0 doesn't, which I've reported here: http://caml.inria.fr/mantis/view.php?id=4860 Also, the 3.11.1 intel .dmg from the OCaml website doesn't work, which I've reported here: http://caml.inria.fr/mantis/view.php?id=4861 Thanks to Andres and Markus for their help. It's taken 3 days in total to deal with all the ocaml and non-ocaml issues with Snow Leopard - time I got back to some work now :-) And next time a new OS X comes out, I'll buy a copy and put it on the shelf for a few months! Cheers, John