<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Sep 11, 2009, at 11:31 AM, Brad Howes wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Sep 11, 2009, at 1:50 PM, Bill Janssen wrote:<br><br><blockquote type="cite">I was happy to see that Python 2.5 still shipped with SL, but now I'm<br></blockquote><blockquote type="cite">less happy. I can't seem to compile PIL for Python 2.5 on Snow Leopard.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The problem is that when I build and install libjpeg or libpng, it<br></blockquote><blockquote type="cite">builds 64-bit libraries, but Python 2.5 is 32-bit, so the libraries<br></blockquote><blockquote type="cite">don't work when PIL tries to use them. You get an error message<br></blockquote><blockquote type="cite">something like this:<br></blockquote><br><br>Can you try recompiling with "-arch i386 -arch x86_64" options in the CFLAGS? I think I had gotten this to work for some other libraries when I ran into the dreaded linking problem. You might instead need to do CC="gcc -arch..." if the configure tool munges the CFLAGS too much.<br><br> % CFLAGS="-arch i386 -arch x86_64" ./configure ...<br><br>or<br><br> % CC="gcc -arch..." ./configure ...<br><br>Brad<br><br>-- <br>Brad Howes<br>Group 42<br>MIT Lincoln Laboratory • 244 Wood St. • Lexington, MA 02173<br>Phone: 781.981.5292 • Fax: 781.981.3495 • Secretary: 781.981.7420</div></blockquote><br></div><div>It sounds like the core issue here is that the compiler now builds x86_64 binaries by default on SL. Everything that builds directly through distutils should know to build all the correct architectures, but dependent projects that use standard Makefiles may need to be told to compile 32-bit.</div><div><br></div><div>Though I haven't tried to build PIL myself, I have built libjpeg and libpng before, and setting CC while running configure as suggested by Brad did work for me.</div><div><br></div><div>This is an unfortunate side-effect of the transition to full 64-bit computing in Mac OS X, and trying to maintain 32-bit compatibility at the same time.</div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Monaco; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Monaco" size="3" style="font: normal normal normal 12px/normal Monaco; ">--------------------------------------------------------------------------</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Monaco" size="3" style="font: normal normal normal 12px/normal Monaco; ">Edward Moy</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Monaco" size="3" style="font: normal normal normal 12px/normal Monaco; ">Apple Inc.</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Monaco" size="3" style="font: normal normal normal 12px/normal Monaco; "><a href="mailto:emoy@apple.com">emoy@apple.com</a></font></p></div></span>
</div>
<br></body></html>