Recent

Author Topic: Installation of Lazarus/Free Pascal  (Read 2011 times)

alanyoung

  • New member
  • *
  • Posts: 9
Installation of Lazarus/Free Pascal
« on: February 28, 2024, 03:32:26 pm »
I have deleted Lazarus/Free Pascal from macOS Ventura and then done a re-installation.  The uninstall was done using CleanMyMac followed by removal of any remaining IDE & compiler files manually.
on re-installation ( in the order: fpc-src-3.2.2-20210709-macosx.dmg | fpc-3.2.2.intelarm64-macosx.dmg |Lazarus-3.2-macosx-x86_64.pkg), after relaunching Lazarus I tested as follows: Projects->Project Options->Test and got got 2 errors - attachment1 & attachment 2.  These indicated the existence of numerous duplicate files (.ppu).  Is this significant? What action should be taken?  Any help/advice would be much appreciated.

cdbc

  • Hero Member
  • *****
  • Posts: 1079
    • http://www.cdbc.dk
Re: Installation of Lazarus/Free Pascal
« Reply #1 on: February 28, 2024, 03:50:18 pm »
Hi
Figure out which of the 2 directories is older and remove/move the files within.
(On move then e.g.: to /tmp or /home/{you}/tmp etc...)
They're remnants of the old installation...
The last 2 are from your test project, delete them too.
HTH
Regards Benny
« Last Edit: February 28, 2024, 03:53:42 pm by cdbc »
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

alanyoung

  • New member
  • *
  • Posts: 9
Re: Installation of Lazarus/Free Pascal
« Reply #2 on: February 29, 2024, 12:20:56 pm »
Looking at the directory creation dates, the subdirectory x84_64-darwin in all the pairs have the creation dates of 28 February 2024 (the date of the clean installation) so I do not think that the duplicates arise from leftovers from previous installations.  Further some of the duplicate files date from before I first started using Lazarus Pascal.  I am therefore puzzled as to which files I should choose to move.

cdbc

  • Hero Member
  • *****
  • Posts: 1079
    • http://www.cdbc.dk
Re: Installation of Lazarus/Free Pascal
« Reply #3 on: February 29, 2024, 01:13:13 pm »
Hi
Hmmm...
1) The last 2 'orphaned' files -> delete them.
2) For the rest, DON'T delete. It's because fpc picks up 3 different 'widgetsets',
 - Free Vision = (/fv/) a free version of what was TurboVision from Borland
 - LCL = Lazarus' main widgetset
 - Unix version 5 interface = (/univint/)
3) In your home directory, look for the hidden '.lazarus' directory and
    because the installed files are in a read-only section, lazarus creates this
    hidden dir, to use when you're re/compiling lazarus e.g.: installing
    components... This directory, you can write to.
4) You can try to rename the files in the '.lazarus' directory, but be careful!!!
That's what I came up with, looking closer at your picture...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

alanyoung

  • New member
  • *
  • Posts: 9
Re: Installation of Lazarus/Free Pascal
« Reply #4 on: February 29, 2024, 01:57:40 pm »
Hi Benny
I remained the relevant files in the hidden .Lazarus directory, Restarted Lazarus, tried to compile a simple project but the compile failed because of the renamed files.  However when I went to Project->Project Options->Test, I still get the same error message about duplicate files!.  Renaming the renamed field to their original names, then compilation succeeds and the Project Option still gives the duplicates error.  Very puzzling!

cdbc

  • Hero Member
  • *****
  • Posts: 1079
    • http://www.cdbc.dk
Re: Installation of Lazarus/Free Pascal
« Reply #5 on: February 29, 2024, 03:42:00 pm »
Hi Alan
Sorry to hear that mate, then we need someone more "in the know", than we are  %)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

TRon

  • Hero Member
  • *****
  • Posts: 2506
Re: Installation of Lazarus/Free Pascal
« Reply #6 on: February 29, 2024, 10:49:19 pm »
@cdbc:
You are correct that more information is required but quite honestly this is messy and I really doubt it is solvable (completely).

Some things got really mixed between the two different installations and trying to figure out how and what to do to fix it will probably cost more time than doing a fresh installation (with some guided instructions that prevents the different installations from being mingled).

alanyoung

  • New member
  • *
  • Posts: 9
Re: Installation of Lazarus/Free Pascal
« Reply #7 on: March 01, 2024, 11:51:51 am »
I have already done fresh installations, but to no avail.  Any guidance regarding a clean up would be appreciated.  As already stated I have use CleanMyMac to uninstall Lazarus and then I have looked for any remaining hidden references to Lazarus & the free pascal compiler and manually deleted them.

TRon

  • Hero Member
  • *****
  • Posts: 2506
Re: Installation of Lazarus/Free Pascal
« Reply #8 on: March 01, 2024, 12:25:34 pm »
I have already done fresh installations, but to no avail.
Would you be able to elaborate on what steps you did exactly to have "done fresh installations" ?

Quote
Any guidance regarding a clean up would be appreciated.  As already stated I have use CleanMyMac to uninstall Lazarus and then I have looked for any remaining hidden references to Lazarus & the free pascal compiler and manually deleted them.
If I remember correctly then there has been a discussion (recent 2-3 months) with someone else having similar issues on a mac and (again if I remember correct) user Dbannon was very helpful in an attempt to get to the bottom of cleaning up his machine but unfortunately I can't seem to find/locate the thread... I personally do not know anything about macos.

alanyoung

  • New member
  • *
  • Posts: 9
Re: Installation of Lazarus/Free Pascal
« Reply #9 on: March 01, 2024, 12:37:10 pm »
I have used CleanMyMac to uninstall Lazarus and then manually deleted any files directories that I could identify as pascal related.  Finally today I found UninstallPKG from Core Code which was suggested as a recommended method for removal on the freepascal.org web site.  Unfortunately although the process claimed to have removed everything, on re-installing I had the same errors when trying Project-> Project Options->Test.

TRon

  • Hero Member
  • *****
  • Posts: 2506
Re: Installation of Lazarus/Free Pascal
« Reply #10 on: March 01, 2024, 12:57:54 pm »
@alanyoung:
That fancy cleaning tools do not work as expected is known... it was not really the question  :)

I wanted to try and obtain more information on which steps you did to install.

But never-mind that as it simply takes up too much time. Please consider removing again and reinstall with using FPCUpDeluxe. If you do then make sure to install into a directory where you have enough access rights.

There is a wiki-page on how to install lazarus on macos from source, including how to configure/setup, common errors and a link to faq regarding issues.

The errors you presented I have never seen before (I can honestly say that I have done a lot of stupid things with configuring and installing) but for sure there is something gone horribly wrong with either the installation or the configuration (or both) with your current FPC and Lazarus. At first glance and if I would have to guess then it looks like you have a fpc.cfg that includes paths to your Lazarus units.
« Last Edit: March 01, 2024, 01:01:04 pm by TRon »

alanyoung

  • New member
  • *
  • Posts: 9
Re: Installation of Lazarus/Free Pascal
« Reply #11 on: March 06, 2024, 02:16:49 pm »
I completely rebuilt my MacBook (including reformatting the hard drive).  OS is Ventura 13.6.4
I then download the following:
fpc-3.2.2.intelarm64-macosx.dmg
fpc-src-3.2.2-20210709-macosx.dmg
Lazarus-3.2-macosx-x86_64.pkg
I installed them in the same order.  No errors were reported.  When Lazarus is opened for the first there is confirmation that all is OK.  The sample program complies without any issue.  Attempting to add a component such as a TLabel and recompiling gives an error as the TLabel is Not added to the unit.pas file.  In addition if (as before) I select Project->Project Options->Test I still get the error that there is a .ppu file older than the compiler.  Selecting the option 'Ignore 'i then get the errors listed before about duplicate files.

Given all the above, I wonder just what the solution is to get a functioning error-free installation of Lazarus pascal on macOS?

TRon

  • Hero Member
  • *****
  • Posts: 2506
Re: Installation of Lazarus/Free Pascal
« Reply #12 on: March 07, 2024, 06:24:29 am »
Given all the above, I wonder just what the solution is to get a functioning error-free installation of Lazarus pascal on macOS?
As written in a previous post by me: FPCUpDeluxe. That should be able to provide you with the quickest solution.

The other route is diving into this issue but in case you are then expecting help from my hand you would have to be my eyes and ears because a) I do not have the hardware to test on and b) know nothing about macos. (besides being longwinded that would be a tiresome/long-dreaded path). The issue is that I am not familiar with the errors that you presented nor am I able to find anything remotely alike. Also the MacOS known issues and faq about installation related issues (both from the wiki) do not mention anything that seem to resemble your situation.

I intended to try and see what is inside those pesky dmg and pkg files but that already seem to be a difficult task to do on/for Linux.

You can hopefully help yourself a little as well by trying to compile something simple (if possible) with the compiler option -va enabled and analyze or post the (complete) log that it produces. It produces a log that tells whatever the compiler is trying to do during compilation.
« Last Edit: March 07, 2024, 06:35:16 am by TRon »

alanyoung

  • New member
  • *
  • Posts: 9
Re: Installation of Lazarus/Free Pascal
« Reply #13 on: March 08, 2024, 06:54:51 pm »
After several cycles of removing Lazarus/pascal and reinstalling as previously described, I now have an installation the appears to 'work'.  I still get the error when I select Projects->Project Options-> Test, but a simple program with a couple of basic components behaves as expected..
As you suggested I set the complier option to -va enabled, but I have been unable to locate the log file (excuse my ignorance).

TRon

  • Hero Member
  • *****
  • Posts: 2506
Re: Installation of Lazarus/Free Pascal
« Reply #14 on: March 08, 2024, 08:39:25 pm »
As you suggested I set the complier option to -va enabled, but I have been unable to locate the log file (excuse my ignorance).
My bad. I should have been more explicit when I wrote that.

It is not a file but output from the compiler when you compile/build a project.

Assuming that you use Lazarus, they appear in the message window (the same windows where it say if compilation succeeded or failed).

That there are more message listed in that window might not be so obvious as by default Lazarus filters out a lot of those messages.

For the complete list you can either copy them or save them by clicking on the right mouse button in that message window, then selecting either save or copy, selecting the menu item "copy all/original message to the clipboard" or "save all/original message to file".

Then either save the file or paste the clipboard contents to a text editor so that you are able to read them for further review.

Hopefully that makes it more clear ?

I still get the error when I select Projects->Project Options-> Test, but a simple program with a couple of basic components behaves as expected..
The latter is the most important the former however ....

... I never quite understood the functionality of that test button. The process that is executed when you press that button confuses all sort of things, complaining about things that are obvious, digging up very old temporary files, informing about ppu file-dates that do not match that of the compiler (who cares, especially when looking at the wrong directories ?) to finally end up in a failed empty project build attempt. And I am sure I forgot to mention a lot of other stuff that happens when you press that button.

Perhaps it is beneficial to get acquainted with what that button actually does or is trying to tell when it presents all the information but honestly I personally could not care less especially because it is clear that the process that is performed gets confused by my (custom) compiler setup.
« Last Edit: March 08, 2024, 09:06:11 pm by TRon »

 

TinyPortal © 2005-2018