Recent

Author Topic: Lazarus Release 3.0  (Read 146320 times)

dbannon

  • Hero Member
  • *****
  • Posts: 3826
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus Release 3.0
« Reply #75 on: December 31, 2023, 06:02:40 am »
Honestly, TCH, running lazarus as root ?

I'll make few suggestions but your underlying problem is clear but it sounds like you won't accept that.

  • Because you have a failed install of lazarus-project, (obtained from sourceforge) that should be registered in your apt data base now, so the --reinstall option should (?) work with it. It just needs to configure most likely. But I am not sure. Using "apt-get" instead of apt might be a good idea too, Stretch is pretty old.
  • Otherwise, you have little choice other than removing everything that looks or sounds a bit like lazarus and starting again. Definitely all the lazarus config, where ever it is. Make sure dpkg -l does not list anything to do with Lazarus. (leave your fpc install alone.)
  • Given what you said earlier, and the fact that Stretch is no longer supported, maybe its time for a clean install from scratch ? Bookwork worm has fpc322 in its repo, and a not too distant Lazarus (but a source build of 3.0 would be better).


Finally, please do a bit of reading about the underlying principles of Unix, make a user account and use it for everything except the few operations that really need root. Its a tried and tested model and it works.

Davo


Lazarus 4, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Lazarus Release 3.0
« Reply #76 on: December 31, 2023, 07:56:35 am »
Finally, please do a bit of reading about the underlying principles of Unix, make a user account and use it for everything except the few operations that really need root. Its a tried and tested model and it works.
I can add to that suggestion, when you are a heavy user using multiple installations (FPC and/or Lazarus, doesn't matter), to create a shareable directory that is accessible for users of a certain group and add every user that wants to use FPC/lazarus to that group (for an example how to do that see f.i. here).

I also use such a setup for the Free Pascal compiler itself, though that requires you to have a bootstrap compiler (extract the ppcXXX executable from the previous dot release from the tar files located at SF or cross-compile) in order to be able to compile the compiler manually from source. Though you could probably also opt for directly installing the desired FPC version from the corresponding tarball.

Guaranteed success, never fails and as long as Linux itself doesn't mess up things (such as with the libc updates), the (handcrafted) installations are portable (provided that you have configured everything correctly).

2 cents.
« Last Edit: December 31, 2023, 08:46:53 am by TRon »
Today is tomorrow's yesterday.

TCH

  • Sr. Member
  • ****
  • Posts: 275
    • Oldschool computer
Re: Lazarus Release 3.0
« Reply #77 on: December 31, 2023, 11:44:33 am »
Honestly, TCH, running lazarus as root ?
Honestly. And not just Lazarus, but everything.
I'll make few suggestions but your underlying problem is clear but it sounds like you won't accept that.
Accept what? That you think this happened because i use my systems as root? I accept that you think that. But if this is a dpkg/apt problem, what difference it would have made if i would install the package as sudo dpkg -i lazarus-project_x.y.z_i386-deb as a normal user instead of dpkg -i lazarus-project_x.y.z_i386-deb as root, since the former is technically identical to the latter...?
  • Because you have a failed install of lazarus-project, (obtained from sourceforge) that should be registered in your apt data base now, so the --reinstall option should (?) work with it. It just needs to configure most likely. But I am not sure. Using "apt-get" instead of apt might be a good idea too, Stretch is pretty old.
Apt cannot reinstall the package, it is not in the repository. I installed all the packages via dpkg. But i tried to reinstall the 2.2.6 via deb package and it did the same as if i would install 3.0.0
  • Otherwise, you have little choice other than removing everything that looks or sounds a bit like lazarus and starting again. Definitely all the lazarus config, where ever it is. Make sure dpkg -l does not list anything to do with Lazarus. (leave your fpc install alone.)
I did it. I purged lazarus-project and then did find / -iname "*lazarus*" and deleted the files. The only result was that /var/log/dpkg.log now does not says that there is a half-installed 2.2.6; now it says it for 3.0.0 (note: this is a VBox machine and i restored the disk image after each try):
Code: [Select]
2023-12-31 11:09:17 startup packages purge
2023-12-31 11:09:17 status installed lazarus-project:i386 2.2.6
2023-12-31 11:09:23 remove lazarus-project:i386 2.2.6 <none>
2023-12-31 11:09:23 status half-configured lazarus-project:i386 2.2.6
2023-12-31 11:09:23 status half-installed lazarus-project:i386 2.2.6
2023-12-31 11:09:24 status triggers-pending mime-support:all 3.60
2023-12-31 11:09:26 status triggers-pending man-db:i386 2.7.6.1-2
2023-12-31 11:09:27 status triggers-pending shared-mime-info:i386 1.8-1+deb9u1
2023-12-31 11:09:27 status config-files lazarus-project:i386 2.2.6
2023-12-31 11:09:28 purge lazarus-project:i386 2.2.6 <none>
2023-12-31 11:09:28 status config-files lazarus-project:i386 2.2.6
2023-12-31 11:09:28 status config-files lazarus-project:i386 2.2.6
2023-12-31 11:09:28 status config-files lazarus-project:i386 2.2.6
2023-12-31 11:09:28 status config-files lazarus-project:i386 2.2.6
2023-12-31 11:09:29 status config-files lazarus-project:i386 2.2.6
2023-12-31 11:09:29 status not-installed lazarus-project:i386 <none>
2023-12-31 11:09:29 trigproc mime-support:all 3.60 <none>
2023-12-31 11:09:29 status half-configured mime-support:all 3.60
2023-12-31 11:09:30 status installed mime-support:all 3.60
2023-12-31 11:09:30 trigproc man-db:i386 2.7.6.1-2 <none>
2023-12-31 11:09:30 status half-configured man-db:i386 2.7.6.1-2
2023-12-31 11:09:32 status installed man-db:i386 2.7.6.1-2
2023-12-31 11:09:32 trigproc shared-mime-info:i386 1.8-1+deb9u1 <none>
2023-12-31 11:09:32 status half-configured shared-mime-info:i386 1.8-1+deb9u1
2023-12-31 11:11:07 status installed shared-mime-info:i386 1.8-1+deb9u1
2023-12-31 11:11:08 startup packages configure
2023-12-31 11:17:48 startup archives install
2023-12-31 11:17:54 install lazarus-project:i386 <none> 3.0.0
2023-12-31 11:17:54 status half-installed lazarus-project:i386 3.0.0
2023-12-31 11:17:55 status triggers-pending shared-mime-info:i386 1.8-1+deb9u1
2023-12-31 11:17:55 status triggers-pending man-db:i386 2.7.6.1-2
But it hangs at the same pont. So the problem was not 2.2.6 being "half-installed".
  • Given what you said earlier, and the fact that Stretch is no longer supported, maybe its time for a clean install from scratch ? Bookwork worm has fpc322 in its repo, and a not too distant Lazarus (but a source build of 3.0 would be better).
You might be right about it, but this will be the last resort.
Finally, please do a bit of reading about the underlying principles of Unix, make a user account and use it for everything except the few operations that really need root. Its a tried and tested model and it works.
What makes you think i did not read anything? I know what i am doing when i go as root. I always used my unix(-like) systems as root since i first tried Linux two decades ago and never got hacked, never lost any data with them. The only problems were programs which tried to prevent me using them as root, but i got around that too.

This problem has nothing to do with the root account at all. This is either a package problem and it does not make any difference if you do package handling via sudo, rather than simply do it as root, or something is not enough, or something is missing.

Update: I left dpkg where it hanged when i started to write this post and when i was done and looked back, the installation was complete. Apparently there was no problem at all, it was just this slow... So yeah, something was not enough: the CPU. O_O
I do not recall installing 2.2.6 would be this slow.
« Last Edit: December 31, 2023, 04:12:08 pm by TCH »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12431
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release 3.0
« Reply #78 on: December 31, 2023, 06:34:52 pm »
Under macOS, i386 building of apps does not work (x86_64 is OK):
Code: [Select]
(3104) Compiling translations.pas
/Applications/Lazarus/components/lazutils/translations.pas(252,13) Error: (3026) Wrong number of parameters specified for call to "CompareText"
Update: by commenting the affected lines, the problem can be workarounded.
I just got word, that this should be fixed in the fixes branch, for Lazarus 3.2
(Just forwarding the info)

TCH

  • Sr. Member
  • ****
  • Posts: 275
    • Oldschool computer
Re: Lazarus Release 3.0
« Reply #79 on: December 31, 2023, 07:54:40 pm »
Thanks.

folkeu08

  • Full Member
  • ***
  • Posts: 118
Re: Lazarus Release 3.0
« Reply #80 on: January 02, 2024, 02:09:42 am »
Hi Team,

I've an error with the release 3.00 on windows 10 64 bits.
At the start of the compiled operation, the exe want not find the xml file. I post the two errors messages windows.
On the release 2.2.6, all is ok and the exe start and find the config.xml.
Thanks
François

I declare with "DOM, XMLWrite, XMLRead, XMLStreaming, XMLCfg, XMLPropStorage" for use xml files.
« Last Edit: January 02, 2024, 02:13:53 am by folkeu08 »

dseligo

  • Hero Member
  • *****
  • Posts: 1686
Re: Lazarus Release 3.0
« Reply #81 on: January 02, 2024, 02:59:48 am »
At the start of the compiled operation, the exe want not find the xml file. I post the two errors messages windows.
On the release 2.2.6, all is ok and the exe start and find the config.xml.

This 'config.xml' is configuration for your program?

If yes:
Do you use relative or absolute path to find 'config.xml'?
Check location of your program with ParamStr(0) - compare it with location of 'config.xml' (maybe also check result of GetCurrentDir function).
If you are running program from Lazarus, there is possibility that your exe is somewhere else than 'config.xml'.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12431
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release 3.0
« Reply #82 on: January 02, 2024, 10:45:01 am »
At the start of the compiled operation, the exe want not find the xml file. I post the two errors messages windows.
On the release 2.2.6, all is ok and the exe start and find the config.xml.
https://wiki.freepascal.org/Lazarus_3.0_release_notes#Run_.3E_Run_Parameters

geraldholdsworth

  • Sr. Member
  • ****
  • Posts: 288
Re: Lazarus Release 3.0
« Reply #83 on: January 02, 2024, 12:36:01 pm »
Thank you for v3, and well done team.

Can I ask if there is any possibility of this, and future versions, having a macOS ARM package available alongside the two Intel ones?
fpcdeluxe does, mostly, manage to compile and install such a version but with some missing components which I then need to track down and install.

flowCRANE

  • Hero Member
  • *****
  • Posts: 986
Re: Lazarus Release 3.0
« Reply #84 on: January 02, 2024, 02:17:57 pm »
I've an error with the release 3.00 on windows 10 64 bits.
At the start of the compiled operation, the exe want not find the xml file. I post the two errors messages windows.
On the release 2.2.6, all is ok and the exe start and find the config.xml.

This could be the same problem as I encountered after installing the Lazarus 3.0. If your program uses relative paths but the executable is not in the same directory as the main project file (usually with .lpr extension), the IDE will set different current directory for the program as you expected. The current directory set will point to the directory with main project file instead of the directory where the executable is generated, so all relative paths used in the program will be invalid (ParamStr(0) and all other current-directory-specific functions will return wrong path). This happens only if you run your program using IDE (for example, using F9 key).

This behavior was modified in the Lazarus 3.0 and breaks the backward compatibility. So now, if you need to use relative paths in the program and be able to run/debug your program using IDE, just go to the Run Parameters window and set the $Path($(OutputFile)) string in the Working directory field (see attachment).
Lazarus 4.6 with FPC 3.2.2, Windows 11 — all 64-bit

Working solo on a top-down retro-style action/adventure game (pixel art), programming the engine from scratch, using Free Pascal and SDL3.

AlexTP

  • Hero Member
  • *****
  • Posts: 2715
    • UVviewsoft
Re: Lazarus Release 3.0
« Reply #85 on: January 02, 2024, 02:37:42 pm »
I added the info from 'furious programming' to the wiki page https://wiki.freepascal.org/Lazarus_3.0_release_notes#Run_.3E_Run_Parameters . I still think this part of wiki page needs to be rewritten (only 'Remedy' is ok). It is blurry!

folkeu08

  • Full Member
  • ***
  • Posts: 118
Re: Lazarus Release 3.0
« Reply #86 on: January 02, 2024, 06:19:32 pm »
Hi,
I've make that and it's ok.
Thanks

bdexterholland

  • Jr. Member
  • **
  • Posts: 65
  • uh?
Re: Lazarus Release 3.0
« Reply #87 on: January 08, 2024, 11:52:28 am »
very good!


no one is supporting gtk3/gtk4?
[sleep .....]

calebs

  • Full Member
  • ***
  • Posts: 215
Re: Lazarus Release 3.0
« Reply #88 on: January 09, 2024, 04:27:30 pm »
I have this problem, i'll try to replicate later. I have a project with several forms that i've initiated with lazarus 2.x.
Opened with 3.0 windows 64 bits and proceed to add another form with several controls.
then i go to lpr file and add to uses section and add a line to create the form like the others.
when i run the program and tried to show the form get a sigsev error.
checked and everything looks fine.
Restarted lazarus and then unit dissapeared from uses in lpr, and also the createform.
added again both, run again and get sigsev again.
restarted and check that they are missing again.
i have to open the lpr on notepad and add the lines there, reopened lazarus again and worked as expected.
I will try some more and add more info.
thanks for the good work!

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1353
  • Professional amateur ;-P
Re: Lazarus Release 3.0
« Reply #89 on: January 09, 2024, 11:18:03 pm »
Hey calebs,

then i go to lpr file and add to uses section and add a line to create the form like the others.

Instead of adding stuff manually, can you please use the Projects Options(Ctrl-Shift-F11) and add the new form under the Forms tree item?

This will also alter the *.lpi, making all things project be in synch.

Hope this helps!!

Cheers,
Gus

 

TinyPortal © 2005-2018