* Building a universal binary on OS X? @ 2008-05-19 13:07 Alan Schmitt 2008-05-23 8:41 ` [Caml-list] " Alan Schmitt 0 siblings, 1 reply; 7+ messages in thread From: Alan Schmitt @ 2008-05-19 13:07 UTC (permalink / raw) To: caml-list [-- Attachment #1: Type: text/plain, Size: 244 bytes --] Hello, Is this (http://alan.petitepomme.net/cwn/2007.09.18.html#1) the recommended way to build a universal binary on OS X? (To summarize: use a PPC version of ocamlopt and use lipo to glue the binaries together.) Thanks, Alan Schmitt [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 186 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Caml-list] Building a universal binary on OS X? 2008-05-19 13:07 Building a universal binary on OS X? Alan Schmitt @ 2008-05-23 8:41 ` Alan Schmitt 2008-05-24 7:31 ` Michel Schinz 0 siblings, 1 reply; 7+ messages in thread From: Alan Schmitt @ 2008-05-23 8:41 UTC (permalink / raw) To: caml-list [-- Attachment #1.1: Type: text/plain, Size: 1418 bytes --] On 19 mai 08, at 15:07, Alan Schmitt wrote: > Hello, > > Is this (http://alan.petitepomme.net/cwn/2007.09.18.html#1) the > recommended way to build a universal binary on OS X? (To summarize: > use a PPC version of ocamlopt and use lipo to glue the binaries > together.) I've realized I may not have given enough details as to what I want to do here, so here they are. My goal is to be able to compile the OS GUI version of Unison on a single machine. Right now, using my intel-based notebook, I'm able to compile a version that runs both on 10.4 and 10.5, but only on intel. (By the way, compiling ocaml to manage this was not obvious. Here is how to do it using godi, thanks to Gerd Stolpmann: - net the following in godi.conf OCAML_CONF_ARGS=-cc "gcc -mmacosx-version-min=10.4" - rebuild godi-ocaml-src and godi-ocaml Then I can specify in Xcode that I'm targetting 10.4 as my minimum version, and I don't get any error when linking against the ocaml libraries.) The next step is to be able to build Universal Binaries versions of the ocaml libraries, so that I can tell Xcode to target both architectures. This implies that ocaml should be able to cross-compile to PPC, which I don't know if it can do. I think I remember an old message addressing this, but I have not been able to find it. If anyone could point me to the right direction, it would be very helpful. Thanks, Alan [-- Attachment #1.2: Type: text/html, Size: 1892 bytes --] [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 186 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building a universal binary on OS X? 2008-05-23 8:41 ` [Caml-list] " Alan Schmitt @ 2008-05-24 7:31 ` Michel Schinz 2008-05-25 7:53 ` [Caml-list] " Alan Schmitt ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Michel Schinz @ 2008-05-24 7:31 UTC (permalink / raw) To: caml-list Alan Schmitt <alan.schmitt@polytechnique.org> writes: [...] > My goal is to be able to compile the OS GUI version of Unison on a > single machine. Right now, using my intel-based notebook, I'm able to > compile a version that runs both on 10.4 and 10.5, but only on intel. [...] > I think I remember an old message addressing this, but I have not been > able to find it. You might be referring to this message: http://thread.gmane.org/gmane.comp.lang.caml.general/38930 The cute trick consists in building a PPC version of OCaml on a PPC machine, and then copying it over to your Intel machine. It will run fine (albeit slowly) under Rosetta, and generate PPC executables. Michel. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Caml-list] Re: Building a universal binary on OS X? 2008-05-24 7:31 ` Michel Schinz @ 2008-05-25 7:53 ` Alan Schmitt 2008-05-25 11:39 ` Andres Varon 2008-05-26 4:43 ` Nathaniel Gray 2 siblings, 0 replies; 7+ messages in thread From: Alan Schmitt @ 2008-05-25 7:53 UTC (permalink / raw) To: caml-list [-- Attachment #1.1: Type: text/plain, Size: 993 bytes --] On 24 mai 08, at 09:31, Michel Schinz wrote: >> My goal is to be able to compile the OS GUI version of Unison on a >> single machine. Right now, using my intel-based notebook, I'm able to >> compile a version that runs both on 10.4 and 10.5, but only on intel. > > [...] > >> I think I remember an old message addressing this, but I have not >> been >> able to find it. > > You might be referring to this message: > > http://thread.gmane.org/gmane.comp.lang.caml.general/38930 > > The cute trick consists in building a PPC version of OCaml on a PPC > machine, and then copying it over to your Intel machine. It will run > fine (albeit slowly) under Rosetta, and generate PPC executables. Ah, thank you, this seems to be it. Just one small additional question about this: where should I put the supporting libraries (the ocaml directory with libunix.a for instance), and how can I make sure the ppc version of ocamlopt find these libraries, and not the i386 ones? Thanks again, Alan [-- Attachment #1.2: Type: text/html, Size: 1536 bytes --] [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 186 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Caml-list] Re: Building a universal binary on OS X? 2008-05-24 7:31 ` Michel Schinz 2008-05-25 7:53 ` [Caml-list] " Alan Schmitt @ 2008-05-25 11:39 ` Andres Varon 2008-05-26 4:43 ` Nathaniel Gray 2 siblings, 0 replies; 7+ messages in thread From: Andres Varon @ 2008-05-25 11:39 UTC (permalink / raw) To: Michel Schinz; +Cc: caml-list On May 24, 2008, at 3:31 AM, Michel Schinz wrote: > Alan Schmitt <alan.schmitt@polytechnique.org> writes: > > [...] > >> My goal is to be able to compile the OS GUI version of Unison on a >> single machine. Right now, using my intel-based notebook, I'm able to >> compile a version that runs both on 10.4 and 10.5, but only on intel. > > [...] > >> I think I remember an old message addressing this, but I have not >> been >> able to find it. > > You might be referring to this message: > > http://thread.gmane.org/gmane.comp.lang.caml.general/38930 > > The cute trick consists in building a PPC version of OCaml on a PPC > machine, and then copying it over to your Intel machine. It will run > fine (albeit slowly) under Rosetta, and generate PPC executables. Actually you can cross compile it in your intel mac, this is what I use to configure it: ./configure -cc "gcc -mmacosx-version-min=10.4 -arch ppc -isysroot / Developer/SDKs/MacOSX10.4u.sdk" -prefix /opt/ocaml/3.10.2/tiger/ppc - host powerpc-apple-darwin8.11.0 Then use the standard make world; make opt; .... Andres > > > Michel. > > _______________________________________________ > 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Caml-list] Re: Building a universal binary on OS X? 2008-05-24 7:31 ` Michel Schinz 2008-05-25 7:53 ` [Caml-list] " Alan Schmitt 2008-05-25 11:39 ` Andres Varon @ 2008-05-26 4:43 ` Nathaniel Gray 2008-05-26 5:18 ` Alan Schmitt 2 siblings, 1 reply; 7+ messages in thread From: Nathaniel Gray @ 2008-05-26 4:43 UTC (permalink / raw) To: Michel Schinz; +Cc: caml-list On Sat, May 24, 2008 at 12:31 AM, Michel Schinz <Michel.Schinz@epfl.ch> wrote: > Alan Schmitt <alan.schmitt@polytechnique.org> writes: > > [...] > >> My goal is to be able to compile the OS GUI version of Unison on a >> single machine. Right now, using my intel-based notebook, I'm able to >> compile a version that runs both on 10.4 and 10.5, but only on intel. > > [...] > >> I think I remember an old message addressing this, but I have not been >> able to find it. > > You might be referring to this message: > > http://thread.gmane.org/gmane.comp.lang.caml.general/38930 > > The cute trick consists in building a PPC version of OCaml on a PPC > machine, and then copying it over to your Intel machine. It will run > fine (albeit slowly) under Rosetta, and generate PPC executables. See also: http://caml.inria.fr/mantis/bug_view_advanced_page.php?bug_id=4303 Cheers, -n8 -- >>>-- Nathaniel Gray -- Caltech Computer Science ------> >>>-- Mojave Project -- http://mojave.cs.caltech.edu --> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Caml-list] Re: Building a universal binary on OS X? 2008-05-26 4:43 ` Nathaniel Gray @ 2008-05-26 5:18 ` Alan Schmitt 0 siblings, 0 replies; 7+ messages in thread From: Alan Schmitt @ 2008-05-26 5:18 UTC (permalink / raw) To: caml-list [-- Attachment #1.1: Type: text/plain, Size: 362 bytes --] On 26 mai 08, at 06:43, Nathaniel Gray wrote: > See also: > http://caml.inria.fr/mantis/bug_view_advanced_page.php?bug_id=4303 Thanks. Unfortunately Xavier Leroy said there "What you will never have, however, is a single OCaml compiler executable that can generate code for several target architectures.". Which is exactly what I was dreaming of :( Alan [-- Attachment #1.2: Type: text/html, Size: 695 bytes --] [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 186 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-05-26 5:18 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-05-19 13:07 Building a universal binary on OS X? Alan Schmitt 2008-05-23 8:41 ` [Caml-list] " Alan Schmitt 2008-05-24 7:31 ` Michel Schinz 2008-05-25 7:53 ` [Caml-list] " Alan Schmitt 2008-05-25 11:39 ` Andres Varon 2008-05-26 4:43 ` Nathaniel Gray 2008-05-26 5:18 ` Alan Schmitt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox