Recent

Author Topic: Will updating to Catalina mess up my existing FPC/Lazarus installation?  (Read 922 times)

MISV

  • Hero Member
  • *****
  • Posts: 662
I can see many people have problems with the installation... And in my experience if others are getting problems, well, then for sure I will as well :)

On the other hand, I am starting to investigate notarization/hardening and for that I would need Catalina to make sure everything is working correctly...


Hansaplast

  • Hero Member
  • *****
  • Posts: 570
  • Tweaking4All.com
    • Tweaking4All
Re: Will updating to Catalina mess up my existing FPC/Lazarus installation?
« Reply #1 on: December 04, 2019, 11:08:25 am »
I run Lazarus from trunk (SVN) under Catalina without any issues.
I switched to SVN quite a while ago, when Cocoa was in in alpha.


As with previous macOS versions, using a debugger still causes little issues at times, and [lldb] is pretty slow in general.
I never got gdb to run reliably under Mojave/Catalina, and lldb integration is still in beta (I believe).

syntonica

  • Full Member
  • ***
  • Posts: 118
Re: Will updating to Catalina mess up my existing FPC/Lazarus installation?
« Reply #2 on: December 08, 2019, 07:36:58 am »
It depends on where your install is. Catalina's OS now resides on a write-only partition which includes /.  The new installer puts Lazarus into /Library, which appears to be fine, but you can also move it to ~/  for that extra bit of convenience.  Your stuff in /usr/local/ should be fine as well.

I haven't gone Catalina yet because a) I have 32-bit stuff I need and b) my dad spilled water on the MacBook Air and fried the PMU. I was going put Catalina on it to play.

MISV

  • Hero Member
  • *****
  • Posts: 662
Re: Will updating to Catalina mess up my existing FPC/Lazarus installation?
« Reply #3 on: December 08, 2019, 09:02:32 pm »
I run Lazarus from trunk (SVN) under Catalina without any issues.
I switched to SVN quite a while ago, when Cocoa was in in alpha.


As with previous macOS versions, using a debugger still causes little issues at times, and [lldb] is pretty slow in general.
I never got gdb to run reliably under Mojave/Catalina, and lldb integration is still in beta (I believe).


Overall it seems to have gone!

« Last Edit: December 08, 2019, 11:22:21 pm by MISV »

trev

  • Sr. Member
  • ****
  • Posts: 350
  • Former Delphi 7 and Delphi 10.2 User
Re: Will updating to Catalina mess up my existing FPC/Lazarus installation?
« Reply #4 on: December 09, 2019, 01:17:05 am »
Quote
Overall it seems to have gone!

Gone well, I hope :-)
o Lazarus v2.1.0 r62452, FPC v3.3.1 r42644, macOS 10.14.6 (with sup update), Xcode 10.3
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.0 (Parallels VM)
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

MISV

  • Hero Member
  • *****
  • Posts: 662
Re: Will updating to Catalina mess up my existing FPC/Lazarus installation?
« Reply #5 on: December 09, 2019, 02:37:15 am »
Okay there is one/two problem...

1)
Keeping the old Indy version it now seems to error with a TLSV1 error message. IE not the usually Catalina reported issue which I believe is/should-be fully solvable by entitlements + loading version specific OpenSSL/LibreSSL using *IdOpenSSLSetLoadsymLinksFirst* / similar. See thread https://forum.lazarus.freepascal.org/index.php/topic,47638.0.html

I recall of an earlier problem where Indy would end up loading incorrect OpenSSL/LibreSSL causing such problems https://forum.lazarus.freepascal.org/index.php/topic,42598.0.html ... I am guessing it must be such an issue since it sounds logical it would occur with macOS update. (I am of course already setting Indy SSL to not use TLSV1 since that has been phased out on many webservers)


... Anyhow - that leads to #2 ...


2)
And updating Indy caues weird issues in Indy compilation which would hint I do not have recent FPC source...? Or Indy has a bug?

In IdGlobal.pas I get these two errors:

Quote
IdGlobal.pas(4607,57) Error: Typecast has different size (4 -> 8 ) in assignment
at
 
Code: Pascal  [Select]
  1.    {$IFDEF THANDLE_64}
  2.   Result := THandle(InterlockedExchange64(Int64(VTarget), Int64(AValue)));
  3.     {$ENDIF}    

(comparing to old code that is the same so I am currently thinking THANDLE_64 define may not be set in old versions - I need to check)

and two of the

Quote
IdGlobal.pas(8523,17) Error: Identifier not found "PRawByteString"
at
 
Code: Pascal  [Select]
  1. SetCodePage(PRawByteString(@Result)^, GetEncodingCodePage(ADestEncoding), False);

...

When I run "svn up" on my fprsrc directory it says 43661

Inside Lazarus about dialog I have IDE version 2.1.0, FPC 3.0.4, SVN revision 61470M

However, what is puzzling that searching on the net it seems *PRawByteString* should be defined in FPC system, unit? So somehow my FPC source is possibly outdated?

...

And of course using Native Mac API is not a solution either as I can not get a non-simple delegate working:

https://forum.lazarus.freepascal.org/index.php/topic,37468.0.html
« Last Edit: December 09, 2019, 05:05:22 am by MISV »

trev

  • Sr. Member
  • ****
  • Posts: 350
  • Former Delphi 7 and Delphi 10.2 User
Re: Will updating to Catalina mess up my existing FPC/Lazarus installation?
« Reply #6 on: December 09, 2019, 01:10:15 pm »
However, what is puzzling that searching on the net it seems *PRawByteString* should be defined in FPC system, unit? So somehow my FPC source is possibly outdated?

I don't use Indy as I'm using fphttpclient {$IFNDEF LINUX}, OpenSSLSockets{$ENDIF} for HTTPS web retrieval.

As for PRawByteString:

Code: [Select]
trev@macmini6 [/usr/local/share/fpcsrc/fpc-3.3.1/rtl/inc] $ grep PRawByteString *
systemh.inc:  PRawByteString      = ^RawByteString;
...
trev@macmini6 [/usr/local/share/fpcsrc/fpc-3.0.4/rtl/inc] $ grep PRawByteString *
[nada]

So yes, you need a later version of FPC.
o Lazarus v2.1.0 r62452, FPC v3.3.1 r42644, macOS 10.14.6 (with sup update), Xcode 10.3
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.0 (Parallels VM)
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

MISV

  • Hero Member
  • *****
  • Posts: 662
Re: Will updating to Catalina mess up my existing FPC/Lazarus installation?
« Reply #7 on: December 09, 2019, 01:26:31 pm »
Quote
Code: [Select]
trev@macmini6 [/usr/local/share/fpcsrc/fpc-3.3.1/rtl/inc] $ grep PRawByteString *
systemh.inc:  PRawByteString      = ^RawByteString;
...
trev@macmini6 [/usr/local/share/fpcsrc/fpc-3.0.4/rtl/inc] $ grep PRawByteString *
[nada]

So yes, you need a later version of FPC.

I guess for that part it is safe to fix oneself instead of upgrade FPC ... Seems 3.2/3.3 releases are not at all stable... i.e. last stable offifical release is still the 3.0.4a

But that leaves that Indy apparently now assumes THandle is 64bit on Lazarus/64bit/Mac since this now executes:

Code: Pascal  [Select]
  1.    {$IFDEF THANDLE_64}
  2.   Result := THandle(InterlockedExchange64(Int64(VTarget), Int64(AValue)));
  3.     {$ENDIF}    

I guess this must be a change in newer FPC versions then... Not sure if/where best to fix or that define change may lead to more problems other places as well...

« Last Edit: December 09, 2019, 01:42:42 pm by MISV »

MISV

  • Hero Member
  • *****
  • Posts: 662
Re: Will updating to Catalina mess up my existing FPC/Lazarus installation?
« Reply #8 on: December 09, 2019, 06:04:02 pm »
I tried follow this
https://www.freepascal.org/develop.var
svn checkout https://svn.freepascal.org/svn/fpc/trunk fpc
svn update fpc

but this only updated my FPC to 43667 instead of 43661

So... not sure, but I think that means I still got 3.0.4a/fixes?

Hansaplast

  • Hero Member
  • *****
  • Posts: 570
  • Tweaking4All.com
    • Tweaking4All
Re: Will updating to Catalina mess up my existing FPC/Lazarus installation?
« Reply #9 on: December 10, 2019, 01:02:54 pm »
I just now updated FPC from SVN as well, and did get version 43670.
Not sure if these are the most correct steps, but these are the steps I followed, maybe it's helpful:


Code: Text  [Select]
  1. mkdir ~/freepascal/fpc
  2. cd ~/freepascal
  3. svn co http://svn.freepascal.org/svn/fpc/trunk fpc
  4. make clean all OPT="-XR/Library/Developer/CommandLineTools//SDKs/MacOSX.sdk/“
  5. sudo make install
  6. cd ~/freepascal/fpc/compiler/
  7. sudo make FPC=`pwd`/ppcx64 installsymlink


lucamar

  • Hero Member
  • *****
  • Posts: 2271
Re: Will updating to Catalina mess up my existing FPC/Lazarus installation?
« Reply #10 on: December 10, 2019, 03:13:56 pm »
I tried follow this
https://www.freepascal.org/develop.var
svn checkout https://svn.freepascal.org/svn/fpc/trunk fpc
svn update fpc

but this only updated my FPC to 43667 instead of 43661

So... not sure, but I think that means I still got 3.0.4a/fixes?

No, you now have the "latest" trunk (which IIRC is FPC 3.3 or alike). If you want "fixes" you should checkout from the "fixes_3_0" branch (or whatever you want).

The advice on that page to read the Subversion Book is quite sane when you want to start doing something "special". There you can learn how to use branchs/tags, how to checkout a specific revision, etc.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.4/2.0.6  - FPC 3.0.4 on:
(K|L)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

MISV

  • Hero Member
  • *****
  • Posts: 662
Re: Will updating to Catalina mess up my existing FPC/Lazarus installation?
« Reply #11 on: December 10, 2019, 03:44:35 pm »
I tried follow this
https://www.freepascal.org/develop.var
svn checkout https://svn.freepascal.org/svn/fpc/trunk fpc
svn update fpc

but this only updated my FPC to 43667 instead of 43661

So... not sure, but I think that means I still got 3.0.4a/fixes?

No, you now have the "latest" trunk (which IIRC is FPC 3.3 or alike). If you want "fixes" you should checkout from the "fixes_3_0" branch (or whatever you want).

The advice on that page to read the Subversion Book is quite sane when you want to start doing something "special". There you can learn how to use branchs/tags, how to checkout a specific revision, etc.

I completely agree (and I wanted trunk - kept backup) but the reason I was confused is:

  • I was supposedly/thought using 3.0.4a before because I did not have PRawByteString defined - see my comments about Indy above.
  • I would have expected more difference in revision numbers (43667 instead of 43661 = 6) between 3.0.4a and 3.3.x

Anyhow, the explanation must be that... well, maybe I goofed up and updated SVN before posting here. Not sure.

MISV

  • Hero Member
  • *****
  • Posts: 662
Re: Will updating to Catalina mess up my existing FPC/Lazarus installation?
« Reply #12 on: December 10, 2019, 03:45:45 pm »
For what it is worth, I submitted a bug report for Indy here about the THandle size typecast issue: https://github.com/IndySockets/Indy/issues/274