Recent

Author Topic: [SOLVED] TPointF Not Found ??  (Read 5601 times)

J-G

  • Hero Member
  • *****
  • Posts: 953
[SOLVED] TPointF Not Found ??
« on: May 13, 2022, 11:21:51 am »
My first project using Laz 2.2 - a very small test for a larger project, which compiled without error using Laz 1.6 - flags up a TPointF 'Identifier not found' and 'Error in type definition'. This appears in [EasyLazFreeType] which must be called by some other Unit but since this project doesn't yet have any 'Text' to display I'm at a loss to understand why it is even being called.

This project is only 80 lines of code so I've attached a .zip file for evaluation. It has a TPanel upon which is displayed four TShapes.

 
« Last Edit: May 18, 2022, 04:43:29 pm by J-G »
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

wp

  • Hero Member
  • *****
  • Posts: 11908
Re: TPointF Not Found ??
« Reply #1 on: May 13, 2022, 11:52:05 am »
I don't get an error in Laz2.2/fpc 3.2.2. Maybe there is a unit compiled with the old compiler in your output folder, and the new compiler fails to find the source, or similar. In such compilation issues, the first recipe is to do a "Run" > "Build", and if this does not solve the issue, do a "Run" > "Clean up and Buld".

Josh

  • Hero Member
  • *****
  • Posts: 1273
Re: TPointF Not Found ??
« Reply #2 on: May 13, 2022, 11:52:39 am »
Hi

I have a clean laz stable installed and your project compiles and runs fine no error.

Have you installed any other packages components? if so are they up to date? not ones from years ago you have for 1.6?

TFloatPoint is part of graphmath unit, a lot of things have moved around and even deprecated since 1.6.

The best way to get accurate information on the forum is to post something wrong and wait for corrections.

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: TPointF Not Found ??
« Reply #3 on: May 13, 2022, 12:03:44 pm »
Hi!

TpointF is definded in the unit Types

Winni

J-G

  • Hero Member
  • *****
  • Posts: 953
Re: TPointF Not Found ??
« Reply #4 on: May 13, 2022, 01:53:58 pm »
Thanks all for your input - I suppose the good news is that others find no error  ::)

This was intended to be a 'clean', completely separate, installation of Lazarus/FPC and is on a separate partition as Drive 'Q'. I was concerned that it asked me to point to fppkg.cfg and it seems that the fact that I could only find that as the one created in 2016 (when I first installed FPC/Laz) is the root of this problem!   

Looking in [Project][Options][Show Options][Command line parameters] I see the first line is 'T:\Pascal Compiler\bin\i386-Win32\fpc.exe' which of course points to FPC V3.0.0.

I have now found FPC.exe (V3.2.2) on drive Q - so can confirm the the installation DID include FPC - but it did not create a new fppkg.cfg which I would have thought would be automatic.

My question now is - how do I create an fppkg.cfg with the correct information to point Laz 2.2 to FPC 3.2.2 ?    since I'm fairly certain that this is the root of my problem. There may be other issues that I need to address which may be solved by a "Clean up and Buld" but until I have a valid fppkg.cfg I doubt that I'll move forward.

FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

J-G

  • Hero Member
  • *****
  • Posts: 953
Re: TPointF Not Found ??
« Reply #5 on: May 13, 2022, 06:53:15 pm »
Still no further forward  :(

Following @Winni's suggestion, I've added 'Types' to the list of Units but I still get 'Indentifier not found' error.

Searching for some option setting that points to FPC3.2.2, I see in [Project][Project Options][Compiler Comands] under 'Compiler' 'Command' the entry "$(CompPath)" with further options in the drop-down list :
   Q:\fpc\3.2.2\bin\x86_64-win64\fpc.exe
   Q:\Stable\fpc\3.2.2\bin\x86_64-win64\fpc.exe
   fpc.exe
   T:\Pascal Compiler\bin\i386-Win32\fpc.exe

Now --
Q:\fpc   does not  exist  -  and has never done so  -  selecting that naturally displays a message to that effect  -  so how has that 'path' been created?

Q:\Stable....  does exist and fpc.exe can be found in the ultimate folder.  Selecting that (rather than "$(CompPath)"  )  does start compilation but then shows a message [The Debugger "" does not exist or is not executable] or after a 'Clean & Build' showing hundreds of hints and warnings - fails to complete the compilation  -  it comes to an end but doesn't display the Form.

T:\.....  of course I know calls fpc V 3.0.0  which is back full circle where I started with the TpointF error  -  as does selecting simple fpc.exe

In the past (V1.6) I've always left most 'Options' as the default - really only changing the 'Target File Name', 'Target OS', 'Target CPU Family' or 'Target Processor'.   Naturally I've turned Debugging on and off as needed, but never needed to mess with any other settings.   ---  Oh yes, I have loaded [Icons]  :)

What was expected to a 'jog' or maybe a 'sprint' at worst, seems to have turned into a 'Marathon' with the prospect of becoming a 'double'  %)  - - - -   and I haven't even thought about installing the Cross-Complier for i386 !

FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

wp

  • Hero Member
  • *****
  • Posts: 11908
Re: TPointF Not Found ??
« Reply #6 on: May 13, 2022, 07:43:17 pm »
Don't play with the settings if you don't know what you are doing. Your project compiles out of the box.

You probably have misconfigured something now. Close the IDE. Go to your project folder. Delete all ppu files. Delete the session file (.lps). Then find your config folder (the one that you needed for the secondary installation) and rename it. When you restart the IDE all your settings are gone and reset to default. Load your project, compile it. It must work. Absolutely test the project that you had uploaded, I cannot tell anything about your other projects.

J-G

  • Hero Member
  • *****
  • Posts: 953
Re: TPointF Not Found ??
« Reply #7 on: May 13, 2022, 09:22:06 pm »
Sorry to be such a pain WP,  but essentially I haven't 'played with the settings'  -  I have tried the various options that appear to be available but always returned to the 'default' option.

I have now deleted the .ppu & .lps files - also renamed the [Config] directory (though I suspect that that may affect the V1.6 installation - I can easily return it to the original though).

Upon running Laz - as expected, I do get the [Configure Lazarus IDE] dialogue box and can see where I may have mis-understood what was expected about the fppkg.cfg location upon first seeing this dialogue.

This time I used [Restore Fppkg configuration] which presented me with a new screen. Attached is a screen grab.  I then used the [Browse] in the right hand screen to select from the new installation of 3.2.2 but even though fpc.exe and fpcmkcfg.exe are both in the selected folder the warning insists that the compiler is not found!

Looking above the [Browse] button & 'prefix' line, I see a reference to "3.0.0\units ..."  so am thinking that this dialogue is looking for fpc V3.0.0 but that may well be a piece of generic text that hasn't been updated (very much clutching at straws!)

I also see on the left hand screen the fppkg reports that 'the RTL is not installed'  and I've just checked the location of the [Config] directory and it has been re-created with the following text :

[Defaults]
ConfigVersion=5
GlobalPrefix=T:\Pascal Compiler\
LocalPrefix={LocalRepository}
GlobalInstallDir={GlobalPrefix}
LocalInstallDir={LocalPrefix}
Compiler=T:\Pascal Compiler\bin\i386-Win32\fpc.exe
OS=win32
CPU=i386
Version=3.0.0

!!!!!!  %) %) %)

FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

wp

  • Hero Member
  • *****
  • Posts: 11908
Re: TPointF Not Found ??
« Reply #8 on: May 13, 2022, 09:38:28 pm »
Did you try to simply ignore this fppkg issue and simply press "Start IDE" without "Restore Fppkg Configuration"? I've seen this issue occasionally (I wonder why I did not see it when I tested the installation for my post here), and IIRC, this was the way i got rid of it: "Start IDE". The IDE will start normally, and when you restart it later that issue will be gone (mostly).

[EDIT]
This is a message from the Lazarus mailing list by Bernd Mueller:

"the workaround below solves the problem for me.

When the "Configure Lazarus IDE" dialog appears for the first Lazarus
start, one can ignore the Fppkg tab and start the IDE as it was possible
with former Lazarus versions. The (for me annoying) dialog will then no
longer appear when Lazarus starts again.

I could not detect any negative effects. The IDE can recompile itself
and installing packages via the integrated online package manager was
also possible. "
« Last Edit: May 13, 2022, 09:50:07 pm by wp »

J-G

  • Hero Member
  • *****
  • Posts: 953
Re: TPointF Not Found ??
« Reply #9 on: May 13, 2022, 09:50:18 pm »
Yes - and I've just done so again  -  and again  - - -   still fires the TpointF error and presumably still thinks that it needs FPC V3.0.0

I suspect the next test is to kill the installation completely and start again but I doubt that I'll know what to do differently  :o

[Edit] posted before I saw your edit WP :(

Just had a thought ---
I could quite easily edit the config file changing the T:\.... to Q:\...
and the =3.0.0  to  =3.2.2

The problen then would be that I would need to change some setting in the Laz options to point to a new Config directory to maintain the original one for V1.6 - - - -  hmmmm...

« Last Edit: May 13, 2022, 09:57:56 pm by J-G »
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

wp

  • Hero Member
  • *****
  • Posts: 11908
Re: TPointF Not Found ??
« Reply #10 on: May 13, 2022, 10:49:55 pm »
I think: installation of Laz using the standard installer is so fast that it is easiest to really start all over again.
- Delete your config folder (that you used for the secondary installation)
- Delete your Lazarus installation folder
- Install anew. Again: select the secondary installation, as I had described above.
- When you start the IDE for the first time you will probably have that fppkg error again. Ignore it and "Start IDE". When the IDE is ready close it and restart it. Does the fppkg error return? If yes: Click "Restore Fppkg configuration", leave the top combobox line empty. In the "Create new Fppkg configuration files" form, click "Browse" and navigate to the FPC folder of your Laz2.2 installation. Suppose that you had installed Laz in folder c:\Lazarus\laz2.2.0-fpc3.2.2_win64; then the folder needed is c:\Lazarus\laz2.2.0-fpc3.2.2_win64\fpc\3.2.2; according to the description you should see the subfolders "units" or "fmkinst" in the directory dialog here. Then click "Write new configuration" files. "Start IDE", close it and restart it - now the fppkg error should be gone.

Compile your test application. If you still get the TPointF error, go to "View" > "IDE Internals" > "About IDE". You see a long list of basic settings of your IDE and your system. In the part "Global IDE options", you see some directories using FPC. You must not see fpc 3.0.0 in there, all mentions of fpc must be v3.2.2!

J-G

  • Hero Member
  • *****
  • Posts: 953
Re: TPointF Not Found ??
« Reply #11 on: May 14, 2022, 09:49:54 am »
Thanks WP  -  I can't do a great deal today as I have a full day Choir rehearsal so I'll start afresh tomorrow - hopefully with a clear head!

Installing 1.6 was a breeeze but it's been some time and memory of 'nitty gritty' detail fades when a job only has to be done many years apart  ;D

FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

dseligo

  • Hero Member
  • *****
  • Posts: 1219
Re: TPointF Not Found ??
« Reply #12 on: May 14, 2022, 07:49:21 pm »
I remembered I had similar problems when installing version 2.2.0 (I don't remember if that was the case with previous versions).

Today I went to install lazarus-2.2.0-fpc-3.2.2-win64 to C:\lazarus220 on a computer with Windows 10 and which had a previous install of Lazarus (version 1.8.0) in directory C:\lazarus.
For a configuration directory, I selected C:\lazarus220_config.

I didn't touch other options, except choosing directories and checking 'Create a new secondary installation'. I noticed that option 'Create a desktop shortcut' was greyed out.

After installation I started lazarus.exe in C:\lazarus220 directory and I was presented with Debugger and Fppkg errors (comboboxes were empty):
Code: Text  [Select][+][-]
  1. Debugger: 'Error: file not found'
  2. Fppkg:
  3.   File: C:\Users\*** my account name ***\AppData\Local\FreePascal\fppkg\fppkg.cfg
  4.  
  5.   Error: there is a problem with the Fppkg configuration. (Fppkg reports that the RTL is not installed.)
  6.  
  7.   You could try to restore the configuration files automatically, or adapt the configuration file manually.

Actually this was 2nd attempt to install it. First time tried wp's advice on ignoring Fppkg error, 'Start IDE', close it and started again, but it was exactly the same. 'Restore Fppkg configuration' also didn't worked ('Write new configuration files' was always greyed out because it was to old tools or something like that).

Then I looked in other tabs:
Code: Text  [Select][+][-]
  1. Lazarus
  2.   Combobox: C:\lazarus220\
  3.   Memo: OK
  4. Compiler
  5.   Combobox: fpc.exe
  6.   Memo: File: C:\lazarus\fpc\3.0.4\bin\i386-Win32\fpc.exe
  7.         OK
  8. FPC sources
  9.   Combobox: $Path($(CompPath))\..\..\source
  10.   Memo: Directory: C:\lazarus\fpc\3.0.4\source\
  11.         OK
  12. Make
  13.   Combobox: $Path($(CompPath))\make.exe
  14.   Memo: File: C:\lazarus\fpc\3.0.4\bin\i386-Win32\make.exe
  15.         OK

I uninstalled and emptied directories C:\lazarus220\ and C:\lazarus220_config\ and then installed Lazarus 2.2.0 again (to be sure everything is as installed and to take screenshots of installation).
I changed value of Compiler tab combobox to (with use of dropdown button): $(LazarusDir)\fpc\3.2.2\bin\x86_64-win64\fpc.exe
Memo changed to:
Code: Text  [Select][+][-]
  1. File: C:\lazarus220\fpc\3.2.2\bin\x86_64-win64\fpc.exe
  2.                  OK

Immediately after that, FPC sources, Make and Debugger tabs fixed themselves.
Fppkg tab still showed error, so I clicked 'Restore Fppkg configuration'. In the window that opened, combobox was already filled with 'C:\lazarus220\fpc\3.2.2'.
BUT: It said it will write configuration to C:\Users\*** my account name ***\AppData\Local\FreePascal\fppkg\fppkg.cfg and Fppkg compiler configuration to %LocalAppData%\FreePascal\fppkg\default. I didn't see any way to change where this configurations would be written.
I made backup of this files and write configuration.

After that Lazarus 2.2.0 was starting without complaining. Also your test project Circles.zip was compiled and run without problem (and any further questions or configuring).

If it is needed, I have screenshots of every step.

So, I think the 'Create a new secondary installation' option picks up configuration of old Lazarus installation instead of new one. Further more, I don't like that this fppkg data overwrite existing data from previous installation.

That being said, I prefer to use FPCUPdeluxe. On my other computer I have installation of Lazarus 2.0.10, which I installed on 16.10.2020. Fppkg files mentioned above have the same date, and I installed couple of other versions of Lazarus with FPCUPdeluxe afterwards (including 2.2.0).
Only thing I have to mention is that 64-bit version of FPCUPdeluxe made me problems, so I use 32-bit version.
« Last Edit: May 14, 2022, 07:50:58 pm by dseligo »

wp

  • Hero Member
  • *****
  • Posts: 11908
Re: TPointF Not Found ??
« Reply #13 on: May 14, 2022, 08:59:56 pm »
I can reproduce the issue when I delete the folder c:\users\<my name>\appdata\local\FreePascal\fppkg. The next time, when I start Laz 2.2 (or Laz main/fpc3.2.2, or Laz main/fpc main) it comes up with the Fppkg error (screenshot fppkg-1). I click on "Restore Fppkg configuration". The appearing "Generate new fppkg configuration files" contains already the correct directory (if not, use "Browse" to navigate to it). After clicking "Write new configuration files" (screenshot fppkg-2) the IDE can be started successfully. When I close and restart it, the Fppkg error does not appear any more.

I agree that it is very confusing that this fppkg.cfg file seems to be shared between various fpc installations. But it definitely does not mean that the secondary Lazarus installation is not working.
« Last Edit: May 14, 2022, 09:32:05 pm by wp »

dseligo

  • Hero Member
  • *****
  • Posts: 1219
Re: TPointF Not Found ??
« Reply #14 on: May 14, 2022, 10:06:03 pm »
I agree that it is very confusing that this fppkg.cfg file seems to be shared between various fpc installations. But it definitely does not mean that the secondary Lazarus installation is not working.

But I think the main issue is that second installation picks up wrong fpc compiler (from previous installation). Could you reproduce that (or check from which directory fpc compiler is chosen)?

 

TinyPortal © 2005-2018