Recent

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

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • 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: 12
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

  • Hero Member
  • *****
  • Posts: 674
  • 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: 1058
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

  • Hero Member
  • *****
  • Posts: 674
  • 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: 7
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

  • Sr. Member
  • ****
  • Posts: 370
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: 7
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

  • Hero Member
  • *****
  • Posts: 674
  • 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

  • Sr. Member
  • ****
  • Posts: 370
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

  • Hero Member
  • *****
  • Posts: 674
  • 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: 831
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.

jordanspace

  • Newbie
  • Posts: 2
Re: FreePascal on macOS 10.14 Mojave doesn't work
« Reply #27 on: March 21, 2019, 01:46:22 pm »
I'm using Gnu Pascal from the Mac OS X command-line. You can edit files with your favorite Mac text editor (such as TextWrangler).

You can google for "Gnu Pascal Download". It will run under Mac OS X without doing something weird that makes you run Windows under Mac.

And you can google for "Text Wrangler Download"

Both Gnu Pascal and Text Wrangler are totally free.

Pascal isn't a bad first language to learn. That's what it was designed for was to teach student's how to program. But, yeah, for serious programming of a Mac, Objective-C is the best.

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: FreePascal on macOS 10.14 Mojave doesn't work
« Reply #28 on: June 08, 2019, 11:20:32 pm »
Pascal isn't a bad first language to learn. That's what it was designed for was to teach student's how to program. But, yeah, for serious programming of a Mac, Objective-C is the best.

Old post, I know, but "serious" deserves some context. First, programmers trying to make a living with Mac skills will need to learn Swift as well. Second, developers who need to target Mac, Windows and Linux need to consider time required to maintain multiple code bases. I put myself in the "serious" category, but maintaining three code bases is not an option.

Recall, also, that Apple originally developed in Pascal, not a bad language for "serious" work.
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

julkas

  • Guest
Re: FreePascal on macOS 10.14 Mojave doesn't work
« Reply #29 on: June 10, 2019, 02:51:35 pm »
Freepascal don't work on macOS 10.14.
I am using Travis for testing Free Pascal code on Mac OS X.
Code: Text  [Select][+][-]
  1. Operating System Details
  2. ProductName:    Mac OS X
  3. ProductVersion: 10.14.4
  4. BuildVersion:   18E226
  5.  
Code: Text  [Select][+][-]
  1. Free Pascal Compiler version 3.0.4 [2018/10/02] for x86_64
  2. Copyright (c) 1993-2017 by Florian Klaempfl and others
  3. Target OS: Darwin for x86_64
  4.  
Travis configuration file and logs are here https://travis-ci.org/JulStrat/ftreap/jobs/543699513.

Regards.
« Last Edit: June 10, 2019, 04:03:50 pm by julkas »

 

TinyPortal © 2005-2018