Recent

Author Topic: Ubuntu Mate / Laz 2.2.6 / FPC 3.2.2 - unable to write \usr\...  (Read 2015 times)

ArtLogi

  • Full Member
  • ***
  • Posts: 194
Re: Ubuntu Mate / Laz 2.2.6 / FPC 3.2.2 - unable to write \usr\...
« Reply #15 on: October 05, 2024, 11:02:06 pm »
I can see it now for myself. 2.2.6 seems to exhibit this behaviour. I Initially tested with 3.0

edit: A small side note though, I never use the package manager to do my lazarus installation. and do it manually instead (if that sound too complicated for you in case wanting to try yourself then you might want to consider using fpcupdeluxe instead).
IIRC fpcupdeluxe was broken atm. or it was more complex than manual.. I can't remember, I just use the easiest route for my small hobby tinkering in Lazarus so usually it is sudo apt... or win installer. :) Need to go to 3.0 when I have next time patiense to tinker with tools themselves.

@MarkMLI
Laz > Tools > Example projects
OR
Laz > Projects > Close project > View example...
Sorry I might have used incorrect term .. wizard might have been better description.
While Record is a drawer and method is a clerk, when both are combined to same space it forms an concept of office, which is alias for a great suffering.

TRon

  • Hero Member
  • *****
  • Posts: 3819
Re: Ubuntu Mate / Laz 2.2.6 / FPC 3.2.2 - unable to write \usr\...
« Reply #16 on: October 05, 2024, 11:10:20 pm »
IIRC fpcupdeluxe was broken atm. or it was more complex than manual.. I can't remember, I just use the easiest route for my small hobby tinkering in Lazarus so usually it is sudo apt... or win installer. :) Need to go to 3.0 when I have next time patiense to tinker with tools themselves.
No problem ArtLogi.

In that case then take the initial replies into consideration and make a manual copy of the example.

Whenever you do decide to install a newer version (using fpcupdeluxe or otherwise) then please take "multiple lazarus" wiki into consideration and perhaps even better remove the Lazarus installation from your package manager (You can still use the FPC compiler from the package manager as there isn't a newer version released (yet) though personally I create those myself as well and you can also use FPCUpDeluxe for that).

edit: btw and fwiw I just successfully used fpcupdeluxe 2.4.0e (default linux 64-bit) and installed a fresh FPC 3.2.2 and Lazarus 3.4 without any issues (started fpcupdeluxe, selected a installation folder, then selected FPC and Lazarus version from the 2 corresponding list-boxes and pressed installed/update FPC+Lazarus). Note that this version of FPCUpDeluxe does not seem to support Lazarus 3.6 and I haven't tried with the experimental FPCUpdeluxe)
« Last Edit: October 05, 2024, 11:34:10 pm by TRon »
I do not have to remember anything anymore thanks to total-recall.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8134
Re: Ubuntu Mate / Laz 2.2.6 / FPC 3.2.2 - unable to write \usr\...
« Reply #17 on: October 05, 2024, 11:19:37 pm »
Laz > Tools > Example projects
OR
Laz > Projects > Close project > View example...
Sorry I might have used incorrect term .. wizard might have been better description.

Ah yes. Although (at least with v2) it looks as though the list only includes "standard" examples: my 2.2.6 has LazMapViewer installed and its examples haven't been added.

In any event, I hope my witterings were of some interest :-)

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

dbannon

  • Hero Member
  • *****
  • Posts: 3196
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Ubuntu Mate / Laz 2.2.6 / FPC 3.2.2 - unable to write \usr\...
« Reply #18 on: October 06, 2024, 04:01:41 am »
At one stage, the Lazarus IDE Examples system changed from trying to run an example in root space to moving it to a writable space in the config directory. Just when, I am not sure (bit sad, it was, to some degree, my project).  The new model was certainly there in Lazarus 3.0 and being a substantial change rather than a bug fix, maybe that was the change over ? 

I am somewhat surprised that ArtLogi is getting Lazarus 2.2.6 from an Ubuntu Mate recent install. I would have expected Ubuntu 24.04 (available for five or six months) to be using, perhaps Lazarus 3.2 (which definitely has the new Examples System).  I think it would have just missed 3.4.

Finally, the new examples system applies to the examples bundled with Lazarus, they have a small json config file added that defines where each example is and how it should be described in the listview on the Examples page.

https://wiki.freepascal.org/Lazarus_Examples_Window

At the time, I planned to try and push some example config files out to various third party packages but have been lax I am afraid. Further, I am unsure of just how easy it is to get OPM packages updated ....

On the other hand, third party packages (including OPM ones) are not installed in root space so do not need to be moved, its just that for the end user, they are harder to find and don't appear in the defined categories.

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

ArtLogi

  • Full Member
  • ***
  • Posts: 194
Re: Ubuntu Mate / Laz 2.2.6 / FPC 3.2.2 - unable to write \usr\...
« Reply #19 on: October 06, 2024, 12:11:57 pm »
Thanks you for anyone contributed to my small issues. MarksMLIs explanation for /usr/ was interesting and indeed helpful to understand a bit further again the penguins nest (and other "nixes").

At one stage, the Lazarus IDE Examples system changed from trying to run an example in root space to moving it to a writable space in the config directory. Just when, I am not sure (bit sad, it was, to some degree, my project).  The new model was certainly there in Lazarus 3.0 and being a substantial change rather than a bug fix, maybe that was the change over ? 

I am somewhat surprised that ArtLogi is getting Lazarus 2.2.6 from an Ubuntu Mate recent install. I would have expected Ubuntu 24.04 (available for five or six months) to be using, perhaps Lazarus 3.2 (which definitely has the new Examples System).  I think it would have just missed 3.4.

Finally, the new examples system applies to the examples bundled with Lazarus, they have a small json config file added that defines where each example is and how it should be described in the listview on the Examples page.

https://wiki.freepascal.org/Lazarus_Examples_Window

At the time, I planned to try and push some example config files out to various third party packages but have been lax I am afraid. Further, I am unsure of just how easy it is to get OPM packages updated ....

On the other hand, third party packages (including OPM ones) are not installed in root space so do not need to be moved, its just that for the end user, they are harder to find and don't appear in the defined categories.

Davo
I must point out that I'm not running the package manager version of Lazarus, the package manager version was considerably older (2.2.0) and was totally broken with latest Ubuntu LTS as reported by many. I used one weekend to study how I do manage to get a working Lazarus to my laptop environment and with help -  for now forgotten forum thread - I installed it manually from *.dep files and IIRC did try out first  with the fpcupdeluxe with poor results. All this somewhere closer to the beginning of the year. I was eventually testing if the installation would be working by trying to run the example projects, but as seen it had some issues and I did give up back then ... and now did start again. Summa summarum I do have working install, but this version of Laz is a bit misbehaving with the example part. Thank you for the work you have done with the examples, for hobbyist like me they are nice resource of "how to's".

Quote from: /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
While Record is a drawer and method is a clerk, when both are combined to same space it forms an concept of office, which is alias for a great suffering.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8134
Re: Ubuntu Mate / Laz 2.2.6 / FPC 3.2.2 - unable to write \usr\...
« Reply #20 on: October 06, 2024, 01:16:58 pm »
Thanks you for anyone contributed to my small issues. MarksMLIs explanation for /usr/ was interesting and indeed helpful to understand a bit further again the penguins nest (and other "nixes").

I'd add that it's worth considering that as well as being "owned by" different people, different areas of a classical unix system might have been stored on very different types of medium. So there might have been files in /bin, /sbin and so on which were used to boot the kernel and first few programs, after which a much larger and faster disc was mounted containing /usr and /usr/local, and then per-user directories in /home were accessed over NFS. And swapspace might have been on a totally different type of device: predating unix I've seen (physically) big head-per-track discs used for this with the access time dominated by the rotational speed without the need to kick the mass of a moving-head assembly around. Plus of course on really big systems some categories of files might have been moved onto tape when not needed (when I started using PostgreSQL about 20 years ago it still had internal hooks for tertiary storage on tape, but the author had defected to IBM...).

Quote
I must point out that I'm not running the package manager version of Lazarus, the package manager version was considerably older (2.2.0) and was totally broken with latest Ubuntu LTS as reported by many.

Outdated or occasionally broken packages being shipped by distreaux is not unusual, and is of course not the FPC/Lazarus core team's problem. My usual MO is to get the prerequisites from the distro, download the oldest viable FPC binaries from the FPC project, then to sequentially build from source up to the current version. However you might have noticed a thread to which I've added a bit over the last couple of days: the transition from Debian 11 to 12 (roughly mid-'23) has caused multiple problems, and you need to be aware of the possibility of things getting "fun" when you upgrade from Ubuntu 22.04.

I'm not sure anybody's said this explicitly: every version of Lazarus has an optimal corresponding version of FPC. You can see the current combination from the IDE's About dialog(ue).

Quote
and IIRC did try out first  with the fpcupdeluxe with poor results.

I don't use it for native stuff, but it is very good indeed for cross compilers etc. and if you start looking at e.g. the RP2040 ("Pico" board etc.) I strongly recommend it.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

dbannon

  • Hero Member
  • *****
  • Posts: 3196
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Ubuntu Mate / Laz 2.2.6 / FPC 3.2.2 - unable to write \usr\...
« Reply #21 on: October 09, 2024, 01:33:46 pm »

I must point out that I'm not running the package manager version of Lazarus, the package manager version was considerably older (2.2.0) and was totally broken with latest Ubuntu LTS as reported by many.

Couple of possible meanings here, I will comment on each.

The Ubuntu package Manager, "Software", a clone of the Gnome product with the same name, is the first thing I would replace when building a Ubuntu box. Synaptic is great !

But maybe you mean that the Ubuntu package system had an old version of Lazarus, yes, that is the nature of a LTS OS. Most of the packages don't change for the lifetime of the Ubuntu release. So, consider an Ubuntu released in 2022, it gets its Lazarus (and many other packages) from Debian Testing, a version that was current a few months previously. But two years later, its still has the same Lazarus only now its a bit more than two years old.

I was not aware of a broken Lazarus in U2404, I build VMs and test against it from time to time and all seemed OK. But in any case, don't use the package manager model on any LTS distro.

Build your Lazarus from source, please !

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

Thaddy

  • Hero Member
  • *****
  • Posts: 16413
  • Censorship about opinions does not belong here.
Re: Ubuntu Mate / Laz 2.2.6 / FPC 3.2.2 - unable to write \usr\...
« Reply #22 on: October 10, 2024, 06:55:52 am »
I usually just compile fpc with sudo righs, because I am lazy. Usually /usr is a protected directory.
Code: Bash  [Select][+][-]
  1. sudo make clean all install INSTALL_PREFIX=/usr
There is nothing wrong with being blunt. At a minimum it is also honest.

dbannon

  • Hero Member
  • *****
  • Posts: 3196
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Ubuntu Mate / Laz 2.2.6 / FPC 3.2.2 - unable to write \usr\...
« Reply #23 on: October 10, 2024, 11:43:32 am »
I usually just compile fpc with sudo righs, because I am lazy. Usually /usr is a protected directory.
Code: Bash  [Select][+][-]
  1. sudo make clean all install INSTALL_PREFIX=/usr

Why not make life easy and install it in user space ?  Unless its on a shared system, absolutely no reason to install into root space. eg
Code: Bash  [Select][+][-]
  1. sudo make clean all install INSTALL_PREFIX=/home/dbannon/bin/FPC

For me. Note I don't quote $HOME or ~ there, probably works but I have not tested. You will need to add an appropriate clause to your path, usually with an entry in ~/.bashrc.  All doc'ed on the wiki.

Warning, any one who posts that they get a message "/home/dbannon does not exist" looses 10 points.

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

Thaddy

  • Hero Member
  • *****
  • Posts: 16413
  • Censorship about opinions does not belong here.
Re: Ubuntu Mate / Laz 2.2.6 / FPC 3.2.2 - unable to write \usr\...
« Reply #24 on: October 10, 2024, 11:46:03 am »
Well, I prefer installing in usr, but note "prefer", your solution is just as good for many. ~/
(couldn't find the emoticon for that..)
Installing in user space requires possibly some exports for the paths.
« Last Edit: October 10, 2024, 12:01:46 pm by Thaddy »
There is nothing wrong with being blunt. At a minimum it is also honest.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8134
Re: Ubuntu Mate / Laz 2.2.6 / FPC 3.2.2 - unable to write \usr\...
« Reply #25 on: October 10, 2024, 12:24:23 pm »
I've got several versions and for less-demanding stuff I'd prefer to use something like 2.0.8+3.0.4 because of various breaking changes the FPC and Lazarus teams introduced. However as I've recently wittered in a different thread FPC 3.2 is the minimum viable on Debian-12... or its derivatives, which at some point will almost certainly include Ubuntu.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018