cocotron install adventures

21 views
Skip to first unread message

julian

unread,
Nov 11, 2007, 2:37:56 PM11/11/07
to Cocotron Developers
hello all
i'm trying to set up cocotron on an clean leopard install and am
having some troubles.
installation of InstallCDT-2007-10-10 went fine, so i checked out r57
of the frameworks, this is where the trouble begins - trying to build
Cocoa.xcodeproject yields:

cd /Users/julian/Downloads/cocotron/Foundation
/Developer/usr/bin/gcc-4.0 -x objective-c -arch i386 -pipe -Wno-
trigraphs -fpascal-strings -fasm-blocks -Os -fmessage-length=0 -I/
Users/julian/Documents/Development/_BUILD/_INTERMEDIATE/
Foundation.build/Deployment/Foundation-Windows-i386.build/
Foundation.hmap -F/Developer/Cocotron/1.0/build/Foundation/Windows/
Deployment -I/Developer/Cocotron/1.0/build/Foundation/Windows/
Deployment/include -I/Users/julian/Documents/Development/_BUILD/
_INTERMEDIATE/Foundation.build/Deployment/Foundation-Windows-
i386.build/DerivedSources -DFOUNDATION_INSIDE_BUILD -
DOBJC_INSIDE_BUILD -D__LITTLE_ENDIAN__ -c /Users/julian/Downloads/
cocotron/Foundation/NSObject/NSObject.m -o /Users/julian/Documents/
Development/_BUILD/_INTERMEDIATE/Foundation.build/Deployment/
Foundation-Windows-i386.build/Objects-normal/i386/NSObject.o
In file included from /usr/include/objc/objc-class.h:2,
from /Users/julian/Downloads/cocotron/Foundation/objc/
ObjCSelector.h:10,
from /Users/julian/Downloads/cocotron/Foundation/objc/
ObjCClass.h:11,
from /Users/julian/Downloads/cocotron/Foundation/
NSObject/NSObject.m:20:
/usr/include/objc/message.h:28: error: redefinition of 'struct
objc_super'
In file included from /Users/julian/Downloads/cocotron/Foundation/objc/
ObjCClass.h:11,
from /Users/julian/Downloads/cocotron/Foundation/
NSObject/NSObject.m:20:
/Users/julian/Downloads/cocotron/Foundation/objc/ObjCSelector.h:25:
warning: 'objc_method' is deprecated (declared at /usr/include/objc/
runtime.h:38)
In file included from /Users/julian/Downloads/cocotron/Foundation/
NSObject/NSObject.m:20:
/Users/julian/Downloads/cocotron/Foundation/objc/ObjCClass.h:21:
error: conflicting types for 'objc_getOrigClass'
/usr/include/objc/runtime.h:464: error: previous declaration of
'objc_getOrigClass' was here
/Users/julian/Downloads/cocotron/Foundation/objc/ObjCClass.h:24:
error: syntax error before '*' token
/Users/julian/Downloads/cocotron/Foundation/objc/ObjCClass.h:26:
warning: 'objc_method' is deprecated (declared at /usr/include/objc/
runtime.h:38)
from /Users/julian/Downloads/cocotron/Foundation/
NSObject/NSObject.m:20:
from /Users/julian/Downloads/cocotron/Foundation/
objc/ObjCClass.h:11,
from /Users/julian/Downloads/cocotron/Foundation/
objc/ObjCSelector.h:10,
In file included from /usr/include/objc/objc-class.h:2,
/usr/include/objc/message.h:28: error: redefinition of 'struct
objc_super'
from /Users/julian/Downloads/cocotron/Foundation/
NSObject/NSObject.m:20:
In file included from /Users/julian/Downloads/cocotron/Foundation/
objc/ObjCClass.h:11,
/Users/julian/Downloads/cocotron/Foundation/objc/ObjCSelector.h:25:
warning: 'objc_method' is deprecated (declared at /usr/include/objc/
runtime.h:38)
In file included from /Users/julian/Downloads/cocotron/Foundation/
NSObject/NSObject.m:20:
/Users/julian/Downloads/cocotron/Foundation/objc/ObjCClass.h:21:
error: conflicting types for 'objc_getOrigClass'
/usr/include/objc/runtime.h:464: error: previous declaration of
'objc_getOrigClass' was here
/Users/julian/Downloads/cocotron/Foundation/objc/ObjCClass.h:24:
error: syntax error before '*' token
/Users/julian/Downloads/cocotron/Foundation/objc/ObjCClass.h:26:
warning: 'objc_method' is deprecated (declared at /usr/include/objc/
runtime.h:38)


so i head over to Foundation.xcodeproj and add the cocotron folder to
the header search path, now i get:

Building target "Foundation-Windows-i386" of project "Foundation" with
configuration "Deployment" - (8 errors)
cd /Users/julian/Downloads/cocotron/Foundation
/Developer/usr/bin/gcc-4.0 -x objective-c -arch i386 -pipe -Wno-
trigraphs -fpascal-strings -fasm-blocks -Os -fmessage-length=0 -I/
Users/julian/Documents/Development/_BUILD/_INTERMEDIATE/
Foundation.build/Deployment/Foundation-Windows-i386.build/
Foundation.hmap -F/Developer/Cocotron/1.0/build/Foundation/Windows/
Deployment -I/Developer/Cocotron/1.0/build/Foundation/Windows/
Deployment/include -I/Users/julian/Downloads/cocotron -I/Users/julian/
Documents/Development/_BUILD/_INTERMEDIATE/Foundation.build/Deployment/
Foundation-Windows-i386.build/DerivedSources -DFOUNDATION_INSIDE_BUILD
-DOBJC_INSIDE_BUILD -D__LITTLE_ENDIAN__ -c /Users/julian/Downloads/
cocotron/Foundation/platform_win32/dllmain.m -o /Users/julian/
Documents/Development/_BUILD/_INTERMEDIATE/Foundation.build/Deployment/
Foundation-Windows-i386.build/Objects-normal/i386/dllmain.o
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
9:20: error: windows.h: No such file or directory
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
12: error: syntax error before 'handle'
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
14: error: syntax error before 'DllMain'
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
14: error: syntax error before 'handle'
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
In function 'DllMain':
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
16: error: 'reason' undeclared (first use in this function)
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
16: error: (Each undeclared identifier is reported only once
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
16: error: for each function it appears in.)
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
16: error: 'DLL_PROCESS_ATTACH' undeclared (first use in this
function)
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
17: error: 'handle' undeclared (first use in this function)
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
19: error: 'TRUE' undeclared (first use in this function)
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
9:20: error: windows.h: No such file or directory
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
12: error: syntax error before 'handle'
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
14: error: syntax error before 'DllMain'
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
14: error: syntax error before 'handle'
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
16: error: 'reason' undeclared (first use in this function)
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
16: error: 'DLL_PROCESS_ATTACH' undeclared (first use in this
function)
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
17: error: 'handle' undeclared (first use in this function)
/Users/julian/Downloads/cocotron/Foundation/platform_win32/dllmain.m:
19: error: 'TRUE' undeclared (first use in this function)
Build failed (8 errors)

and if i also add /Developer/Cocotron/1.0/PlatformInterfaces/i386-
mingw32msvc/include to the Header search paths the errors change to:

Building target "Foundation-Windows-i386" of project "Foundation" with
configuration "Deployment" - (11 errors)
cd /Users/julian/Downloads/cocotron/Foundation
/Developer/usr/bin/gcc-4.0 -x objective-c -arch i386 -pipe -Wno-
trigraphs -fpascal-strings -fasm-blocks -Os -fmessage-length=0 -I/
Users/julian/Documents/Development/_BUILD/_INTERMEDIATE/
Foundation.build/Deployment/Foundation-Windows-i386.build/
Foundation.hmap -F/Developer/Cocotron/1.0/build/Foundation/Windows/
Deployment -I/Developer/Cocotron/1.0/build/Foundation/Windows/
Deployment/include -I/Developer/Cocotron/1.0/PlatformInterfaces/i386-
mingw32msvc/include -I/Users/julian/Downloads/cocotron -I/Users/julian/
Documents/Development/_BUILD/_INTERMEDIATE/Foundation.build/Deployment/
Foundation-Windows-i386.build/DerivedSources -DFOUNDATION_INSIDE_BUILD
-DOBJC_INSIDE_BUILD -D__LITTLE_ENDIAN__ -c /Users/julian/Downloads/
cocotron/Foundation/NSAutoreleasePool/NSAutoreleasePool.m -o /Users/
julian/Documents/Development/_BUILD/_INTERMEDIATE/Foundation.build/
Deployment/Foundation-Windows-i386.build/Objects-normal/i386/
NSAutoreleasePool.o
In file included from /Users/julian/Downloads/cocotron/Foundation/
Foundation.h:11,
from /Users/julian/Downloads/cocotron/Foundation/
NSThread/NSThread-Private.h:9,
from /Users/julian/Downloads/cocotron/Foundation/
NSAutoreleasePool/NSAutoreleasePool.m:13:
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h: In function 'isalnum':
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h:143: error: '_imp____mb_cur_max_dll' undeclared (first use in
this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h:143: error: (Each undeclared identifier is reported only once
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h:143: error: for each function it appears in.)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h: In function 'isalpha':
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h:144: error: '_imp____mb_cur_max_dll' undeclared (first use in
this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h: In function 'iscntrl':
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h:145: error: '_imp____mb_cur_max_dll' undeclared (first use in
this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h: In function 'isdigit':
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h:146: error: '_imp____mb_cur_max_dll' undeclared (first use in
this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h: In function 'isgraph':
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h:147: error: '_imp____mb_cur_max_dll' undeclared (first use in
this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h: In function 'islower':
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h:148: error: '_imp____mb_cur_max_dll' undeclared (first use in
this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h: In function 'isprint':
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h:149: error: '_imp____mb_cur_max_dll' undeclared (first use in
this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h: In function 'ispunct':
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h:150: error: '_imp____mb_cur_max_dll' undeclared (first use in
this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h: In function 'isspace':
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h:151: error: '_imp____mb_cur_max_dll' undeclared (first use in
this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h: In function 'isupper':
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h:152: error: '_imp____mb_cur_max_dll' undeclared (first use in
this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h: In function 'isxdigit':
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/include/
ctype.h:153: error: '_imp____mb_cur_max_dll' undeclared (first use in
this function)
from /Users/julian/Downloads/cocotron/Foundation/
NSAutoreleasePool/NSAutoreleasePool.m:13:
from /Users/julian/Downloads/cocotron/Foundation/
NSThread/NSThread-Private.h:9,
In file included from /Users/julian/Downloads/cocotron/Foundation/
Foundation.h:11,
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/
include/ctype.h:143: error: '_imp____mb_cur_max_dll' undeclared (first
use in this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/
include/ctype.h:144: error: '_imp____mb_cur_max_dll' undeclared (first
use in this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/
include/ctype.h:145: error: '_imp____mb_cur_max_dll' undeclared (first
use in this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/
include/ctype.h:146: error: '_imp____mb_cur_max_dll' undeclared (first
use in this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/
include/ctype.h:147: error: '_imp____mb_cur_max_dll' undeclared (first
use in this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/
include/ctype.h:148: error: '_imp____mb_cur_max_dll' undeclared (first
use in this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/
include/ctype.h:149: error: '_imp____mb_cur_max_dll' undeclared (first
use in this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/
include/ctype.h:150: error: '_imp____mb_cur_max_dll' undeclared (first
use in this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/
include/ctype.h:151: error: '_imp____mb_cur_max_dll' undeclared (first
use in this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/
include/ctype.h:152: error: '_imp____mb_cur_max_dll' undeclared (first
use in this function)
/Developer/Cocotron/1.0/PlatformInterfaces/i386-mingw32msvc/
include/ctype.h:153: error: '_imp____mb_cur_max_dll' undeclared (first
use in this function)
Build failed (11 errors)


any ideas? ;-)

thanks, julian

Supreme Cocotron Committee

unread,
Nov 14, 2007, 6:51:26 PM11/14/07
to cocotr...@googlegroups.com
Hi Julian,

Your log indicates that Xcode is using the system gcc-4.0 instead of
the CDT cross-compiler. This means that Xcode is not recognizing the
installed cross-compiler and is caused by one or more things:

a) The compiler install quietly failed and there is no pbcompspec for Xcode

Make sure in: $HOME/Library/Application Support/Xcode/Specifications
There is:
Cocotron-1.0-Windows-i386-gcc-<version>.pbcompspec
and:
Cocotron-1.0-Windows-i386-gcc-default.pbcompspec

Where version is either 4.2.1 or 4.0.3

b) You installed gcc 4.2.1 cross-compiler but the 4.0.3 target is selected

If you installed 4.2.1, make sure the project's active target is _not_
the -gcc-4.0.3 one.

c) Xcode is not recognizing the pbcompspec's

Restarting Xcode might work, or rebooting

If that doesn't work, try moving the pbcompspec files to
/Library/Application Support/Xcode/Specifications

Hopefully this helps, let us know if these failed or worked. Once
Xcode is using the right compiler, it goes a little more smoothly.

Thanks,
Chris

Dave Sopchak

unread,
Nov 15, 2007, 12:22:24 PM11/15/07
to cocotr...@googlegroups.com
Hi Chris,
I have the same problem as Julian on Leopard (I think I also had it lately with Tiger).

I have the right pbcompspec files in XCode/Specifications (or so it seems)(Cocotron-1.0-Windows-i386-gcc-4.2.1.pbcompspec)

I used the InstallCDT-2007-10-10 after tossing the old pbcompspec files and the Cocotron folder in the /Developer folder.

Restarting, rebooting, didn't work. 

Any ideas, clean install instructions?

Dave

SCC

unread,
Nov 15, 2007, 2:19:57 PM11/15/07
to Cocotron Developers
Hi Dave, Julian,

If things continue not to work, try this:

- Delete ~/Library/Application Support/Xcode/Specifications/
Cocotron-1.0-Windows-i386-gcc-default.pbcompspec

- Edit ~/Library/Application Support/Xcode/Specifications/Cocotron-1.0-
Windows-i386-gcc-4.2.1.pbcompspec

And change:

Identifier = org.cocotron.1.0.windows.i386.gcc.4.2.1;

To:
Identifier = org.cocotron.1.0.windows.i386.gcc.default;

Restart Xcode and try again.

Also, what version of Xcode are you using?

Thanks,
Chris

Rolf

unread,
Nov 15, 2007, 2:49:28 PM11/15/07
to Cocotron Developers
I am still at OS X 10.4 and I do not know if the following
information is really helpful for OS X 10.5/Xcode 3.0. Anyway here it
goes.

I recently updated from Xcode 2.4.1 to Xcode 2.5. One of the main
changes of the latter one is that it shall be possible to use Xcode 3
and Xcode 2.5 installations side by side on the same machine. This
involved changing of the default locations for the various
specification files and template bundles.

In order to make Cocotron work with Xcode 2.5 on my machine, I needed
to move Cocotrons specification files from:

~/Library/Application Support/Xcode/Specifications

to:

~/Library/Application Support/Developer/Shared/Xcode/
Specifications


The same held for any custom templates. They needed to go to:

~/Library/Application Support/Developer/Shared/Xcode/Templates

The path ".../Shared/..." should be used for specs and templates which
can be used for Xcode 3.0 and Xcode 2.5, and there are special paths
if you have separate specs for either one. I cannot remember this
exactly, but for sure it is written in the documentation, which can be
downloaded from ADC.

Hopefully this helps

Best regards

Rolf

julian

unread,
Nov 15, 2007, 8:43:09 AM11/15/07
to Cocotron Developers
hello chris,

> Your log indicates that Xcode is using the system gcc-4.0 instead of
> the CDT cross-compiler. This means that Xcode is not recognizing the
> installed cross-compiler and is caused by one or more things:
>
> a) The compiler install quietly failed and there is no pbcompspec for Xcode
>
> Make sure in: $HOME/Library/Application Support/Xcode/Specifications
> There is:
> Cocotron-1.0-Windows-i386-gcc-<version>.pbcompspec
> and:
> Cocotron-1.0-Windows-i386-gcc-default.pbcompspec
>
> Where version is either 4.2.1 or 4.0.3

$ ls -la $HOME/Library/Application\ Support/Xcode/Specifications
total 24
drwxr-xr-x 5 julian staff 170 11 Nov 15:59 .
drwxr-xr-x 5 julian staff 170 15 Nov 14:30 ..
-rw-r--r-- 1 julian staff 3214 11 Nov 15:59 Cocotron-1.0-Windows-
i386-gcc-4.2.1.pbcompspec
-rw-r--r-- 1 julian staff 188 11 Nov 15:59 Cocotron-1.0-Windows-
i386-gcc-default.pbcompspec
-rw-r--r-- 1 julian staff 174 11 Nov 15:59 Cocotron-1.0-
Windows.pbfilespec


> b) You installed gcc 4.2.1 cross-compiler but the 4.0.3 target is selected
>
> If you installed 4.2.1, make sure the project's active target is _not_
> the -gcc-4.0.3 one.
actually i tried both targets of course, both yield the same
problem(s)

> c) Xcode is not recognizing the pbcompspec's
>
> Restarting Xcode might work, or rebooting
>
> If that doesn't work, try moving the pbcompspec files to
> /Library/Application Support/Xcode/Specifications
well i did restart the system and Xcode now several times now and also
moved the specifications to /Library as you suggested, and finally
copied them back so they are both in /Library/... and in ~/Library/..
but Xcode (3.0) doesn't seem to recognize this.

this idea is supported by the fact that the Target Info for Foundation-
Windows-i386->Rules show "using: Unknown compiler org.cocotron.
1.0.windows.i386.gcc.default"

> Hopefully this helps, let us know if these failed or worked. Once
> Xcode is using the right compiler, it goes a little more smoothly.

hm i don't know what i could try else. should i try installing Xcode
2.5 in addition to 3.0 and see if that helps?

thanks very much for your help,
julian

Rolf

unread,
Nov 15, 2007, 7:30:28 PM11/15/07
to Cocotron Developers
Julian,

Try the following command in Terminal:

ditto ~/Library/Application\ Support/Xcode ~/Library/Application\
Support/Developer/Shared/Xcode

Then restart Xcode.

Best regards

Rolf

julian

unread,
Nov 15, 2007, 3:31:01 PM11/15/07
to Cocotron Developers
thanks rolf, that did the trick on xcode 3.0 on 10.5 as well!

Dave Sopchak

unread,
Nov 16, 2007, 12:30:10 PM11/16/07
to cocotr...@googlegroups.com
Hey all,
For some reason I have ~/Application Support/Developer/3.0/XCode/ on
my machine (Leopard), not ~/Application Support/Developer/Shared,
but I put the stuff in the former directory and now I can compile the
frameworks...but I'm getting errors of "can't find windows.h" in
projects built against the Cocotron frameworks. Maybe a project
setting I need to update. Hmm...


Thanks for putting me on the right track, Rolf!

Dave

∞ | millenomi

unread,
Nov 16, 2007, 4:32:34 PM11/16/07
to Cocotron Developers


On 16 Nov, 01:30, Rolf <rolf.anr...@gmail.com> wrote:
> Julian,
>
> Try the following command in Terminal:
>
> ditto ~/Library/Application\ Support/Xcode ~/Library/Application\
> Support/Developer/Shared/Xcode
>
> Then restart Xcode.

I can confirm this makes Cocotron compile successfully with gcc 4.2.1
on 10.5.1 / Xcode 3.0 and the latest InstallCDT.

- ∞

Dave Sopchak

unread,
Nov 16, 2007, 7:31:30 PM11/16/07
to cocotr...@googlegroups.com
answered my own question...in the target build specs, just had to
switch from 4.0.3 to 4.2.1 gcc
Reply all
Reply to author
Forward
0 new messages