caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Building OSX Universal Binaries
@ 2007-01-07  0:25 Nicolas Cannasse
  2007-01-07 12:33 ` [Caml-list] " Daniel Bünzli
  0 siblings, 1 reply; 10+ messages in thread
From: Nicolas Cannasse @ 2007-01-07  0:25 UTC (permalink / raw)
  To: caml-list

Hello,

I'm regularly making OSX releases of the haXe compiler (http://haxe.org)
which is written in OCaml, but since I only have a Mac Intel, I didn't
find a way to produce a PPC version of the compiler.

I would be interested in building OSX Universal Binaries using ocamlopt.
Did anybody found a way to do that ?

Best,
Nicolas


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Building OSX Universal Binaries
  2007-01-07  0:25 Building OSX Universal Binaries Nicolas Cannasse
@ 2007-01-07 12:33 ` Daniel Bünzli
  2007-01-15 21:33   ` Corey O'Connor
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Bünzli @ 2007-01-07 12:33 UTC (permalink / raw)
  To: caml-list


Le 7 janv. 07 à 01:25, Nicolas Cannasse a écrit :

> I would be interested in building OSX Universal Binaries using  
> ocamlopt.
> Did anybody found a way to do that ?

The only way I see is to have access to both a ppc and intel machine  
an join the executables with the command line tool lipo.
Maybe a wish to directly produce universal binaries should go in the  
bugtracker.

Best,

Daniel


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Building OSX Universal Binaries
  2007-01-07 12:33 ` [Caml-list] " Daniel Bünzli
@ 2007-01-15 21:33   ` Corey O'Connor
  2007-01-15 22:13     ` Daniel Bünzli
  0 siblings, 1 reply; 10+ messages in thread
From: Corey O'Connor @ 2007-01-15 21:33 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 794 bytes --]

On 1/7/07, Daniel Bünzli <daniel.buenzli@epfl.ch> wrote:
>
>
> Le 7 janv. 07 à 01:25, Nicolas Cannasse a écrit :
>
> > I would be interested in building OSX Universal Binaries using
> > ocamlopt.
> > Did anybody found a way to do that ?
>
> The only way I see is to have access to both a ppc and intel machine
> an join the executables with the command line tool lipo.
> Maybe a wish to directly produce universal binaries should go in the
> bugtracker.



I don't think you need access to both a ppc and intel machine: Just an intel
machine would suffice. Two separate installs of ocaml, One PPC and one
Intel, then using some appropriate PATH variable magic to  switch between
compiling with one vs the other. Then lipo at the end. Should work OK.

-- 
-Corey O'Connor

[-- Attachment #2: Type: text/html, Size: 1100 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Building OSX Universal Binaries
  2007-01-15 21:33   ` Corey O'Connor
@ 2007-01-15 22:13     ` Daniel Bünzli
  2007-01-16  1:24       ` Corey O'Connor
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Bünzli @ 2007-01-15 22:13 UTC (permalink / raw)
  To: caml-list


Le 15 janv. 07 à 22:33, Corey O'Connor a écrit :

> I don't think you need access to both a ppc and intel machine: Just  
> an intel machine would suffice. Two separate installs of ocaml, One  
> PPC and one Intel, then using some appropriate PATH variable magic  
> to  switch between compiling with one vs the other. Then lipo at  
> the end. Should work OK.

Maybe, then I guess a ppc machine would also be enough. Do you happen  
to know how to trick caml's ./configure ?

Note that I still think caml should, in the end, generate universal  
binaries directly, even though I have no real idea about what it  
means with respect to cmxa and friends and how much ocaml compiler  
surgery you'd need. Maybe it is not worth the effort.

Best,

Daniel



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Building OSX Universal Binaries
  2007-01-15 22:13     ` Daniel Bünzli
@ 2007-01-16  1:24       ` Corey O'Connor
  2007-01-16  7:58         ` Philippe Wang
  0 siblings, 1 reply; 10+ messages in thread
From: Corey O'Connor @ 2007-01-16  1:24 UTC (permalink / raw)
  To: Daniel Bünzli; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 894 bytes --]

On 1/15/07, Daniel Bünzli <daniel.buenzli@epfl.ch> wrote:
>
>
> Le 15 janv. 07 à 22:33, Corey O'Connor a écrit :
>
> > I don't think you need access to both a ppc and intel machine: Just
> > an intel machine would suffice. Two separate installs of ocaml, One
> > PPC and one Intel, then using some appropriate PATH variable magic
> > to  switch between compiling with one vs the other. Then lipo at
> > the end. Should work OK.
>
> Maybe, then I guess a ppc machine would also be enough. Do you happen
> to know how to trick caml's ./configure ?


I don't think a ppc machine would be enough since a ppc mac cannot run x86
programs but a x86 mac can run both ppc and x86 programs.
Not sure how to trick configure either. I've done this process before with
Haskell programs, but in that case used pre-built binaries of the compiler
for each platform.

-- 
-Corey O'Connor

[-- Attachment #2: Type: text/html, Size: 1244 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Building OSX Universal Binaries
  2007-01-16  1:24       ` Corey O'Connor
@ 2007-01-16  7:58         ` Philippe Wang
  2007-01-16 17:48           ` Corey O'Connor
  0 siblings, 1 reply; 10+ messages in thread
From: Philippe Wang @ 2007-01-16  7:58 UTC (permalink / raw)
  To: Corey O'Connor; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]


On 16 janv. 07, at 02:24, Corey O'Connor wrote:

>
>
> On 1/15/07, Daniel Bünzli <daniel.buenzli@epfl.ch> wrote:
>
> Le 15 janv. 07 à 22:33, Corey O'Connor a écrit :
>
> > I don't think you need access to both a ppc and intel machine: Just
> > an intel machine would suffice. Two separate installs of ocaml, One
> > PPC and one Intel, then using some appropriate PATH variable magic
> > to  switch between compiling with one vs the other. Then lipo at
> > the end. Should work OK.
>
> Maybe, then I guess a ppc machine would also be enough. Do you happen
> to know how to trick caml's ./configure ?
>
> I don't think a ppc machine would be enough since a ppc mac cannot  
> run x86 programs but a x86 mac can run both ppc and x86 programs.
> Not sure how to trick configure either. I've done this process  
> before with Haskell programs, but in that case used pre-built  
> binaries of the compiler for each platform.

However, ocamlopt can be configured to produce x86 asm on a PPC,  
can't it ?
And XCode can build universal binaries on both ppc and x86...
So I guess you just need to call gcc with the right parameters...

(I'll try when I have time...)

--
Philippe Wang

[-- Attachment #2: Type: text/html, Size: 1837 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Building OSX Universal Binaries
  2007-01-16  7:58         ` Philippe Wang
@ 2007-01-16 17:48           ` Corey O'Connor
  2007-01-29 23:01             ` James Woodyatt
  0 siblings, 1 reply; 10+ messages in thread
From: Corey O'Connor @ 2007-01-16 17:48 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]

On 1/15/07, Philippe Wang <lists@philippewang.info> wrote:
>
>
> On 16 janv. 07, at 02:24, Corey O'Connor wrote:
>
>
>
> On 1/15/07, Daniel Bünzli <daniel.buenzli@epfl.ch> wrote:
> >
> >
> > Le 15 janv. 07 à 22:33, Corey O'Connor a écrit :
> >
> > > I don't think you need access to both a ppc and intel machine: Just
> > > an intel machine would suffice. Two separate installs of ocaml, One
> > > PPC and one Intel, then using some appropriate PATH variable magic
> > > to  switch between compiling with one vs the other. Then lipo at
> > > the end. Should work OK.
> >
> > Maybe, then I guess a ppc machine would also be enough. Do you happen
> > to know how to trick caml's ./configure ?
>
>
> I don't think a ppc machine would be enough since a ppc mac cannot run x86
> programs but a x86 mac can run both ppc and x86 programs.
> Not sure how to trick configure either. I've done this process before with
> Haskell programs, but in that case used pre-built binaries of the compiler
> for each platform.
>
>
> However, ocamlopt can be configured to produce x86 asm on a PPC, can't it
> ?
> And XCode can build universal binaries on both ppc and x86...
> So I guess you just need to call gcc with the right parameters...
>


Actually, I have no idea. That'd be great if it did.

-- 
-Corey O'Connor

[-- Attachment #2: Type: text/html, Size: 2180 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Building OSX Universal Binaries
  2007-01-16 17:48           ` Corey O'Connor
@ 2007-01-29 23:01             ` James Woodyatt
  2007-01-30 18:40               ` Philippe Wang
  0 siblings, 1 reply; 10+ messages in thread
From: James Woodyatt @ 2007-01-29 23:01 UTC (permalink / raw)
  To: Corey O'Connor, caml-list

On Jan 16, 2007, at 09:48, Corey O'Connor wrote:
> On 1/15/07, Philippe Wang <lists@philippewang.info> wrote:
>>
>> However, ocamlopt can be configured to produce x86 asm on a PPC,  
>> can't it ?
>> And XCode can build universal binaries on both ppc and x86...
>> So I guess you just need to call gcc with the right parameters...
>
> Actually, I have no idea. That'd be great if it did.

I haven't seen any easy way to configure OCaml as a crosstool.  The  
trick you would use here is to run the native PPC version of the  
OCaml compilers on x86 under Rosetta.  I don't know if this works,  
but I would expect it to work.  Be a pain in the neck, but it should  
work.


-- 
james woodyatt <jhw@apple.com>
member of technical staff
apple computer, inc.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Building OSX Universal Binaries
  2007-01-29 23:01             ` James Woodyatt
@ 2007-01-30 18:40               ` Philippe Wang
  2007-01-30 19:00                 ` Daniel Bünzli
  0 siblings, 1 reply; 10+ messages in thread
From: Philippe Wang @ 2007-01-30 18:40 UTC (permalink / raw)
  To: caml-list

James Woodyatt wrote:
> On Jan 16, 2007, at 09:48, Corey O'Connor wrote:
>> On 1/15/07, Philippe Wang <lists@philippewang.info> wrote:
>>>
>>> However, ocamlopt can be configured to produce x86 asm on a PPC, 
>>> can't it ?
>>> And XCode can build universal binaries on both ppc and x86...
>>> So I guess you just need to call gcc with the right parameters...
>>
>> Actually, I have no idea. That'd be great if it did.
>
> I haven't seen any easy way to configure OCaml as a crosstool.  The 
> trick you would use here is to run the native PPC version of the OCaml 
> compilers on x86 under Rosetta.  I don't know if this works, but I 
> would expect it to work.  Be a pain in the neck, but it should work.
>
>
> --james woodyatt <jhw@apple.com>
> member of technical staff
> apple computer, inc.
well, the one more trick to use should be to give the right option to 
gcc, which is called by ocamlopt...


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Building OSX Universal Binaries
  2007-01-30 18:40               ` Philippe Wang
@ 2007-01-30 19:00                 ` Daniel Bünzli
  0 siblings, 0 replies; 10+ messages in thread
From: Daniel Bünzli @ 2007-01-30 19:00 UTC (permalink / raw)
  To: Philippe Wang; +Cc: caml-list


Le 30 janv. 07 à 19:40, Philippe Wang a écrit :

> well, the one more trick to use should be to give the right option  
> to gcc, which is called by ocamlopt...

IIRC, gcc is used by ocamlopt to eat assembly language so you won't  
be able to trick it just by specifying some option.

Daniel


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-01-30 18:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-07  0:25 Building OSX Universal Binaries Nicolas Cannasse
2007-01-07 12:33 ` [Caml-list] " Daniel Bünzli
2007-01-15 21:33   ` Corey O'Connor
2007-01-15 22:13     ` Daniel Bünzli
2007-01-16  1:24       ` Corey O'Connor
2007-01-16  7:58         ` Philippe Wang
2007-01-16 17:48           ` Corey O'Connor
2007-01-29 23:01             ` James Woodyatt
2007-01-30 18:40               ` Philippe Wang
2007-01-30 19:00                 ` Daniel Bünzli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).