Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2019-10

Install Lazarus on Mac OSX Catalina

11 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Anthony Tekatch

My Mac was upgraded to the "Catalina" OS version and now I cannot find any Lazarus downloads that work. Any advice on getting Lazarus to work on a Mac now?

I did get the latest XCODE to install by deleting the existing XCODE app.

Thanks,
Anthony

Reply by email

Ryan Joseph
to Anthony Tekatch

The Carbon widget set along with all 32-bit code are not available in 10.15, which means you need to build Lazarus with the Cocoa widgets. I had to build my version from sources because I was told the Cocoa widgets are “alpha”, but that really needs to be upgraded to stable and released to the public already.

Are there any plans to do this?

Show quoted text 10 lines
On Oct 12, 2019, at 2:05 PM, Anthony Tekatch via lazarus wrote: My Mac was upgraded to the "Catalina" OS version and now I cannot find any Lazarus downloads that work. Any advice on getting Lazarus to work on a Mac now? I did get the latest XCODE to install by deleting the existing XCODE app. Thanks, Anthony

Regards,
Ryan Joseph

Reply by email

Mattias Gaertner
to Ryan Joseph
Show quoted text 7 lines
The Carbon widget set along with all 32-bit code are not available in 10.15, which means you need to build Lazarus with the Cocoa widgets. I had to build my version from sources because I was told the Cocoa widgets are “alpha”, but that really needs to be upgraded to stable and released to the public already. Are there any plans to do this?

Yes

Mattias

Reply by email

Graeme Geldenhuys
to Anthony Tekatch: My Mac was upgraded to the "Catalina" OS version and now I cannot find any Lazarus…
Anthony Tekatch wrote
Any advice on getting Lazarus to work on a Mac now?

Probably not helpful now, but don't ever just upgrade your OS to a new major version without doing some research first. Catalina breaks a lot of things! Plus the one major thing is that Apple completely removed 32-bit support - probably the issue you are now experiencing.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Anthony Tekatch
to Ryan Joseph: The Carbon widget set along with all 32-bit code are not available in 10.15, which means…
Ryan Joseph wrote
I had to build my version from sources ...

Thank you. I got it to work.

I modified the Wiki:
https://wiki.freepascal.org/Installing_Lazarus_on_MacOS_X#Step_1._Download_Xcode. To indicate that old Xcode must be trashed before installing new Xcode 11.1 on MacOSX Catalina 10.15

Then I followed the instructions at the above link in the section: Install Lazarus
as follows:

cd ~
mkdir -p bin/lazarus
cd bin/lazarus
svn checkout https://svn.freepascal.org/svn/lazarus/branches/fixes_2_0 laz_fixes // wait some time ....
cd laz_fixes
make LCL_PLATFORM=cocoa CPU_TARGET=x86_64 bigide
// wait some time .....
open startlazarus.app --args "--pcp=~/.laz_fixes"

Reply by email

Anthony Tekatch
to Anthony Tekatch
Anthony Tekatch wrote
Thank you. I got it to work.

That was a bit premature.

Lazarus cannot be rebuilt after installing packages. packages
install
save and rebuild

report: error: undefined symbols for architecture i386

Reply by email

Graeme Geldenhuys
to Anthony Tekatch
Anthony Tekatch wrote
report: error: undefined symbols for architecture i386

As Catalina doesn't have 32-bit support, I would imagine you need to compile 64-bit FPC first, then build Lazarus with the 64-bit fpc compiler.

I would also imagine you can't use the official FPC 3.0.4 Install which includes only a cross-compiler for 64-bit (but the ppc* executable is 32-bit). So you need a true 64-bit FPC, not a cross-compiler.

Take all this information with a pitch of salt though. ;-) I can't even get my MacBook to run because of outdate XCode, Apple wanting to force me to install Catalina to get a working XCode, and because my AppleID has been locked (G*D knows why!).

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Anthony Walter
to Graeme Geldenhuys

I'm not on Catalina yet, but I tried building a cross compiler for Cocoa with 64bit OSX earlier today and failed. It seems that Lazarus on OSX can't see a 64bit compiler if you use cross install.

What I thought would work was:

make all
make install INSTALL_PREFIX=`pwd`
crossinstall OS_TARGET=darwin CPU_TARGET=x86_64 INSTALL_PREFIX=`pwd`

Then I copied ./lib/version/ppc and ./lib/version/ppcross to ./bin/ and created a valid ./bin/fpc.cfg

Then I built Lazarus. I tried building with widgetset as Cocoa and CPU are x86_64 but I could not get the make to work. Then I tried building Lazarus normally, and changing a new project to use 64bit and Lazarus would have none of it, arguing that the current compiler does not support x86_64.

Eventually I gave up on building it myself and used fpcudeluxe instead to install a Cocoa 64bit compiler and Lazarus.

If anyone has any tips on how to manually create a FPC and Lazarus that support compilation to both 32 and 64bit, or even just a 64bit Cocoa only version, I'd appreciate any help. I could probably figure it out, but it would save me a lot of time in re-compiling.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20191013/d00be04f/attachment-0001.html>

Reply by email

C Western
to Anthony Walter

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

Reply by email

Anthony Tekatch
to Anthony Walter: I'm not on Catalina yet, but I tried building a cross compiler for Cocoa with 64bit OSX…
Anthony Walter wrote
Eventually I gave up on building it myself and used fpcudeluxe instead to install a Cocoa 64bit compiler and Lazarus.

Interesting, how did you get fpcupdeluxe to run on a Mac?

I tried downloading:
fpcupdeluxe-x86_64-darwin-cocoa.zip
from here:
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases Drag the downloaded file into the Applications folder Clicking on that produced the error:
The application "fpcupdeluxe-x86_64-darwin-cocoa" can't be opened

Reply by email