Recent

Author Topic: FreePascal on macOS 10.14 Mojave doesn't work  (Read 3881 times)

Hansaplast

  • Sr. Member
  • ****
  • Posts: 484
  • Tweaking4All.com
    • Tweaking4All
Re: FreePascal on macOS 10.14 Mojave doesn't work
« Reply #15 on: September 30, 2018, 11:27:39 am »
With Frank's instructions I did finally get FPC installed (install Commandline tools 10.13, rename /Library/Developer/ComandLineTools to /Library/Developer/ComandLineTools-10.13, instal;l commandline tools 10.14, install FPC, edit /etc/fpc.cfg)

slicke

  • New member
  • *
  • Posts: 6
Re: FreePascal on macOS 10.14 Mojave doesn't work
« Reply #16 on: September 30, 2018, 03:30:17 pm »
I found a repo on github with old repos and got the SDK from
https://github.com/phracker/MacOSX-SDKs/tree/master/MacOSX10.13.sdk

Used SVN to just get 10.13
svn export https://github.com/phracker/MacOSX-SDKs/trunk/MacOSX10.13.sdk MacOSX10.13.sdk :)

Hansaplast

  • Sr. Member
  • ****
  • Posts: 484
  • Tweaking4All.com
    • Tweaking4All
Re: FreePascal on macOS 10.14 Mojave doesn't work
« Reply #17 on: September 30, 2018, 03:43:20 pm »
I found a repo on github with old repos and got the SDK from
https://github.com/phracker/MacOSX-SDKs/tree/master/MacOSX10.13.sdk


Nice find!
Did you try this in Mojave and did Object Inspector and selecting controls on a form work correctly?
(I'm just wondering if the commandline tools somehow is interfering)

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 587
Re: FreePascal on macOS 10.14 Mojave doesn't work
« Reply #18 on: September 30, 2018, 07:36:17 pm »
I have uploaded a new installer for FPC 3.0.4 (called FPC 3.0.4a) that will install on macOS 10.14. The compiler has not changed, only the installer and the default fpc.cfg file (and fpcmkcfg, the program that generated the fpc.cfg file).

Note that the generated fpc.cfg file is different depending on whether you install on macOS 10.14 or on a lower version, because it is not possible to make parts of the configuration file conditional on the macOS version. You will have to rerun the installer on macOS 10.14 if you update later to get the new configuration file (or manually specify the appropriate -XR/-Fl parameters).

Hansaplast

  • Sr. Member
  • ****
  • Posts: 484
  • Tweaking4All.com
    • Tweaking4All
Re: FreePascal on macOS 10.14 Mojave doesn't work
« Reply #19 on: September 30, 2018, 10:57:14 pm »
Thanks Jonas!  :)

luri

  • New member
  • *
  • Posts: 6
Re: FreePascal on macOS 10.14 Mojave doesn't work
« Reply #20 on: October 01, 2018, 01:57:04 am »
just my summary in medium
https://medium.com/@luridarmawan/tips-mengatasi-problem-lazarus-di-mojave-688d42a20820

Sorry, in Indonesian, not in english.

*running with: fpc 3.0.4, Lazarus 1.8.4 and Lazarus 2.1.0 (trunk)

Igor Kokarev

  • Jr. Member
  • **
  • Posts: 50
Re: FreePascal on macOS 10.14 Mojave doesn't work
« Reply #21 on: October 22, 2018, 06:57:21 pm »
Hi,

Does Lazarus 2.0 RC1 work correctly on macOS Mojave? What I should know before update macOS from High Sierra?

luri

  • New member
  • *
  • Posts: 6
Re: FreePascal on macOS 10.14 Mojave doesn't work
« Reply #22 on: October 23, 2018, 12:07:20 am »
Lazarus 2.1.0 (trunk) running well on MacOS Mojave

Hansaplast

  • Sr. Member
  • ****
  • Posts: 484
  • Tweaking4All.com
    • Tweaking4All
Re: FreePascal on macOS 10.14 Mojave doesn't work
« Reply #23 on: October 23, 2018, 11:31:29 am »
Lazarus 2.1.0 (trunk) running well on MacOS Mojave



How did you install FPC/Lazarus?
I'm running trunk (Lazarus 2.1.0 r59314 FPC 3.0.4 x86_64-darwin-cocoa) as well but have significant refresh/redraw issues (in the IDE and in applications that I compile). Even when installing on a completely clean Mojave machine, I get these issues.
Not sure what I'm overlooking, I installed XCode command lines for 10.13 and 10.14, and modified fpc.cfg as described here.

Igor Kokarev

  • Jr. Member
  • **
  • Posts: 50
Re: FreePascal on macOS 10.14 Mojave doesn't work
« Reply #24 on: October 23, 2018, 01:44:20 pm »
Regrettably I couldn't get to work Lazarus 2.0 RC1 + fpc 3.0.4 on macOS
 Mojave.

Initially I had an error "ld: file not found: /usr/lib/crt1.o" when I try to compile any project. This error was described in first post of this topic.

After adding "-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" as it was recommend as a solution, I see "error while linking" messsage.

I have latest Xcode and I performed "xcode-select --install".

I didn't want to install old Xcode if there is another solution.

Please help,

Hansaplast

  • Sr. Member
  • ****
  • Posts: 484
  • Tweaking4All.com
    • Tweaking4All
Re: FreePascal on macOS 10.14 Mojave doesn't work
« Reply #25 on: October 23, 2018, 02:05:46 pm »

I did get Lazarus to run under Mojave, by following the steps outlined in the thread.
Install Commandline tools 10.13 (this installs the missing /usr/lib/crt1.o), rename folder, install Commandline tools 10.14, modify fpc.cfg.
However, there are major repaint issues - for example scrolling through properties in the object inspector, or jumping around in the source code. Applications compiled with this setup have the same issues. Some controls are drawn, others appear after resizing the window or moving the mouse over it, some never appear. You could of course run the IDE in Carbon, or run macOS 10.13 in a virtual machine, but neither is "great".


I'm no expert but I suspect it may have to do with the framework we're linking against.
Compiling the same app under macOS 10.13 and then running it under 10.14 work does not show these issues.

Gizmo

  • Hero Member
  • *****
  • Posts: 646
Re: FreePascal on macOS 10.14 Mojave doesn't work
« Reply #26 on: October 24, 2018, 12:44:35 am »
I want to give a big credit to Jonas!

Quote
Jonas..I have uploaded a new installer for FPC 3.0.4 (called FPC 3.0.4a) that will install on macOS 10.14. The compiler has not changed, only the installer and the default fpc.cfg file (and fpcmkcfg, the program that generated the fpc.cfg file).

I have spent all day today, after upgrading from Sierra to Mojave, trying to get Lazarus 1.8.4 to work as it did before in Sierra. I uninstalled and re-installed Lazarus countless times, changed all manner of settings. I was about to wipe my Mac when I found this thread. And most significantly, Jonas mention of FPC 3.0.4a which I discovered is here if anyone is trying to find it (ftp://ftp.hu.freepascal.org/pub/fpc/dist/3.0.4/i386-macosx/fpc-3.0.4a.intel-macosx.dmg).

So what did I do (for the benefit of others trying to get Lazarus 1.8.4 and FPC 3.0.4 on the new Mojave OSX):

1) Dragged Lazarus to trash from the Applications folder in Finder.
2) Deleted the /Users/Username/.lazarus folder (rm -R /Users/YourUsername/.lazarus at terminal)
3) Deleted FPC (rm -R /usr/local/lib/fpc/ at terminal)
4) Deleted other fpc entries such as /usr/local/share/src/fpc-3.0.4 and /usr/local/share/src/fpc-3.0.2 (e.g. rm -R /usr/local/share/src/fpc-3.0.4)...try using 'locate fpc' for other areas.
5) Ensured Xcode was installed (I am using Xcode 10, for info, as of 23rd Oct 2018) from the App Store
6) Executed the following at terminal: sudo xcode-select --install
5) Downloaded FPC 3.0.4e from the link above that Jonas has provided and installed it
6) Re-downloaded Lazarus 1.8.4 as available from the main site (http://www.lazarus-ide.org/index.php?page=downloads)

Success! All existing and old projects now compile and build and launch. :-)

Thanks Jonas. Superstar.
Lazarus 1.8.4 and fpc 3.0.4 - Linux Mint 19 LTS, Windows 7 and Mac Majove OSX
Useful Page to remember : http://wiki.freepascal.org/Cross_compiling#From_Linux_x64_to_Linux_i386