Version française
Home     About     Download     Resources     Contact us    
Browse thread
Compiling OCaml under OS X 10.6
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Andres Varon <avaron@g...>
Subject: Re: [Caml-list] Compiling OCaml under OS X 10.6

--Apple-Mail-14-907291511
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=us-ascii;
	format=flowed;
	delsp=yes


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?


>
> Another question: Can I build a version of OCaml from these sources  
> which isn't 64-bit so I can build code which will run on 10.5/10.4?


Previous versions of gcc in Mac OS X allowed you to pass the -mmacosx- 
version-min=10.4 option to target the minimum API that you wanted to  
support. I suppose this still works with the gcc 4.2.1 included in  
XCode 3.2, but haven't tried it yet.

Andres

>
> Cheers,
>
> -- 
> John Whitington
> Coherent Graphics Ltd
> http://www.coherentpdf.com/
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs


--Apple-Mail-14-907291511
Content-Disposition: attachment;
	filename=smime.p7s
Content-Type: application/pkcs7-signature;
	name=smime.p7s
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGITCCAtow
ggJDoAMCAQICEGY+Bf6qAwcBFBounT7yWmkwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx
JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ
ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA5MDUyNjE4MDIyMVoXDTEwMDUyNjE4MDIy
MVowQjEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEfMB0GCSqGSIb3DQEJARYQYXZh
cm9uQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK+rXO0o/JdBHF02
rrhZc5o01eDfO/NaVb4kdsM81q9btoqx84ugqkResipOs8A6YMlogW99YGqdgYB0eWed5Nn7vj+t
bScAUBIk5qs7unTe92/5nP7+esX7ZgwZxvbGbRLYtOeczCwh610c5h4LhYoq4+9ik+zpwW4LsbfV
PcAPUegpNxLhEGa92yYiPcoON4rjlN1//Jf3ENmZ/kDcpjNuchuVIDRA3f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