[Lazarus] Install Lazarus on Mac OSX Catalina

C Western l at c-m-w.me.uk
Sun Oct 13 11:39:27 CEST 2019


Some experiences having just tried moving my main application to Cocoa 
without upgrading to Catalina. The results look very promising, and my 
application looks usable, though I didn't try running 64 bit Lazarus. i 
can make the following observations:

1. For 32 bit compilation you need to avoid upgrading to the latest 
xcode; 10.3 looks like the last one that has the required 32 bit 
components. Older versions of xcode can be downloaded from the Apple 
developer site, and at least some co-existence is possible. (I ended up 
with 10.3 installed in my home directory.)

2. I typically compile with all range checks on, and this triggered some 
range checks in the widegt set - see 
https://bugs.freepascal.org/view.php?id=36171

3. Fixed point fonts can have non-integer spacings; I was using 
CarbonWidgetSet.SetTextFractional(Canvas, False) but this does not seem 
to be available under Cocoa so I had to specify the spacing in ExtTextOut.

4. Polyline, at least for large numbers of points. seems to be 10 times 
slower than under Carbon, which is itself slower than other OS's

5. For compiling trunk FPC I use:

FPC=~/fpc/bootstrap/ppc386 make distclean DEBUG=1 install PREFIX=~/usr 
CPU_SOURCE=i386 
OPT=-Fl/Users/me/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib

to compile a 32 bit compiler to ~/usr starting from a 32 bit compiler and

FPC=~/fpc/bootstrap/ppcx64 make distclean DEBUG=1 install PREFIX=~/usr64 
CPU_SOURCE=x86_64 
OPT=-Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib

to compile a 64 bit compiler to ~/usr64 starting from a 64 bit compiler. 
I add symbolic links in the two directories:

for f in usr usr64 ; do
   cd ~/$f/bin
   if [ ! -L ppc386 ] ; then ln -s ~/usr/lib/fpc/$VER/ppc386 ; fi

   if [ ! -L ppcx64 ] ; then ln -s ~/usr64/lib/fpc/$VER/ppcx64 ; fi

done

and with this setup lazarus can pick up the two compilers.

Colin





More information about the lazarus mailing list