[Unison-hackers] XCode expert needed

Alan Schmitt alan.schmitt at polytechnique.org
Fri Mar 21 15:41:38 EDT 2008


Hello,

As you may know, there is currently a somewhat random bug in the OS X  
GUI that typically exhibits itself as:
Uncaught exception: *** -[NSCFArray objectAtIndex:] index(0) beyond  
bounds (0)

I'm think it's something related to initialization order, as changing  
binaries sometimes fixes it. But it's still a bug, and I've found  
someone who can reproduce it and who is ready to help us try to debug  
it.

The main problem is that I don't know XCode well enough (read: at all)  
to guide him. My current issue is that building with XCode fails  
because it cannot find the path to the caml include file. Building  
with xcodebuild, as done in the Makefile, does work:

schmitta at charm uimacnew % xcodebuild OCAMLLIBDIR="/Users/schmitta/godi/ 
lib/ocaml/std-lib"
=== BUILDING NATIVE TARGET uimac WITH THE DEFAULT CONFIGURATION  
(Default) ===

Checking Dependencies...

CompileC build/uimac.build/Default/uimac.build/Objects-normal/i386/ 
main.o /Users/schmitta/src/unison/branches/2.27/src/uimacnew/main.m  
normal i386 objective-c com.apple.compilers.gcc.4_0
     cd /Users/schmitta/src/unison/branches/2.27/src/uimacnew
     /Developer/usr/bin/gcc-4.0 -x objective-c -arch i386 -pipe -Wno- 
trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -fmessage- 
length=0 -fvisibility=hidden -gdwarf-2 -I/Users/schmitta/src/unison/ 
branches/2.27/src/uimacnew/build/uimac.build/Default/uimac.build/ 
Unison.hmap -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F/ 
Users/schmitta/src/unison/branches/2.27/src/uimacnew/build/Default -F/ 
Users/schmitta/src/unison/branches/2.27/src/uimacnew -I/Users/schmitta/ 
src/unison/branches/2.27/src/uimacnew/build/Default/include -I/Users/ 
schmitta/godi/lib/ocaml/std-lib -I/Users/schmitta/src/unison/branches/ 
2.27/src/uimacnew/build/uimac.build/Default/uimac.build/DerivedSources  
-c /Users/schmitta/src/unison/branches/2.27/src/uimacnew/main.m -o / 
Users/schmitta/src/unison/branches/2.27/src/uimacnew/build/uimac.build/ 
Default/uimac.build/Objects-normal/i386/main.o

As you can see, somehow, the -I/Users/schmitta/godi/lib/ocaml/std-lib  
is passed to the compiler.

My questions are:
- how can I set OCAMLLIBDIR in the XCode interface to make it able to  
build?
- where is the black magic that adds this path to the building?
- does someone know how to extend the XCode project to include a phase  
that figures out what this path is (as in the Makefile)?

The first question is crucial, as it is the first step to do some  
debugging of the GUI, which is something I really want to be able to  
do ;-)

Thanks for any help with this,

Alan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.seas.upenn.edu/pipermail/unison-hackers/attachments/20080321/21054903/PGP-0001.sig


More information about the Unison-hackers mailing list