Build errors in current bzr checkout

Asked by Chad Sellers

I just checked out the current code from bzr (revno 258). I don't want to change anything, but my app uses garbage collection, so I wanted to rebuild with GC support (per lp question #36785). I opened the project in XCode and tried to build, but I get 24 build errors (below). It looks like it can't find a bunch of #defines. Do I need to do anything special to a checkout in order to build it?

Thanks,
Chad

/Users/chad/Code/sparkle/SUUpdater.m:85: error: 'SUEnableAutomaticChecksKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:98: error: 'SUEnableAutomaticChecksKeyOld' undeclared (first use in this function)
Users/chad/Code/sparkle/SUUpdater.m:102: error: 'SUHasLaunchedBeforeKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:146: error: 'SULastCheckTimeKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:189: error: 'SUScheduledCheckIntervalKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:190: error: 'SUEnableAutomaticChecksKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:199: error: 'SUScheduledCheckIntervalKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:200: error: 'SUEnableAutomaticChecksKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:213: error: 'SUEnableAutomaticChecksKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:215: error: 'SUScheduledCheckIntervalKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:233: error: 'SUEnableAutomaticChecksKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:240: error: 'SUEnableAutomaticChecksKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:251: error: 'SUAllowsAutomaticUpdatesKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:255: error: 'SUExpectsDSASignatureKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:259: error: 'SUAutomaticallyUpdateKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:267: error: 'SUFeedURLKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:273: error: 'SUFeedURLKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:287: error: 'SUSendProfileInfoKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:310: error: 'SUScheduledCheckIntervalKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUUpdater.m:317: error: 'SUScheduledCheckIntervalKey' undeclared (first use in this function)
/Users/chad/Code/sparkle/build/Sparkle.build/Debug/Sparkle.build/Objects-normal/x86_64/SUPlainInstallerInternals.o
/Users/chad/Code/sparkle/SUPlainInstallerInternals.m: In function '+[SUPlainInstaller(Internals) _copyPathWithForcedAuthentication:toPath:error:]':
/Users/chad/Code/sparkle/SUPlainInstallerInternals.m:212: error: 'SUSparkleErrorDomain' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUPlainInstallerInternals.m:212: error: (Each undeclared identifier is reported only once
/Users/chad/Code/sparkle/SUPlainInstallerInternals.m:212: error: for each function it appears in.)
/Users/chad/Code/sparkle/SUPlainInstallerInternals.m:212: error: 'SUAuthenticationFailure' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUPlainInstallerInternals.m: In function '+[SUPlainInstaller(Internals) copyPathWithAuthentication:overPath:error:]':
/Users/chad/Code/sparkle/SUPlainInstallerInternals.m:229: error: 'SUSparkleErrorDomain' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUPlainInstallerInternals.m:229: error: 'SUFileCopyFailure' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUPlainInstallerInternals.m:212: error: 'SUSparkleErrorDomain' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUPlainInstallerInternals.m:212: error: 'SUAuthenticationFailure' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUPlainInstallerInternals.m:229: error: 'SUSparkleErrorDomain' undeclared (first use in this function)
/Users/chad/Code/sparkle/SUPlainInstallerInternals.m:229: error: 'SUFileCopyFailure' undeclared (first use in this function)

Question information

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

Oops! I forgot to tell the with-GC build configuration of Sparkle about the precompiled header. bzr pull and it should work in r260.

Revision history for this message
Chad Sellers (chad-usefulfruit) said :
#2

Did you push r260 yet? r258 still seems to be the latest on lp.

Revision history for this message
Chad Sellers (chad-usefulfruit) said :
#3

Also, I tried to build the non-GC configuration, but that failed as well (different error, though). I get the below error. It looks like you recently added some stripping to the relaunch-tool build, but the linker options seem wrong. You added "-u -r", but -u appears to take a parameter (namely, the symbol you require to be present). So, the linker seems to think "-r" is the symbol that must be present, and then fails. This is still on r258.

Thanks,
Chad

Ld "/Users/chad/Code/sparkle/build/Sparkle.build/Release/relaunch tool.build/Objects-normal/i386/relaunch" normal i386
    cd /Users/chad/Code/sparkle
    /Developer/usr/bin/gcc-4.0 -o "/Users/chad/Code/sparkle/build/Sparkle.build/Release/relaunch tool.build/Objects-normal/i386/relaunch" -L/Users/chad/Code/sparkle/build/Release -F/Users/chad/Code/sparkle/build/Release -filelist "/Users/chad/Code/sparkle/build/Sparkle.build/Release/relaunch tool.build/Objects-normal/i386/relaunch.LinkFileList" -framework AppKit -arch i386 -Wl,-x -Wl,-u,-r -mmacosx-version-min=10.4 -Wl,-dead_strip -isysroot /Developer/SDKs/MacOSX10.5.sdk
Undefined symbols:
  "-r", referenced from:
ld: symbol(s) not found
collect2: ld returned 1 exit status

Ld "/Users/chad/Code/sparkle/build/Sparkle.build/Release/relaunch tool.build/Objects-normal/ppc/relaunch" normal ppc
    cd /Users/chad/Code/sparkle
    /Developer/usr/bin/gcc-4.0 -o "/Users/chad/Code/sparkle/build/Sparkle.build/Release/relaunch tool.build/Objects-normal/ppc/relaunch" -L/Users/chad/Code/sparkle/build/Release -F/Users/chad/Code/sparkle/build/Release -filelist "/Users/chad/Code/sparkle/build/Sparkle.build/Release/relaunch tool.build/Objects-normal/ppc/relaunch.LinkFileList" -framework AppKit -arch ppc -Wl,-x -Wl,-u,-r -mmacosx-version-min=10.3 -Wl,-dead_strip -isysroot /Developer/SDKs/MacOSX10.5.sdk
Undefined symbols:
  "-r", referenced from:
ld: symbol(s) not found
collect2: ld returned 1 exit status
** BUILD FAILED **

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

Sorry having some locking issues. Finally pushed!

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

Was having some locking problems with bzr. Pushed now!

Revision history for this message
Chad Sellers (chad-usefulfruit) said :
#6

Thanks for pushing the GC fix to bzr. I still get the linker errors above. Are you not seeing the same?

Revision history for this message
tornado (joe-flexgames) said :
#7

Getting the same errors as Chad above with the latest pull.

Thanks.

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

I'm guessing this is happening because -r strips dynamic symbols from the binary, and relaunch is statically compiled, so there aren't any, and that's confusing it? That doesn't really totally make sense. Also, I can't get that error to happen for me, but I have a different OS version.

Please try r261 and let me know.

Revision history for this message
Chad Sellers (chad-usefulfruit) said :
#9

No, the build still fails with the below error. Looking a bit deeper into this, it seems like XCode is doing something I would not expect it do to. It's passing -u and -r (which you've defined as STRIPFLAGS in your XCode config) to the linker, and the linker is getting confused by those options (because they're strip options, not ld options). I don't know why XCode is passing STRIPFLAGS to ld (instead of to strip), but that appears to be the case (see -Wl,-u,-r below).

I'm surprised that this behavior isn't true on your system as well. What OS version are you using?

Ld /Users/chad/Code/sparkle/build/Sparkle.build/Release/Sparkle.build/Objects-normal/ppc/Sparkle normal ppc
    cd /Users/chad/Code/sparkle
    /Developer/usr/bin/gcc-4.0 -o /Users/chad/Code/sparkle/build/Sparkle.build/Release/Sparkle.build/Objects-normal/ppc/Sparkle -L/Users/chad/Code/sparkle/build/Release -F/Users/chad/Code/sparkle/build/Release -filelist /Users/chad/Code/sparkle/build/Sparkle.build/Release/Sparkle.build/Objects-normal/ppc/Sparkle.LinkFileList -framework Security -framework WebKit -framework IOKit -framework Foundation -framework AppKit -arch ppc -Wl,-single_module -compatibility_version 1.5 -current_version 1.5 -Wl,-x -Wl,-u,-r -install_name @loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle -dynamiclib -mmacosx-version-min=10.3 -Wl,-dead_strip -lcrypto -isysroot /Developer/SDKs/MacOSX10.5.sdk
Undefined symbols:
  "-r", referenced from:
ld: symbol(s) not found
collect2: ld returned 1 exit status
** BUILD FAILED **

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

I'm running something unreleased. This sounds like an Xcode bug, though. Try r263—I've been fiddling with more parameters! :)

Revision history for this message
tornado (joe-flexgames) said :
#11

r263 worked for me. Thanks for the help Andy.

-Joe

Revision history for this message
Chad Sellers (chad-usefulfruit) said :
#12

Yeah, looks like it was a bug in XCode 3.0. I upgraded to 3.1, and now rev 260 builds fine. rev 263 works fine as well. Thanks for the help.