Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / January 2006



Tip: Looking for answers? Try searching our database.

Cross compiling for PPC64

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Smith - 14 Jan 2006 20:20 GMT
I'm trying to port some software from normal os x (ppc 32 bit) to intel mac
and ppc64.
Intel mac porting worked just great but I have some problems with ppc64.

I think the market for ppc64 binaries is quite small but since it's not much
work then why not.

The problem is that linking does not work with the frameworks:

g++ temp/Darwin/rtw.o -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch
ppc64 -framework Cocoa -framework IOKit -o
temp/Darwin/libl.dylib -static-libgcc -dynamiclib -exported_symbols_list
macosx_exports.txt -install_name libl.dylib -Wl,-single_module

can't resolve symbols:

 _CFDataGetBytes, referenced from:

     __ZNa in rtw.o

 _CFRelease, referenced from:

     __ZNb in tw.o

These linker errors are just some of the symbols which are not resolved. All
come from the framework switch.

Does it mean the frameworks are not ported to 64 bit or what?
Paul Russell - 14 Jan 2006 20:45 GMT
> I'm trying to port some software from normal os x (ppc 32 bit) to intel mac
> and ppc64.
[quoted text clipped - 24 lines]
>
> Does it mean the frameworks are not ported to 64 bit or what?

Yes, the vast majority of frameworks (including Cocoa) are still 32 bit
only.

Use otool -fv to see which dylibs contain ppc64 code. I think it's just
libSystem, libm and maybe a couple of others.

Paul
Eric Albert - 14 Jan 2006 21:51 GMT
> Yes, the vast majority of frameworks (including Cocoa) are still 32 bit
> only.
>
> Use otool -fv to see which dylibs contain ppc64 code. I think it's just
> libSystem, libm and maybe a couple of others.

You can also use 'file' for this.  And in addition to libSystem (which
includes libm), the Accelerate framework works for ppc64.

-Eric

Signature

Eric Albert         ejalbert@cs.stanford.edu
http://outofcheese.org/

Chris Hanson - 15 Jan 2006 02:24 GMT
>> Yes, the vast majority of frameworks (including Cocoa) are still 32 bit only.
>>
[quoted text clipped - 3 lines]
> You can also use 'file' for this.  And in addition to libSystem (which
> includes libm), the Accelerate framework works for ppc64.

Also the CPlusTest unit testing framework in Xcode 2.1 and later,
though not the CPlusTestRig unit testing rig.

To write unit tests for ppc64 code you'll need to build a command-line
tool that gets the default test suite and runs the tests within it, and
compile your tests and the code under test into that (referred to as
"independent tests" in the Unit Testing Guide).  You can't build a
bundle containing ppc64 unit tests and run the tests in it with
CPlusTestRig.

 -- Chris
John Smith - 15 Jan 2006 21:09 GMT
> Yes, the vast majority of frameworks (including Cocoa) are still 32 bit
> only.
>
> Use otool -fv to see which dylibs contain ppc64 code. I think it's just
> libSystem, libm and maybe a couple of others.

Thanks for the notice. In other words Apple does not believe in ppc64.
Otherwise they would have ported it long time ago. Facts are that ppc64
(which includes all G5's I think) has been deployed for much longer then
Intel mac's has. Yet there is full support for Intel mac.
Paul Russell - 15 Jan 2006 21:44 GMT
> Thanks for the notice. In other words Apple does not believe in ppc64.
> Otherwise they would have ported it long time ago. Facts are that ppc64
> (which includes all G5's I think) has been deployed for much longer then
> Intel mac's has. Yet there is full support for Intel mac.

I suspect that the decision to move to Intel effectively killed off the
nascent ppc64 development efforts at Apple. And sadly this means that a
full 64 bit OS X is now some years further away than it might otherwise
have been.

Paul
Uli Kusterer - 15 Jan 2006 22:53 GMT
> > Yes, the vast majority of frameworks (including Cocoa) are still 32 bit
> > only.
[quoted text clipped - 6 lines]
> (which includes all G5's I think) has been deployed for much longer then
> Intel mac's has. Yet there is full support for Intel mac.

Actually,

the reasoning Apple developers gave at the time was that they simply
didn't see a benefit for end-user applications to go 64-bit. The main
reason Apple supports 64-bit computing is to get into the scientific
market, where they need huge number-crunching (not as in "long long",
but as in "lots of numbers" that take GBs of RAM just to load). In those
cases it's rare that they use anything else than command-line tools,
simply because every single bit of performance in doing such huge
calculations (which may take weeks to complete) counts.

There never was an announcement I'm aware of that claimed they would
move the whole GUI and everything 64-bit. In fact, there are tech-notes
around somewhere that explain how to have a GUI written in 32-bit and a
64-bit tool doing the actual number-crunching or huge data processing
talk with one another correctly.

Paul Russell wrote:
> I suspect that the decision to move to Intel effectively killed off the
> nascent ppc64 development efforts at Apple. And sadly this means that a
> full 64 bit OS X is now some years further away than it might otherwise
> have been.

I wouldn't be that pessimistic. It looks like Apple is waiting for
64-bit Intel chips to come out that have the characteristics they want,
before they'll update the "pro" line (in hardware). That's why there's
no PowerMac yet. After all, Apple would become the laughingstock of the
industry if it had to move the PowerMac back down to 32-bit now.

(The Powerbook was stuck with 32-bit anyway, so there it's not a
problem, and the iMac was consumer to begin with, so the downgrade from
G5 will probably only annoy people that Apple didn't want buying that
machine anyway...)

But since those chips aren't far off, I'd guess Apple are continuing
their 64-bit efforts on schedule. But you're right in that they'll now
be aimed at Intel, not at the PPC platform, in all likelihood. Though I
haven't heard anything about Apple having any short-term plans of making
Cocoa or Carbon 64-bit. Long-term seems certain, unless 64-bit goes out
of fashion, but that doesn't seem likely at this point.

But then again, I'm a software developer so take my hardware-related
knowledge with a grain of salt.

Cheers,
-- Uli
http://www.zathras.de
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.