"wrong architecture" error...

Asked by AllanMarcus

Hello,

I have just installed the sparkle framework into my app. I added the framework to Link Frameworks. I added the menu item and I linked the menu item to my updater class, which is and SUUpdater. I can compile, but I build and run, I get the following error:

dyld: Library not loaded: @loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle
  Referenced from: /Users/allan/Documents/Xcode/AppManager/build/Debug/AppManager.app/Contents/MacOS/AppManager
  Reason: no suitable image found. Did find:
 /Library/Frameworks/Sparkle.framework/Versions/A/Sparkle: mach-o, but wrong architecture

I'm on a PPC. My build settings are:

Standard (32-bit universal)
SDK: 10.5
Build Active Arct. Only: Yes

Any ideas?

Question information

Language:
English Edit question
Status:
Solved
For:
Sparkle Edit question
Assignee:
No assignee Edit question
Solved by:
AllanMarcus
Solved:
Last query:
Last reply:
Revision history for this message
AllanMarcus (allanm) said :
#1

forgot to say, I'm on 10.5 using Xcode 3.1.5

Revision history for this message
AllanMarcus (allanm) said :
#2

oops, 3.1.2, not 3.1.5

Revision history for this message
Andy Matuschak (andymatuschak) said :
#3

That error means that Sparkle.framework is not built for PPC, which is odd because my distributions of it are built three-way. Did you build your copy of Sparkle.framework yourself? What version of Sparkle are you using? Please run the UNIX command "file" on the Sparkle framework image and tell me what architectures it's built for.

Revision history for this message
AllanMarcus (allanm) said :
#4

Allan's G5:Sparkle.framework allan$ file Sparkle
Sparkle: Mach-O universal binary with 3 architectures
Sparkle (for architecture ppc): Mach-O dynamically linked shared library ppc
Sparkle (for architecture i386): Mach-O dynamically linked shared library i386
Sparkle (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64

Revision history for this message
Andy Matuschak (andymatuschak) said :
#5

Oh. Then are you maybe building for ppc_64? Run file on your own app's image.

Revision history for this message
AllanMarcus (allanm) said :
#6

Here's exactly what I can do to reproduce the issue:

1) Downloaded Sparkle 1.5b6
2) Open Xcode
3) Create a new Project: Application: AppleScript Application
4) Build and Run (to verify that it works)
5) Quit the NewApplication
6) Drag the Sparkle.framework folder from the Sparkle 1.5b6 folder on top of the Linked Frameworks folder in my Xcode project.
7) Build and run. At this point I see the error in the Xcode console.

Hope this helps. Maybe there is something I need to set in my project?

Thanks,

Allan

Revision history for this message
Andy Matuschak (andymatuschak) said :
#7

If your project (and the Applescript Application) default is to build for your active architecture only, and you're on a G5, then that would be the problem. Could you run file on your app's image for me?

Revision history for this message
AllanMarcus (allanm) said :
#8

Hi Andy,

Is this what you mean?

file /Users/allan/Documents/Xcode/test/build/Debug/test.app/Contents/MacOS/test
/Users/allan/Documents/Xcode/test/build/Debug/test.app/Contents/MacOS/test: Mach-O executable ppc

Revision history for this message
Andy Matuschak (andymatuschak) said :
#9

Yes, that's what I meant, but it's not the output I expected. With that output, it should work fine.

Hm. When I repeat your procedure, it works fine. But of course, I'm on an Intel machine. In fact, when I force Xcode to build a PPC executable, it still works fine.

What version of Sparkle are you using? My tests have been with 1.5b6.

Revision history for this message
AllanMarcus (allanm) said :
#10

Whoops! I figured it out!

I thought that I had added the copy files in the build phase, but I guess I didn't. I'm so sorry to have wasted your time. My app compiles now. Let me finish and make sure it all works, then I'll come back here and close this issue.

Thanks again,

Allan

Revision history for this message
AllanMarcus (allanm) said :
#11

ok, it's all working!

Awesome framework.

Thanks, and sorry again for the time waster.