Try FPC 2.6
The last few days I was able to play with this a bit more.
Indeed you were right -- I can compile either cocoa or customdrawn under fpc 2.6.
I was able to compile cocoa (or customdrawn) under fpc 2.7.1 as follows:
- copy fpc/packages/cocoaint/src/CocoaAll.pas and UndefinedTypes.inc into lcl/interfaces/cocoa (or lcl/interfaces/customdrawn),
- modify the copied CocoaAll.pas so it uses MacOSAll and does not use any of the fundamental units directly (the units CF*, CG*, CV*).
- Finally, modify the package build file for lcl.lpk to include $(FPCSrcDir)/packages/cocoaint/src in both the unit path and the include path.
Of course, compiling the widget set is one thing, but getting an existing carbon application to work with it is something quite different! But at least I can see how feasible a project this is now.