build error within xcode

Asked by King Kovifor

I am attempting to get a preliminary Sparkle implementation into my application as I really want to use this. :) I have followed the "basics" tutorial posted on the sparkle site and can't seem to get it right. I added the build phrase and all that, but building fails with this error:

    cd /Users/Jeremy/Documents/Apps/Unfuddler2
    /Developer/usr/bin/gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/Jeremy/Documents/Apps/Unfuddler2/build/Debug -F/Users/Jeremy/Documents/Apps/Unfuddler2/build/Debug -F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks -F/Users/Jeremy/Documents/Apps/Unfuddler2 -filelist /Users/Jeremy/Documents/Apps/Unfuddler2/build/Unfuddler.build/Debug/Unfuddler.build/Objects-normal/i386/Unfuddler.LinkFileList -mmacosx-version-min=10.5 -framework Cocoa -framework WebKit -framework Sparkle-with-GC -o /Users/Jeremy/Documents/Apps/Unfuddler2/build/Debug/Unfuddler.app/Contents/MacOS/Unfuddler
ld: framework not found Sparkle-with-GC
collect2: ld returned 1 exit status
 ld: framework not found Sparkle-with-GC
 collect2: ld returned 1 exit status

Question information

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

Looks like you're trying to use the Sparkle-with-GC framework, but it's confused because that's not *really* its name. If you want to use GC, try renaming Sparkle-with-GC.framework to Sparkle.framework and using that. Let me know if it works!

Revision history for this message
King Kovifor (jdentel91) said :
#2

Yeah, I am. The linked framework or the actual .framework file? And does it matter where I have this file located?

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

Soooo, it actually turns out that the Sparkle-with-GC.framework I shipped with the .zip doesn't have GC on anyway because I am a total failure. Haven't had time to repackage things yet, but if you grab the latest code (see http://andymatuschak.org/articles/2008/06/01/a-guide-to-contributing-to-sparkle/) and compile with the GC build configuration, it should produce a Sparkle.framework you can actually use.

Revision history for this message
King Kovifor (jdentel91) said :
#4

This shows up in the console:

warning: Unable to read symbols for "@executable_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle" (file not found).
Program loaded.
sharedlibrary apply-load-rules all
run
[Switching to process 4997 local thread 0x2f1b]
Running…
dyld: Library not loaded: @executable_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle
  Referenced from: /Users/Jeremy/Documents/Apps/Unfuddler2/build/Debug/Unfuddler.app/Contents/MacOS/Unfuddler
  Reason: image not found
warning: Couldn't find minimal bounds for "_sigtramp" - backtraces may be unreliable
(gdb)

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

Well, that's confusing. Looks like the framework isn't getting installed in the right place? But then when GDB loads, looks like *your* app isn't being found, either? Maybe some weird project configurations?

Try a bzr pull (I just made the GC support work, I hope) and then a clean build. If it still fails, make sure you've got a build phase for copying the Sparkle framework into your product.

Revision history for this message
King Kovifor (jdentel91) said :
#6

I have done both of those, cleaned my application, and added a copy files build phrase. Still has the same error. I seem to have this problem with ALL custom frameworks and I have no idea way...

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

Hm. Definitely a build phase problem. Send me your project, if you can.

Revision history for this message
King Kovifor (jdentel91) said :
#8

OK, what's your email?

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

<email address hidden>

Revision history for this message
King Kovifor (jdentel91) said :
#10

Sending now.

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

I'm missing some kind of tango icon theme whojawhotsit which would let me compile it, but I can tell you right now what your problem is:

You've got a "Copy Files" phase, but it's set to copy the enclosed files to the Resources folder. Sparkle's not a resource—it's a framework! Changing that to the Frameworks destination is an important step of the installation. That's probably your problem with other frameworks too.

In the future, these kinds of problems can be diagnosed by opening up the build product and examining where the files inside are put. You'd expect there to be a Contents/Frameworks folder with Foo.framework inside for whatever external project you're using.

Revision history for this message
King Kovifor (jdentel91) said :
#12

I could have sworn I switched that. :) Now to get it changed sooner or later to actually test and check it. And maybe add a preference for the time of this. :)