Linker warnings with latest Xcode

Asked by Karl Moskowski

I just updated to the latest version of Xcode (3.2.2, part of the iPhone/iPad SDK ), and I started getting linker warnings when building Sparkle.

The warnings happen for the relaunch tool target. I get two for each built architecture:
  Directory '/Users/karl/Projects/build/Debug' following -L not found
  Directory '/Users/karl/Projects/build/Debug' following -F not found

The build log shows this command:
Ld "/Users/karl/Projects/build/Sparkle.build/Debug/relaunch tool.build/Objects-normal/ppc/relaunch" normal ppc
cd /Users/karl/Desktop/Sparkle
setenv MACOSX_DEPLOYMENT_TARGET 10.4
/Developer/usr/bin/gcc-4.2 -arch ppc -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/karl/Projects/build/Debug -L/Users/karl/Desktop/Sparkle -F/Users/karl/Projects/build/Debug -filelist "/Users/karl/Projects/build/Sparkle.build/Debug/relaunch tool.build/Objects-normal/ppc/relaunch.LinkFileList" -mmacosx-version-min=10.4 -framework AppKit -o "/Users/karl/Projects/build/Sparkle.build/Debug/relaunch tool.build/Objects-normal/ppc/relaunch"

I've checked the build settings for both the relaunch tool target and the Sparkle project, and nothing seems amiss.

Since they're just warnings and everything seems to build OK, I don't think it warrants a bug report. Are they really harmless? Any ideas on how to suppress them?

Question information

Language:
English Edit question
Status:
Solved
For:
Sparkle Edit question
Assignee:
No assignee Edit question
Solved by:
Karl Moskowski
Solved:
Last query:
Last reply:

This question was reopened

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

Thanks for the heads-up, Karl. Those -L and -F flags seem to actually be unnecessary, at least as far as I can tell. Removed in 19ae850.

Revision history for this message
Karl Moskowski (kolpanic-deactivatedaccount) said :
#2

Thanks, Andy. I forgot to check the xcconfig files.

Revision history for this message
Karl Moskowski (kolpanic-deactivatedaccount) said :
#3

Thanks Andy Matuschak, that solved my question.

Revision history for this message
Karl Moskowski (kolpanic-deactivatedaccount) said :
#4

Sorry, Andy. I'm still getting the same warnings. I'm using a fresh copy of latest Sparkle source that omits the config lines you noted. It happens when building any target that builds the relaunch tool, in any config.

I'm using Xcode 3.2.2 on SL 10.6.3 (if that matters).

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

Very odd. I can't reproduce that. Clean build? Clear caches?

Revision history for this message
Karl Moskowski (kolpanic-deactivatedaccount) said :
#6

Yes, trashed the build folder and clear the PCH caches. It happens on both my work iMac and MBP at home, both fully updated. I just tried it in a brand new user account with completely default settings, and it still happened there.

Both use the iPhone SDK with Xcode 3.2.2 released a couple of weeks ago. I haven't tried it on a machine with the Mac-only version.

Revision history for this message
Hofman (cmhofman) said :
#7

As a first remark about reproducibility, this kind of problems also depend on the Xcode pref settings for the build location.

Karl, what does the Framework Search Paths build setting for the relaunch tool target say? And when you updated the Sparkle source, did you quit and relaunch Xcode (that's still necessary for dependency related changes unfortunately.)

Revision history for this message
Karl Moskowski (kolpanic-deactivatedaccount) said :
#8

The Framework and Library Search Paths build settings for both the relaunch tool target and the whole project are blank.

My Xcode settings have always been to use a shared build products location. However, the warnings also happen when using a newly-created admin user account leaving Xcode's default settings (including building in the project directory).

Here's a step-by-step:
1. Create a new admin user. Log in as that user.
2. Open Terminal and git clone git://github.com/andymatuschak/Sparkle.git.
3. Open Xcode to go through the setup assistant. Set it to use the All-in-one layout.
4. Open Sparkle.xcodeproj and build.

I'm trying to set up another Mac, this time with the non-iPhone SDK version of Xcode 3.2.2, to see if there's any difference.

Revision history for this message
Karl Moskowski (kolpanic-deactivatedaccount) said :
#9

Well, there goes that idea. I erased, installed & updated Snow Leopard and Xcode 3.2.2. With all Xcode settings left at their defaults, I still get the same warnings.

I'll post something to the xcode-users list to see if anyone can offer any insight.

Revision history for this message
Karl Moskowski (kolpanic-deactivatedaccount) said :
#10

OK, this doesn't seem to be Sparkle-specific.

I think I've narrowed it down to the Build Active Architecture Only flag in the project's build settings. When it's checked, all is well. When it's unchecked, I get the warnings. In Sparkle, it's unchecked for all Debug & Release configs. However, in a newly-created Xcode project, it's checked in the Debug config by default, and unchecked in the Release.

If you create a new Command Line Tool (Type: Foundation) in Xcode, and immediately build the Debug config, there are no warnings. However, building the Release config generates the warnings.

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

Oh! So an Xcode beta problem? Thanks for doing the detective work here, Karl.

Revision history for this message
Karl Moskowski (kolpanic-deactivatedaccount) said :
#12

Marking this as solved.