Recent

Author Topic: Upgrade to 2.4.4. - DESASTER  (Read 1089 times)

Nicole

  • Hero Member
  • *****
  • Posts: 970
Upgrade to 2.4.4. - DESASTER
« on: December 01, 2022, 03:45:05 pm »
I used Lazarus 2.2.2 in a Win 7 VM
and tried to upgrade to 2.2.4
using
lazarus-2.2.4-fpc-3.2.2-win64.exe

I wanted the IDE just to work on, - where I stopped my project yesterday.

And I ended up with a disaster, neither the IDE is really usable any more, nor any of my projects.
These are the details:

1)
There is one unit in my project, of which the project inspector lists it and the compiler says "is not there".
I re-added it, answered "yes" to "add path", - same results. "not found"
If the other units are found, I do not know.

2)
Source elements are "not found" any more, like e.g. the string-method "mid".

3)
All my components which were installed in 2.2.2 are gone.
Nearly all.
One is half installed. The one which I uninstalled in 2.2.2., because I disliked it.


4) Files are "double there" on "test", here 3 lines of an long list

WARNUNG: ppu ist zweimal vorhanden: C:\lazarus\fpc\3.2.2\units\x86_64-win64\zz fv\app.ppu, C:\lazarus\fpc\3.2.2\units\x86_64-win64\fv\app.ppu
WARNUNG: ppu ist zweimal vorhanden: C:\lazarus\fpc\3.2.2\units\x86_64-win64\zz fv\asciitab.ppu, C:\lazarus\fpc\3.2.2\units\x86_64-win64\fv\asciitab.ppu
WARNUNG: ppu ist zweimal vorhanden: C:\lazarus\fpc\3.2.2\units\x86_64-win64\zz fv\colortxt.ppu, C:\lazarus\fpc\3.2.2\units\x86_64-win64\fv\colortxt.ppu


If anybody has a hint for me, it is very appreciated. But please be SURE, that the hint may work. Every attempt is at least one hour work for me. Under the line.

I will reset the VM to the snapshot of 2.2.2 now and hope, there will be a solution for the new version.



440bx

  • Hero Member
  • *****
  • Posts: 3946
Re: Upgrade to 2.4.4. - DESASTER
« Reply #1 on: December 01, 2022, 03:50:24 pm »
I will reset the VM to the snapshot of 2.2.2 now and hope, there will be a solution for the new version.
The simplest and safest would likely be to reset the VM to the snapshot of 2.2.2 and after that, install a completely separate instance of Lazarus/FPC using FPCUPDELUXE (choosing whatever version you want in the process.)

That way, you know that no matter what happens, you still have a working 2.2.2 installation.

HTH.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Upgrade to 2.4.4. - DESASTER
« Reply #2 on: December 01, 2022, 03:54:41 pm »
I will reset the VM to the snapshot of 2.2.2 now and hope, there will be a solution for the new version.
The simplest and safest would likely be to reset the VM to the snapshot of 2.2.2 and after that, install a completely separate instance of Lazarus/FPC using FPCUPDELUXE (choosing whatever version you want in the process.)

That way, you know that no matter what happens, you still have a working 2.2.2 installation.

HTH.
I just can second that plus, using [stable] and not the latest ensure that all should in theory be compatible and tested.
(on windows this way of doing would install 2.2.2 since 2.4.4 is not out yet)
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9793
  • Debugger - SynEdit - and more
    • wiki
Re: Upgrade to 2.4.4. - DESASTER
« Reply #3 on: December 01, 2022, 03:57:48 pm »
3)
All my components which were installed in 2.2.2 are gone.
Nearly all.
One is half installed. The one which I uninstalled in 2.2.2., because I disliked it.

You need to rebuild the IDE once.

This is normal (unfortunately).
The installer though could do a better job, pointing it out.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9793
  • Debugger - SynEdit - and more
    • wiki
Re: Upgrade to 2.4.4. - DESASTER
« Reply #4 on: December 01, 2022, 05:54:12 pm »
WARNUNG: ppu ist zweimal vorhanden: C:\lazarus\fpc\3.2.2\units\x86_64-win64\zz fv\app.ppu, C:\lazarus\fpc\3.2.2\units\x86_64-win64\fv\app.ppu
WARNUNG: ppu ist zweimal vorhanden: C:\lazarus\fpc\3.2.2\units\x86_64-win64\zz fv\asciitab.ppu, C:\lazarus\fpc\3.2.2\units\x86_64-win64\fv\asciitab.ppu
WARNUNG: ppu ist zweimal vorhanden: C:\lazarus\fpc\3.2.2\units\x86_64-win64\zz fv\colortxt.ppu, C:\lazarus\fpc\3.2.2\units\x86_64-win64\fv\colortxt.ppu


If anybody has a hint for me, it is very appreciated. But please be SURE, that the hint may work. Every attempt is at least one hour work for me. Under the line.

This is odd.... The "zz fv" should not exist.

I have no idea, how this could have been created. I have an original Laz 2.2.4 installation and no such path exists.

I would recommend to "uninstall" or move the old Lazarus folder to some other place...
- Mind, a moved install will NOT work. But if it is moved back, then it will work again.
- There is no need to fiddle in the windows registry (all that is in the registry is the path to the uninstaller, and file associations for icons and dbl-click - the installer will update that anyway)
- Your IDE config is in the "Primary config path" usually: C:\Users\YOUR_NAME\AppData\Local\lazarus  and should be kept. (you can back it up)

Then do a new install.


As for the other issues you had, I wouldn't be sure. But given the above, if you chose do try fixing it: Start with the above. Then rebuild (for your packages)

At this point, it also depends on what backups you have of project files.
Once you had them open in a broken environment (i.e. an IDE that does not work), it is possible they were changed (and broken too).
If your IDE (including the 2.2.2) was configured to create backups, check the backup folder for an older *.lpi (with a file-date before you tried to upgrade)



Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: Upgrade to 2.4.4. - DESASTER
« Reply #5 on: December 01, 2022, 06:37:08 pm »
My backup is a snapshot of the VM with the whole thing working in 2.2.2 and all projects compiling.
I reverted to it.

The 2.2.4 installing-routine asked me, if I want to uninstall 2.2.2. And I answered yes.
Then I was asked if I want to keep all my settings and I said yes.

So we all have our not filled wishes, smile.
In the long run, I will create a new VM from scratch.
Then I try 2.2.4 again.

What about the others?
Did you try 2.2.4 or said to yourself, "we never know if we can trust a new version"?


wp

  • Hero Member
  • *****
  • Posts: 11857
Re: Upgrade to 2.4.4. - DESASTER
« Reply #6 on: December 01, 2022, 06:59:53 pm »
The 2.2.4 installing-routine asked me, if I want to uninstall 2.2.2. And I answered yes.
Then I was asked if I want to keep all my settings and I said yes.
This is on a VM with Windows guest, isn't it?

This this case you have the windows installer and you should check the "secondary installation" box. This way you'll get a separate installation, which does not interfere with the old one (which you still can continue to use). I always do it like this, and I never had any problems. If you want more detailed instructions, search the forum for "secondary installation", I already described the process several times.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9793
  • Debugger - SynEdit - and more
    • wiki
Re: Upgrade to 2.4.4. - DESASTER
« Reply #7 on: December 01, 2022, 08:04:08 pm »
If you go back to your VM snapshot, could you please check if the "zz fv" folder exists (before you did install)?

The installation process is (again unfortunately) not so great.

If you click "uninstall", or even if you uninstall before you do a new install, it will remove exactly and only the files that the installer wrote to the disk.
Any other file that has been put into the install folder will remain.
This is so that files placed by the user are not deleted.

Since I think then "zz fv" folder was not put there by any installer (not 2.2.2 nor 2.2.4) it wont be removed by the uninstaller. It needs to be deleted by hand.

tetrastes

  • Sr. Member
  • ****
  • Posts: 473
Re: Upgrade to 2.4.4. - DESASTER
« Reply #8 on: December 01, 2022, 08:28:07 pm »
What about the others?
Did you try 2.2.4 or said to yourself, "we never know if we can trust a new version"?
Do you think that you are the first since September 28?  :D
I installed it two months ago and have no problem. But I never upgrade, I always uninstall previous version manually and delete lazarus folder.
In my experience, upgrade is a beast, which too often ends with broken things, and not only in lazarus.

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: Upgrade to 2.4.4. - DESASTER
« Reply #9 on: December 02, 2022, 11:57:35 am »
about the
zz fv

This is really strange, the more, because I deleted the whole content of "x86_64-win64".

"zz" says something to me.
If it is the case, that I find a directory or a file, of which I wonder, "does this need anybody anymore or can I delete it?"
- then I will usually rename it in a way that I add "zz" to the name as front. Because I am not sure, if it can be deleted. This habit saved my installations in more than one cases.

If after a time nothing happens, I can sort by name and delete my "zz" files.
In this case anything seems to have watched my renaming.
And the file was re-created in x86_64-win64

In other words: Anything in my systems seems to have listed zz fv as "needed" and cares for it to be re-created and watched for renaming.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9793
  • Debugger - SynEdit - and more
    • wiki
Re: Upgrade to 2.4.4. - DESASTER
« Reply #10 on: December 02, 2022, 01:28:29 pm »
"zz" says something to me.
If it is the case, that I find a directory or a file, of which I wonder, "does this need anybody anymore or can I delete it?"
- then I will usually rename it in a way that I add "zz" to the name as front. Because I am not sure, if it can be deleted. This habit saved my installations in more than one cases.

Ok, done similar myself. But in this case doesn't work.

There is a file fpc.cfg (next to the fpc.exe), and it has settings for fpc in which folders to look for ppu files.
On of that settings includes .....\units\x86_64-win64\*
And hence your zz folder is still found. And the name of the folder does not matter to fpc.

Because in pascal there are only units. Each unit must have a distinct name. It does not matter in which folder a unit is. (if you have dotted unit names, then the name is distinct. But this here is not a dotted unit name).
The folder contains ppu, and that are pre-compiled units. The filename must equal the unit-name.
Therefore the files fv\fvcommon.ppu and zzfv\fvcommon.ppu are two units with identical name.



Side note...

Once you installed fpc, you should not move/rename the folder.

In the fpc installation is the file fpc.cfg => and it contains absolute paths.
E.g.: -FuC:\FPC\fpc_3.2.3\units\$fpctarget\*

If indeed you must rename the fpc folder (or any of the outer/containing folders), then you must update all those.

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: Upgrade to 2.4.4. - DESASTER
« Reply #11 on: December 02, 2022, 01:42:55 pm »
Thank you for this explanation.
This is very useful, not only for installation, but for backup of my work and settings.

about settings:
My user-defined icons tend to trick my by flea-hopping.
I kept them on one place for a while by manual selecting "save desktop as default".

About this desktop: I want the icons to be saved by default, but not the size and position of the open windows, as they are messed all the time. So I deselected the desktop-save-automatically-setting.

Am I right, that a copy of fpc.cfg would help the user-defined-icons to migrate into a new installation or VM?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9793
  • Debugger - SynEdit - and more
    • wiki
Re: Upgrade to 2.4.4. - DESASTER
« Reply #12 on: December 02, 2022, 01:45:31 pm »
Few notes on Lazarus.
( PCP = primary config path / see earlier mention / can be changed for 2ndary installs ...)

If you install a package, it will be
- Added to PCP\packagefiles.xml  (unless its a package that came with the install, and is already known)
  So if you downloaded a package, and open it: This is where Lazarus remembers its location.
  Thus after an upgrade (if you did not explicitly delete your conf), Lazarus still knows where the package is
- Added to PCP\staticpackages.inc
  This is used to compile the package into the IDE (ide needs to be recompiled)
  Thus the IDE can display the components in the designer. Or new menu entries / toolbars can be added to the IDE

So after upgrade you got a pre-build IDE that does not have the packages compiled in.
You need to recompile it once.

However (and that differs from what you got): If you don't, recompile the IDE
- You can't open the LFM in the designer, because the IDE does not have the components build in
- your projects should still compile (the location of the package is known)
  The exception is, if the IDE believes the LFM file was modified => because then it needs to load the LFM to rewrite resources.
  But it can't load the LFM (It can display the text, but not process it)



On Windows, usually you have write access to the install folder C:\Lazarus
Therefore, if you make changes (like installing a package)  your lazarus.exe and ppu files are changed in that folder.
After the upgrade, your custom build lazarus.exe has been replaced by the new version (without your packages build in), and the new version will be run next time you start the IDE.

On Linux (in most cases) or Window, if you installed into a write protected folder (using admin rights), then lazarus can' update the lazarus.exe in that folder (nor the ppu). Therefore it places the files into a shadow-copy in the PCP.
After an update the shadow copy still exists.
If you use startlazarus, it will start the old version from the shadow copy. The you get a complain about version mismatch => also fixed by a rebuild.


So well yes, upgrading is not ideal....

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9793
  • Debugger - SynEdit - and more
    • wiki
Re: Upgrade to 2.4.4. - DESASTER
« Reply #13 on: December 02, 2022, 02:04:05 pm »
I kept them on one place for a while by manual selecting "save desktop as default".

I haven't made use of the "desktop" feature myself. So I can't comment much on it. I also don't use Anchordocking, in case you do.
I am not sure what you mean by "icons"

Quote
Am I right, that a copy of fpc.cfg would help the user-defined-icons to migrate into a new installation or VM?
fpc.cfg should have nothing to do with "desktop".
Also not with any icons.

FPC accepts command line options (double check the upper/lower casing against the docs / in case I mixed them up)
-Fu   folders in which to look for pre-compile ppu units
-FU   folders in which to look for pas sources
- A few others like include files... / And some -dDEFINES

This does in no way affect the visuals of the IDE.
It is used only
- by FPC to find files during compilation
- (IIRC) by the IDE / codetools, to find sources for code completion/navigation


desktop config will be in one of the xml files in the PCP. (Or maybe / not sure / part may be in the project session ?)

Keep a backup, make changes in the IDE, do a diff (e.g. WinMerge to diff folders)



Note:

"Project sessions" (list of open files, etc) => there is an option to save them
- as part of the project / in the lpi file
- in an lps file, in the project folder (usually the best option)
- in an lps file, in the PCP

In case of the last option you get conflicts if you have 2 projects with the same name, but in diff folders (which is totally allowed and fine)


 

TinyPortal © 2005-2018