<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On May 28, 2006, at 1:07 AM, chris clepper wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">On 5/27/06, <B class="gmail_sendername">Hans-Christoph Steiner</B> &lt;<A href="mailto:hans@eds.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">hans@eds.org</A>&gt; wrote:<DIV><SPAN class="gmail_quote"> </SPAN><BLOCKQUOTE class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <BR>On May 28, 2006, at 12:22 AM, Miller Puckette wrote:<BR><BR>&gt; Yep... I thought 'imac' meant 'intel-mac' but I guess it doesn't.<BR>&gt;<BR>&gt; Anyway, I think that if someone wants to publish an extern that works <BR> &gt; on either mips or i86 macs, they would have to include both<BR>&gt; "dylib"s...<BR>&gt; unless there's a way to make a fat dylib with binaries for both<BR>&gt; architectures.<BR><BR>Apple provides two mechanisms for this, one is fat binaries, which <BR>have been supported since NeXTSTEP 3.2 (Mac OS X 10.4 == NeXTSTEP<BR>6.4), and the other is Rosetta, which runs PPC code in emulation.<BR>NeXTSTEP/Apple uses gcc for everything, so building fat binaries is<BR>just a matter of figuring out the gcc options. </BLOCKQUOTE><DIV><BR>A fat binary only solves the executable problem.  The externals are just as much a headache to deal with as the Pd app - maybe more.<BR></DIV></DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>If its just a matter of giving some flags to gcc, which I think it is, then it would be _much_ easier to add those flags to the relevant makefiles than to deal with a new file extension.</DIV><BR><BLOCKQUOTE type="cite"><DIV><DIV>The catch with Rosetta is that you cannot load a PPC lib into an Intel application or vice versa.  This is going to become slightly tricky to make sure people get the proper OSX externals that match their CPU type. <BR><BR>I don't think fat dylibs exist -it would be a useful thing to have though.  <BR></DIV></DIV></BLOCKQUOTE></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I think fat dylibs do exist (from a Slashdot thread):</DIV><DIV><A href="http://apple.slashdot.org/article.pl?sid=05/08/24/2114232">http://apple.slashdot.org/article.pl?sid=05/08/24/2114232</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">OS X 10.4 uses fat binaries. For example, Apple recently botched a security update by failing to ship a fat binary for the BSD layer. This is what it's supposed to look like:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">    $ file /usr/lib/libSystem.B.dylib</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">    /usr/lib/libSystem.B.dylib: Mach-O fat file with 2 architectures</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">    /usr/lib/libSystem.B.dylib (for architecture ppc): Mach-O dynamically linked shared library ppc</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">    /usr/lib/libSystem.B.dylib (for architecture ppc64): Mach-O 64-bit dynamically linked shared library ppc64</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Apple's GCC has built-in support for fat binaries:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">    $ gcc -o hello hello.m -arch ppc -arch ppc64</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">    $ file hello</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">    hello: Mach-O fat file with 2 architectures</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">    hello (for architecture ppc): Mach-O executable ppc</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">    hello (for architecture ppc64): Mach-O 64-bit executable ppc64</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">If I had the right SDK installed, I could have added -arch i386. Building fat binaries with GCC and ICC will probably require the use of lipo(1).</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV>.hc<BR><DIV> <P style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">____________________________________________________________________________</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">"I have the audacity to believe that peoples everywhere can have three meals a day for their bodies, education and culture for their minds, and dignity, equality and freedom for their spirits." <SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><SPAN class="Apple-converted-space">                                            </SPAN>- Martin Luther King, Jr.</FONT></P>  </DIV><BR></BODY></HTML>