Discussion:
[Skim-app-develop] Building skim
Philippe Sismondi
2010-02-22 02:35:33 UTC
Permalink
I am quite new to both xcode and subversion, so please bear with me as I learn.

I checked out the skim app trunk and tried to build it. This did not succeed; I spent quite a bit of time trying to figure out why.

Eventually I checked out the trunk again and it built fine.

The difference was that the first time my checked out version was here:

/Users/Philippe/software/skim-app (this failed to build)

whereas the second time the checked out version was here:

/Users/Philippe/skim-app (this worked)

In other words, the success of the build seems to depend on the project directory's location being right under my home directory.

Is that expected? Is there something I should be learning about subversion or xcode builds that will explain this effect? I am in the process of reading the xcode build guide but have not finished it yet.

Best,

- Philippe -
Adam R. Maxwell
2010-02-22 02:50:07 UTC
Permalink
Post by Philippe Sismondi
I am quite new to both xcode and subversion, so please bear with me as I learn.
I checked out the skim app trunk and tried to build it. This did not succeed; I spent quite a bit of time trying to figure out why.
Eventually I checked out the trunk again and it built fine.
/Users/Philippe/software/skim-app (this failed to build)
/Users/Philippe/skim-app (this worked)
In other words, the success of the build seems to depend on the project directory's location being right under my home directory.
Without seeing the failure messages in the build transcript, there's no way to know what went wrong. However, I have skim sources in ~/build/skim and it's always worked fine, so it certainly doesn't have to be under your home directory.
Philippe Sismondi
2010-02-22 03:16:41 UTC
Permalink
Post by Adam R. Maxwell
Post by Philippe Sismondi
I am quite new to both xcode and subversion, so please bear with me as I learn.
I checked out the skim app trunk and tried to build it. This did not succeed; I spent quite a bit of time trying to figure out why.
Eventually I checked out the trunk again and it built fine.
/Users/Philippe/software/skim-app (this failed to build)
/Users/Philippe/skim-app (this worked)
In other words, the success of the build seems to depend on the project directory's location being right under my home directory.
Without seeing the failure messages in the build transcript, there's no way to know what went wrong. However, I have skim sources in ~/build/skim and it's always worked fine, so it certainly doesn't have to be under your home directory.
Ok. I'll start with the first error. It seems to be having a problem finding a header file. This build is of Skim as checked out, i.e. I have done no changes to anything. As I said, it does not do this when I build the version just under my home directory. Here is the transcript:

CompileC build/SkimImporter.build/Debug/SkimImporter.build/Objects-normal/i386/GetMetadataForFile.o GetMetadataForFile.m normal i386 objective-c com.apple.compilers.gcc.4_2
cd "/Users/David/Software Development/Skim-app/trunk/SkimImporter"
setenv LANG en_US.US-ASCII
/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wmissing-braces -Wunused-variable -Wsign-compare -DDEBUG -isysroot /Developer/SDKs/MacOSX10.5.sdk -mfix-and-continue -mmacosx-version-min=10.5 -gdwarf-2 -iquote "/Users/David/Software Development/Skim-app/trunk/SkimImporter/build/SkimImporter.build/Debug/SkimImporter.build/SkimImporter-generated-files.hmap" "-I/Users/David/Software Development/Skim-app/trunk/SkimImporter/build/SkimImporter.build/Debug/SkimImporter.build/SkimImporter-own-target-headers.hmap" "-I/Users/David/Software Development/Skim-app/trunk/SkimImporter/build/SkimImporter.build/Debug/SkimImporter.build/SkimImporter-all-target-headers.hmap" -iquote "/Users/David/Software Development/Skim-app/trunk/SkimImporter/build/SkimImporter.build/Debug/SkimImporter.build/SkimImporter-project-headers.hmap" -Wfloat-equal "-F/Users/David/Software Development/Skim-app/trunk/SkimImporter/build/Debug" -F/Users/David/Software -FDevelopment/Skim-app/trunk/SkimImporter/../SkimNotes/build/Debug "-I/Users/David/Software Development/Skim-app/trunk/SkimImporter/build/Debug/include" "-I/Users/David/Software Development/Skim-app/trunk/SkimImporter/build/SkimImporter.build/Debug/SkimImporter.build/DerivedSources/i386" "-I/Users/David/Software Development/Skim-app/trunk/SkimImporter/build/SkimImporter.build/Debug/SkimImporter.build/DerivedSources" -c "/Users/David/Software Development/Skim-app/trunk/SkimImporter/GetMetadataForFile.m" -o "/Users/David/Software Development/Skim-app/trunk/SkimImporter/build/SkimImporter.build/Debug/SkimImporter.build/Objects-normal/i386/GetMetadataForFile.o"

/Users/David/Software Development/Skim-app/trunk/SkimImporter/GetMetadataForFile.m:43:40: error: SkimNotesBase/SkimNotesBase.h: No such file or directory
/Users/David/Software Development/Skim-app/trunk/SkimImporter/GetMetadataForFile.m: In function 'GetMetadataForFile':
/Users/David/Software Development/Skim-app/trunk/SkimImporter/GetMetadataForFile.m:91: warning: 'NSFileManager' may not respond to '-readSkimNotesFromSkimFileAtURL:error:'
/Users/David/Software Development/Skim-app/trunk/SkimImporter/GetMetadataForFile.m:91: warning: (Messages without a matching method signature
/Users/David/Software Development/Skim-app/trunk/SkimImporter/GetMetadataForFile.m:91: warning: will be assumed to return 'id' and accept
/Users/David/Software Development/Skim-app/trunk/SkimImporter/GetMetadataForFile.m:91: warning: '...' as arguments.)
/Users/David/Software Development/Skim-app/trunk/SkimImporter/GetMetadataForFile.m:94: warning: 'NSFileManager' may not respond to '-readSkimNotesFromPDFBundleAtURL:error:'
/Users/David/Software Development/Skim-app/trunk/SkimImporter/GetMetadataForFile.m:101: warning: 'NSFileManager' may not respond to '-bundledFileWithExtension:inPDFBundleAtPath:error:'
Adam R. Maxwell
2010-02-22 03:22:41 UTC
Permalink
Try setting Xcode to use a separate location for build products and intermediate files; this keeps them from polluting your source directory, and also ensures that frameworks are found. This is in Xcode's preferences, under the Building pane.
Philippe Sismondi
2010-02-22 03:35:12 UTC
Permalink
Post by Adam R. Maxwell
Try setting Xcode to use a separate location for build products and intermediate files; this keeps them from polluting your source directory, and also ensures that frameworks are found. This is in Xcode's preferences, under the Building pane.
I created new directories for both build products and intermediate products (for the main skim project only). I did a clean and tried building, but got the same error.

- Phil -
Christiaan Hofman
2010-02-22 11:20:13 UTC
Permalink
Post by Philippe Sismondi
Post by Adam R. Maxwell
Try setting Xcode to use a separate location for build products and intermediate files; this keeps them from polluting your source directory, and also ensures that frameworks are found. This is in Xcode's preferences, under the Building pane.
I created new directories for both build products and intermediate products (for the main skim project only). I did a clean and tried building, but got the same error.
- Phil -
And did you change the Xcode preferences accordingly?

Also, you should close and reopen the Skim project after doing this, because Xcode caches lots of stuff and gets confused.

Apart from that, I find it strange you get this error, because the projects are set up to build with any xcode pref settings. Are you using the latest xcode 3.2.1?

Christiaan
Christiaan Hofman
2010-02-22 13:40:40 UTC
Permalink
Post by Philippe Sismondi
Ok. I'll start with the first error. It seems to be having a problem
finding a header file. This build is of Skim as checked out, i.e. I have
done no changes to anything. As I said, it does not do this when I build the
Try setting Xcode to use a separate location for build products and
intermediate files; this keeps them from polluting your source directory,
and also ensures that frameworks are found. This is in Xcode's preferences,
under the Building pane.
I created new directories for both build products and intermediate products
(for the main skim project only). I did a clean and tried building, but got
the same error.
- Phil -
And did you change the Xcode preferences accordingly?
Also, you should close and reopen the Skim project after doing this,
because Xcode caches lots of stuff and gets confused.
Apart from that, I find it strange you get this error, because the projects
are set up to build with any xcode pref settings. Are you using the latest
xcode 3.2.1?
Christiaan
I have no problem building Skim with the default Xcode prefs. But it is
essential to close and open the project files in Xcode after you've changed
any of the relevant locations.

Christiaan
Philippe Sismondi
2010-02-22 14:52:59 UTC
Permalink
I think I may have found a clue, although I am not certain.

The location that Skim *failed* to build in was this:

"/Users/Philippe/Software Development/Skim-App/...."

Note the space in the path. As an old-timer I have a suspicion about file/directory names with spaces in them. So I renamed the directory "Software Developement" to be "Software-Development", and Skim builds fine with no changes to build locations etc.

So something in the Skim build is getting confused by a path with a space.

Is this likely? Is this something I should have known about in using xcode? Maybe one of you guys could try to grab Skim from subversion into a sub-directory with spaces in the name and see if a fresh build fails.

- Phil -
Adam R. Maxwell
2010-02-22 15:06:53 UTC
Permalink
Post by Philippe Sismondi
Is this likely? Is this something I should have known about in using xcode? Maybe one of you guys could try to grab Skim from subversion into a sub-directory with spaces in the name and see if a fresh build fails.
Xcode itself doesn't care about spaces. You might try looking at the transcript to see where it fails; it's likely a shell script with an unquoted path.
Christiaan Hofman
2010-02-22 15:15:24 UTC
Permalink
Post by Adam R. Maxwell
Post by Philippe Sismondi
Is this likely? Is this something I should have known about in using xcode? Maybe one of you guys could try to grab Skim from subversion into a sub-directory with spaces in the name and see if a fresh build fails.
Xcode itself doesn't care about spaces. You might try looking at the transcript to see where it fails; it's likely a shell script with an unquoted path.
Actually, it does indeed seem to be Xcode not properly escaping the spaces. The messages Philippe posted show some very weird escapes due to the spaces in the gcc command that was used. For instance, the following fragment right after -Wfloat-equal:

"-F/Users/David/Software Development/Skim-app/trunk/SkimImporter/build/Debug" -F/Users/David/Software -FDevelopment/Skim-app/trunk/SkimImporter/../SkimNotes/build/Debug

should have been:

-F"/Users/David/Software Development/Skim-app/trunk/SkimImporter/build/Debug" -F"/Users/David/Software Development/Skim-app/trunk/SkimImporter/../SkimNotes/build/Debug"

Note the placements of the double-quotes and the extra inserted -F.

I'll file a radar.

Christiaan

Loading...