PDA

View Full Version : SnowLeopard 64bit application not running.




amudham
Apr 15, 2009, 07:34 AM
Hi,
I am new to Mac development, currently handling a transition of 32 bit Mac application to support both 32 and 64 bit arch.

I am using XCode3.0 to build x86_64 arch. I am successful in building the application, But When I run the application in "Snow Leopard (Build 10A190)"
getting an error "Cannot execute binary file".

I confirmed, application is x86_64 bit arch by file command.

Can anyone guess whats the issue...?

Thanks in advance.



robbieduncan
Apr 15, 2009, 07:41 AM
We can't really discuss Snow Leopard here: it's covered by a NDA which you are theoretically breaking by posting this. The only thing I can think of is that you don't have a 64-bit CPU. What is your CPU as reported in About this Mac?

garethlewis2
Apr 15, 2009, 08:02 AM
As long as no mention of how Snow Leopard works is posted, nobody breaks the NDA. On the other hand, if you start explaining how OpenCL is implemented and want to use it, then you are breaking the NDA.

gibbz
Apr 15, 2009, 08:05 AM
We can't really discuss Snow Leopard here: it's covered by a NDA which you are theoretically breaking by posting this.

It would be nice if this thought were consistent when talking about the iPhone OS 3.0 beta.

robbieduncan
Apr 15, 2009, 08:07 AM
It would be nice if this thought were consistent when talking about the iPhone OS 3.0 beta.

Yes, it certainly would, but this is moving rapidly off-topic!

amudham
Apr 15, 2009, 08:43 AM
We can't really discuss Snow Leopard here: it's covered by a NDA which you are theoretically breaking by posting this. The only thing I can think of is that you don't have a 64-bit CPU. What is your CPU as reported in About this Mac?

Here is my About this Mac Info...

Hardware Overview:

Model Name: iMac
Model Identifier: iMac7,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 4 MB
Memory: 1 GB
Bus Speed: 800 MHz
Boot ROM Version: IM71.007A.B03
SMC Version: 1.20f4
Serial Number: W873114KX85

robbieduncan
Apr 15, 2009, 08:49 AM
Here is my About this Mac Info...

Well you have a 64-bit CPU. Can you build a simple, stand-alone executable in 64-bit mode? Something like Hello World?

amudham
Apr 15, 2009, 08:59 AM
Well you have a 64-bit CPU. Can you build a simple, stand-alone executable in 64-bit mode? Something like Hello World?

Hello World.. works fine.

robbieduncan
Apr 15, 2009, 09:00 AM
Hello World.. works fine.

Hmm, OK so we have established that your machine will happily compile and run 64-bit code. Does the application you have built link against any non-built-in libraries or frameworks? If so are they 64-bit?

amudham
Apr 15, 2009, 09:04 AM
Hmm, OK so we have established that your machine will happily compile and run 64-bit code. Does the application you have built link against any non-built-in libraries or frameworks? If so are they 64-bit?

Yes, the application uses non-build-in libraries and yes, they too build for 64 bit.

robbieduncan
Apr 15, 2009, 09:06 AM
Yes, the application uses non-build-in libraries and yes, they too build for 64 bit.

Then I'm out of suggestions...

amudham
Apr 15, 2009, 09:09 AM
Then I'm out of suggestions...

Tel me one thing.. is that true, we need all libraries as well to be build for 64? in order to run in 64bit arch?

Catfish_Man
Apr 15, 2009, 09:14 AM
Yes it is. All code in your address space (libraries, app, plugins) needs to be the same architecture.

robbieduncan
Apr 15, 2009, 09:17 AM
Yes it is. All code in your address space (libraries, app, plugins) needs to be the same architecture.

Yes all libraries linked to the main executable must be 64-bit for the executable to launch (this is true for statically linked or dynamically linked libraries and frameworks). Plugins are different: a 32-bit plugin will fail to load when the main executable tries to load it, it should not prevent the main executable launching.

amudham
Apr 15, 2009, 11:08 AM
Yes it is. All code in your address space (libraries, app, plugins) needs to be the same architecture.

ok Thanks!

Yes all libraries linked to the main executable must be 64-bit for the executable to launch (this is true for statically linked or dynamically linked libraries and frameworks). Plugins are different: a 32-bit plugin will fail to load when the main executable tries to load it, it should not prevent the main executable launching.

Thanks for your time!!!