Recent

Author Topic: SOLVED!!! cannot comppile anything, even after uninstall and installed 2.26  (Read 3886 times)

steveinalabama

  • New Member
  • *
  • Posts: 30
I was running version 2.2.4 which used to work, but it suddenly would not compile any prgram.
I uninstalled it, then installed version 2.2.6
The error message was "error code 1" but it stopped on {$I systemh.inc}
It still had the same error after I put the path in project options,
so I hard coded it as {$I C:\LAZARUS\FPC\3.2.2\SOURCE\RTL\INC\systemh.inc}

Then I had the same problem on
{I sysosh.inc}.
I changed the $I statement to:
{$i C:\LAZARUS\FPC\3.2.2\SOURCE\RTL\WIN\sysosh.inc}   

I tried to compile but had the same problem with another included file it did not find.
{$i rtldefs.inc}   
I changed it the same way:
C:\LAZARUS\FPC\3.2.2\SOURCE\RTL\WIN64\RTLDEFS.INC

Now I get this error message: Fatal : Unexpected end of file.
The error line is in an area of code that I did not write, under a section Thread Support
I am copying in the error line, and the lines before and after it. The error line
is the one that begines with $else...

{$i threadh.inc}
{$else not FPC_HAS_FEATURE_THREADING}
{ Bare minimum needed to get RTL to compile   

I am under Windows 10 Pro

Does anyone have a suggestion?
« Last Edit: April 12, 2023, 03:41:16 am by steveinalabama »

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2006
  • Fifty shades of code.
    • Delphi & FreePascal
Re: cannot comppile anything, even after uninstall and installed 2.26
« Reply #1 on: April 09, 2023, 08:04:38 am »
Does anyone have a suggestion?
I would suggest that you remove your current version complete and use this install tool.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: cannot comppile anything, even after uninstall and installed 2.26
« Reply #2 on: April 09, 2023, 11:28:30 am »
The error message was "error code 1" but it stopped on {$I systemh.inc}
It still had the same error after I put the path in project options,
so I hard coded it as {$I C:\LAZARUS\FPC\3.2.2\SOURCE\RTL\INC\systemh.inc}
Reading this, I get the impression that you add the path to the FPC source files to your project paths. Unless you know exactly what you are doing you should never touch the path settings in the project options in order to get access to system or third-party units. Always use the Lazarus package system for this ("Project inspector" > "Add" > "New requirement" > Select required package from the list, "OK").

Delete the folder in which the IDE writes the compiled units of your project. Cleanup the project's search path(s).

And if you want to reinstall your IDE (which I think is not required, though) just use the installer provided here. Installation on Windows is very simple, FPCUpDeluxe is not required.
« Last Edit: April 09, 2023, 11:31:38 am by wp »

steveinalabama

  • New Member
  • *
  • Posts: 30
Re: cannot comppile anything, even after uninstall and installed 2.26
« Reply #3 on: April 09, 2023, 04:44:10 pm »
Thanks for your reply. I uninstalled Lazarus again, rebooted, installed Lazarus 2.2.2 ( 2 versions back), reinstalled, rebooted, and again got the same error, stopping on  an included file, which I added the full path to the {$I ... }, tried to compile again, and had the same problem on another included file. Again I added the full path to the include file, and another compile attempt and it stopped on a 3rd  $I file.

At this point, I give up.

FWIW I am running Malwarebytes, and did a chkdsk /f and found no system problems.

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: cannot comppile anything, even after uninstall and installed 2.26
« Reply #4 on: April 09, 2023, 04:55:43 pm »
Leave these paths alone. Can you compile the empty project which is created when Lazarus opens?

FWIW I am running Malwarebytes, and did a chkdsk /f and found no system problems.
It is always a good idea to add the Lazarus and the project folder to the white-list of the anti-virus scanner. AV software may be very aggressive towards little-known software such as Lazarus/FPC etc.
« Last Edit: April 09, 2023, 05:35:50 pm by wp »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8744
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: cannot comppile anything, even after uninstall and installed 2.26
« Reply #5 on: April 09, 2023, 06:35:13 pm »
Does anyone have a suggestion?
Do as in the attached screenshot and paste the result here.

dsiders

  • Hero Member
  • *****
  • Posts: 1045
Re: cannot comppile anything, even after uninstall and installed 2.26
« Reply #6 on: April 09, 2023, 07:42:10 pm »
Thanks for your reply. I uninstalled Lazarus again, rebooted, installed Lazarus 2.2.2 ( 2 versions back), reinstalled, rebooted, and again got the same error, stopping on  an included file, which I added the full path to the {$I ... }, tried to compile again, and had the same problem on another included file. Again I added the full path to the include file, and another compile attempt and it stopped on a 3rd  $I file.

At this point, I give up.

FWIW I am running Malwarebytes, and did a chkdsk /f and found no system problems.

I see no mention of removing an existing PATH setting to FPC. In the past, I has installed FPC using the separate installer. It put FPC in the PATH settings in  the OS environment, and subsequently trashed any version of Lazarus I later installed.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

steveinalabama

  • New Member
  • *
  • Posts: 30
Re: cannot comppile anything, even after uninstall and installed 2.26
« Reply #7 on: April 10, 2023, 03:42:13 pm »
I created a new app, had nothing but a tbutton on the form with the code behind it going "close" and it ran fone. I added a tmemo, another button to add random numbers to the memo and it also works fine. But after I did a CTRL+S to save the project and unit, it will not compile with an error message ...itentifier not found pjmp_buf...screen copy attached.

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: cannot comppile anything, even after uninstall and installed 2.26
« Reply #8 on: April 10, 2023, 03:55:25 pm »
Strange... Please pack the .lpi, .lpr, .pas and .lfm files into a common zip and upload it here so that we can have a look at the project.

Next, I'd recommend to erase your user profile. In Lazarus open "View" > "IDE Internals" > "About IDE". Under "Global IDE options" write down the directory mentioned after "Primary config directory". Close Lazarus. In the Windows Explorer, rename this directory, so that Lazarus cannot find it any more and is forced to create new user settings (this removes all the changes that you made to the IDE in various dialogs). When you now restart Lazarus all settings are at default. I have never seen an issue when Lazarus was at this initial state.

steveinalabama

  • New Member
  • *
  • Posts: 30
Re: cannot comppile anything, even after uninstall and installed 2.26
« Reply #9 on: April 11, 2023, 04:30:48 am »
Same problem.
 I renamed the Primary config directory to another name. I restarted Lazarus and created a new, simple program...it had 1 button which did a "close". It compiled and ran fine. added a Tmemo and another button and simple code to display 9 random numbers. It ran 5.
I then pressed "Control+s" to save the project and the unit, and after that I tried to compille & Run ago and got the error message
""...identifier not found PJMPBUF", and 2 other identifier not found messages.

I will zip it all up and post it as an attachment.
Thank you.


steveinalabama

  • New Member
  • *
  • Posts: 30
Re: cannot comppile anything, even after uninstall and installed 2.26
« Reply #10 on: April 11, 2023, 04:58:35 am »
the file is attached as a 7zip file

tetrastes

  • Sr. Member
  • ****
  • Posts: 469
Re: cannot comppile anything, even after uninstall and installed 2.26
« Reply #11 on: April 11, 2023, 09:17:31 pm »
Your project is compiled without any warning.
But I see bad warning at your picture. And what are the rest 53 warnings? It looks like you have two installations mixed up. Did you erase C:\Lazarus dir after uninstall?

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: cannot comppile anything, even after uninstall and installed 2.26
« Reply #12 on: April 12, 2023, 12:40:30 am »
Don't give up. I had no problem upgrading on Windows selecting the standard options.

As noted, changing the include paths should not be necessary.
« Last Edit: April 12, 2023, 12:47:59 am by VTwin »
“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)

steveinalabama

  • New Member
  • *
  • Posts: 30
Re: cannot comppile anything, even after uninstall and installed 2.26
« Reply #13 on: April 12, 2023, 03:33:56 am »
Thank you all, very much. I will try to mark this as "Solved".
Most of the warnings were concerning duplicate files.
Awhile back I was testing different backup programs, and I limited the backups to pas, dfm, lpi, lrm, lpr, and lps files. I had some problems with incremental backups working. I got the backups sorted out, but completely forgot I had a folder containing all those Lazarus files.

It surprises me that even after uninstalling Lazarus, then reinstalling, it seems to remember the folder I had been using. When I deleted the entire folder, which contained all the duplicate files in the warnings, it worked fine.


 

TinyPortal © 2005-2018