I answered my own silly question, I can just pick the Foundation
project and build that. I was a little confused by Xcode 4
This is just to confirm that I got the Cocotron Foundation cross-
compiling and working on FreeBSD 8.2
I also did a lot of work to try to get the AppKit to compile as well.
I hit a lot of project issues before finally coming to a "halt" when
it required CoreVideo to get much farther.
I'll paste my notes in here for anyone that may care to address this.
I have no idea if it was a known limitation before Xcode 4 or not (I
assume yes). One bit of the process became a bit hard to debug; as
the build was insisting on using the regular non-cross ld and I could
never figure out why. There were also some (to me) esoteric settings
I've created a test app and everything seems to be working great on
the target, although I haven't done anything "heavy duty" or any real
full tests.
=====================================
To create the FreeBSD platform, pull all: cp -R /lib, /usr/lib, /usr/
local/lib/ and cp -R /usr/include, /usr/local/include/ - no editing of
libs were necessary or anything as on Linux. Put the platform in the
i386-pc-freebsd7 (freebsd7 is meaningless even though I was using 8.2)
Run the InstallCDT's sudo ./install.sh FreeBSD i386
Download cocotron: hg clone
http://cocotron.googlecode.com/hg/
cocotron
Set up permissions correctly, sudo chown -R rcl /Developer/ (this
seemed to be Xcode4 thing.. I never had issues before)
Open Xcode
Open the cocotron/Cocotron/Cocotron.xcodeproj
Pick 'Scheme' as Foundation-FreeBSD-i386
Select Product -> Build
Now, Foundation is built successfully for FreeBSD.
(This 'scheme' thing was a bit confusing because it's different than
how things used to work in Xcode)
===============================
My AppKit attempt
Libs I think I need: (make sure when you build this you don't have
WITHOUT_X11=YES in your /etc/make.conf .. I know that sounds stupid
and obvious but it caused me a lot of grief.)
cd /usr/ports/print/freetype2 ; sudo make install clean
cd /usr/ports/graphics/libGL ; sudo make install clean
cd /usr/ports/X11/xlib ; sudo make install clean
cd /usr/ports/graphics/cairo ; sudo make install clean
Under the Onyx2D Project, for the Onyx2D-FreeBSD-i386 target, under
Linking -> Other Linker Flags -> Debug, --enable-auto-import is there.
Also remove --export-all-symbols from there. Also --out-implib ..
instead, just make it be -shared like it is for release. Then set
Perform Single-Object Prelink = YES (or else you get a -single_module
error on link)
Get up the AppKit FreeBSD project to use the correct compiler... and
for that project's "Header Search Path" it's wrong, it should point
to ..FreeBSD/i386/gcc-4.3.1/i386-pc-freebsd7/include insted of just
i386/include
Right before building, (or else Onyx2D won't link), move /Developer/
usr/bin/ld to /Developer/usr/bin/ld-real, then link ld to /Developer/
Coco../FreeBSD/../i386-...-ld (the cross ld)
Start building 'Cocoa' (or AppKit);
It will fail about O2_distill.h or such, on command line run:
cp /Developer/Cocotron/1.0/Windows/i386/Frameworks/Onyx2D.framework/
Versions/A/PrivateHeaders/O2Context_distill.h /Developer/Cocotron/1.0/
FreeBSD/i386/Frameworks/Onyx2D.framework/Versions/A/PrivateHeaders/
cp /Developer/Cocotron/1.0/Windows/i386/Frameworks/Onyx2D.framework/
Versions/A/PrivateHeaders/O2PDFCharWidths.h /Developer/Cocotron/1.0/
FreeBSD/i386/Frameworks/Onyx2D.framework/Versions/A/PrivateHeaders/
Continue building. It will fail..
cp /Developer/Cocotron/1.0/Windows/i386/Frameworks/
QuartzCore.framework/Versions/A/PrivateHeaders/CALayerContext.h /
Developer/Cocotron/1.0/FreeBSD/i386/Frameworks/QuartzCore.framework/
Versions/A/PrivateHeaders/
cp /Developer/Cocotron/1.0/Windows/i386/Frameworks/
CoreGraphics.framework/Versions/A/Headers/CGLPixelSurface.h /Developer/
Cocotron/1.0/FreeBSD/i386/Frameworks/CoreGraphics.framework/Versions/A/
Headers/
Eventually, you reach the issue with CoreVIdeo and O2Context_cairo.m
Hopefully this saves someone a huge amount of time that I wasted
messing with it :)
Robert