I did some tests on Mac OS X 10.7.5.
1) make all crashes with:
Linking ../lazbuild
Undefined symbols for architecture x86_64:
"_LSOpenCFURLRef", referenced from:
_LCLINTF_OPENURL$ANSISTRING$$BOOLEAN in lclintf.o
ld: symbol(s) not found for architecture x86_64
An error occurred while linking
lazbuild.lpr(1629) Error: Error while linking
This is also a problem for other 64 bit darwin targets, like GTK2 or cocoa.
Adding OPT="-gl -gw -k-framework -kApplicationServices" resolves it. No idea, why this is not needed for 32 bit. Also, it still leads to this crash:
Compiling carbondbgconsts.pp
Assembling (pipe) ../../units/x86_64-darwin/carbon/carbondbgconsts.s
carbonproc.pp(518,33) Error: Identifier not found "ATSUFindFontFromName"
carbonproc.pp(541,30) Error: Identifier not found "ATSUFindFontName"
carbonproc.pp(548,30) Error: Identifier not found "ATSUFindFontName"
carbonproc.pp(569,34) Error: Identifier not found "FMGetFontFamilyFromName"
carbonproc.pp(676,25) Error: Identifier not found "HIViewChangeFeatures"
carbonproc.pp(679,27) Error: Identifier not found "HIViewSetVisible"
carbonproc.pp(680,25) Error: Identifier not found "HIViewSetFrame"
carbonproc.pp(703,19) Error: Identifier not found "GetControlBounds"
carbonproc.pp(713,17) Error: Identifier not found "SetControlData"
carbonproc.pp(738,57) Error: Identifier not found "GetControlEventTarget"
carbonproc.pp(1341,24) Error: Identifier not found "GetThemeFont"
carbonproc.pp(1341,63) Error: Identifier not found "GetApplicationScript"
carbonproc.pp(1343,28) Warning: Local variable "sz" does not seem to be initialized
carbonproc.pp(1403) Fatal: There were 12 errors compiling module, stopping
Fatal: Compilation aborted
The problem here is the clash of two defaults. Fpc defaults to ppcx64 and lazarus defaults to carbon-lcl, which is 32 bit only. Adding CPU_TARGET=i386 resolves this and the carbon version of Lazarus is built. I think that the default settings "make all" should be more fool proof.
2) make all LCL_PLATFORM=gtk2 with gtk2 from fink fails with:
Linking ../lazarus
ld: library not found for -lpango-1.0.0
fink has only libpango-1.0.dylib in its primary place and no libpango-1.0.0.dylib. libpango-1.0.0.dylib is present, but somewhat "hidden" by 2 symlinks. Passing the explicit path by OPT="-Fl/sw/lib/pango-ft219/lib/" resolves it. Couldn't lazarus use pkgconfig or simply use libpango-1.0.dylib?
make all LCL_PLATFORM=cocoa fails with:
Linking ../lazarus
Undefined symbols for architecture x86_64:
"_GetCurrentEventButtonState", referenced from:
_COCOAINT_TCOCOAWIDGETSET_$__GETKEYSTATE$LONGINT$$SMALLINT in cocoaint.o
"_GetThemeMetric", referenced from:
_COCOAGDIOBJECTS_TCOCOACONTEXT_$__DRAWFOCUSRECT$TRECT in cocoagdiobjects.o
_COCOAPROC_GETHITHEMEMETRIC$LONGWORD$LONGINT$$LONGINT in cocoaproc.o
"_HIThemeDrawFocusRect", referenced from:
_COCOAGDIOBJECTS_TCOCOACONTEXT_$__DRAWFOCUSRECT$TRECT in cocoagdiobjects.o
"_HIThemeDrawGroupBox", referenced from:
_COCOAGDIOBJECTS_TCOCOACONTEXT_$__FRAME3D$TRECT$LONGINT$TGRAPHICSBEVELCUT in cocoagdiobjects.o
ld: symbol(s) not found for architecture x86_64
I think the problem is that for example GetThemeMetric is part of univint, which is 32bit, IIRC.
3) make all LCL_PLATFORM=cocoa CPU_TARGET=i386 runs through. The resulting lazarus.app shows the splash screen for a moment, but then crashes/hangs.
4) Summary
With the fixes I can do the following fink packages: The 32bit carbon and the 64bit GTK2 version of lazarus; the (cross-)compilation versions of the lcl for cocoa(64bit), win32 and wince (arm and i386). fpgui and customdrawn lcl failed to build and i did not further investigate them. Also, I got stuck with my first try of a Qt version, because the Qt4pas unit failed to build.
So, currently the situation is that a 32bit carbon based Lazarus and a 64bit GTK2 based Lazarus and some cross compiled lcls can be made available through fink. I would be nice if the following 3 things could be fixed.
a) clash of defaults for fps (ppcx64) and lazarus (carbon)
b) usage of -framework ApplicationServices
c) using pkgconfig for libpango
Sorry for the long post.
MiSchi.