Recent

Author Topic: Broken Installation  (Read 22214 times)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3854
  • I like bugs.
Re: Broken Installation
« Reply #15 on: February 06, 2014, 09:18:03 pm »
But I'm not the only one. At least one other person, maybe more, added that he had problems with those debs.
Is the "everybody else" you are referring to installing on debian, ubuntu, or something else that nominally uses the .deb packages?
As to the many years, I haven't tried the sourceforge debs for a a long time. No point in it, as the rpms work well.

Ok, fair enough. I have not done any deep research of possible problems.
I have tested with Mint Linux which is based on Ubuntu.
FPC and Lazarus packages don't have many lib dependencies so they should be easier than average to install.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux.

Rails

  • Guest
Re: Broken Installation
« Reply #16 on: February 06, 2014, 09:28:29 pm »
When Laz is installed from the debs, or the rpm via alien, it will be under /usr, and we are still dealing with an IDE that can't be rebuilt because of permission issues, at least for the first rebuild.

No. As the wiki for startlazarus says:
  "the IDE builds its new executable into a sub folder of the primary config path, for example ~/.lazarus/bin/".
See, the primary config path is ALWAYS a directory where you have write access. It is under your home dir.
This system works because 2 programs, Lazarus and StartLazarus, both support it.
Lazarus builds itself into the user's home dir. StartLazarus finds the new executable from there.

You probably didn't see this. I added this not too long ago.

" At least that was still the case for me when I moved to 1.2RC2 recently."

As I recall, the rebuild IDE process chokes when it tries to delete one or more existing files under /usr.

I guess when the 1.2 final comes out or the next RC, whichever is first, I will go through the process again and make note of what happens. If there are issues,  I will post them.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3854
  • I like bugs.
Re: Broken Installation
« Reply #17 on: February 06, 2014, 10:06:48 pm »
As I recall, the rebuild IDE process chokes when it tries to delete one or more existing files under /usr.

It proves you have something wrong with your Lazarus configuration. Maybe it is related to your installation problems.
It would be nice to find the fundamental reason and exact steps to reproduce it.

Quote
I guess when the 1.2 final comes out or the next RC, whichever is first, I will go through the process again and make note of what happens. If there are issues,  I will post them.

There are no open issues about installation targeted for 1.2. The release will not change anything for you.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux.

Rails

  • Guest
Re: Broken Installation
« Reply #18 on: February 06, 2014, 11:11:35 pm »

It proves you have something wrong with your Lazarus configuration. Maybe it is related to your installation problems.
It would be nice to find the fundamental reason and exact steps to reproduce it.

There are no open issues about installation targeted for 1.2. The release will not change anything for you.

It may not, but I can at least provide more exact detail as to what is going on. Prior to your changing the wiki, I saw nothing about the need to change permissions as being abnormal. What I was experiencing exactly matched the write up in the wiki.
 
Several installations ago, I did as I advised the OP and wiped everything Laz and FPC related off of my systems and reinstalled, which resulted in working systems (after I changed the permissions (ownership really) in /usr/libwhatever/lazarus . I have been running the default installation ever since. This particular machine was brand new a couple of months ago. It has only had the two 1.2 release candidates on it. Again, they were the default installations which required only the ownership/permissions change in order to rebuild the IDE.

If my configuration really is bad, it wan't from anything I changed. As to installing rpms via alien, I checked both the debian repository and sourceforge debs. I'm not a deb package expert by any means, but both appeared to be designed to be installed under /usr. 

I should add that I really don't see my situation as being a hindrance.  A simple chown command to chance ownership of the Lazarus directory isn't a big deal, but having a second nearly complete installation on the same machine just to get around the permissions issue is something that seems somehow strange.
 





JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3854
  • I like bugs.
Re: Broken Installation
« Reply #19 on: February 06, 2014, 11:41:50 pm »
... but both appeared to be designed to be installed under /usr.

Correct. That is the standard place for any program installation in most Linux systems.

Quote
... but having a second nearly complete installation on the same machine just to get around the permissions issue is something that seems somehow strange.

Which second installation you mean? Lazarus rebuilds itself into your home dir but that is not a "nearly complete installation". It is one executable only.
I have a feeling you still did not understand the idea behind startlazarus.

From what I know the only difference in your installation is Alien (RPM -> DEB converter).
You could also try the latest .deb packages on a clean system. If they don't work any better, I will be buzzled.
One more thing: are you sure you always run "startlazarus" instead of "lazarus" directly?
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux.

Rails

  • Guest
Re: Broken Installation
« Reply #20 on: February 07, 2014, 12:10:50 am »
Yes, I use startlazarus, not lazarus directly.

Not sure what is supposed to be normal, but my my file manager reports .lazarus as 1730 items, totalling 131.2 MB. Under .lazarus, bin contains only link.res at 90.3 kB, and lib contains 1507 items in 25 folders, totalling 128.3 MB.

There is other stuff in .lazarus, but that is by far the majority of it.

In /usr/lib64/lazarus, I have amongst other things, lazarus and lazarus.old, both at 99 MB and dating from the last time I rebuilt the IDE a few hours ago. Also in /usr/lib64/lazarus, I have lazbuild and startlazarus, both from Jan 10 of this year, which is about when I migrated from RC1 to RC2.

I assumed from the discussion and zeljko's post "When you rebuild lazarus it should rebuild itself into $HOME/.lazarus" that .lazarus was supposed to contain nearly everything. I'm happy to learn that isn't the case.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3854
  • I like bugs.
Re: Broken Installation
« Reply #21 on: February 07, 2014, 09:30:45 am »
Ok, right, the generated .ppu and .o files must obviously go to a writable dir, too.
However now your Lazarus seems to build itself under /usr/... because it is writable. It builds itself into the config dir only if the install dir is write-protected.

Could you please try it in a clean system, maybe a virtual machine. Standard installation from .deb packages, no "chmod" or "chown". Does it work?
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux.

the.weavster

  • New Member
  • *
  • Posts: 16
Re: Broken Installation
« Reply #22 on: February 07, 2014, 09:43:53 am »
This should not be needed. There is "startlazarus" to solve this problem. It runs Lazarus from the original installation first. While Lazarus is rebuilt the new binary goes to ~/.lazarus directory. Next time you run startlazarus it is clever enough to start the new binary.
... And I think this is why uninstalling and reinstalling didn't fix my broken installation. Having deleted ~/.lazarus I have now been able to reinstall (from the deb on Ubuntu Studio) and I'm back up and running.


As I recall, the rebuild IDE process chokes when it tries to delete one or more existing files under /usr.
Ah, that might be why my rebuild failed. Being a twit it didn't occur to me I needed to do the rebuild as root. Doh.

I'll have a go at installing lazreports and rebuilding as root and see how it goes.

Thanks for your help guys  :D

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3854
  • I like bugs.
Re: Broken Installation
« Reply #23 on: February 07, 2014, 12:44:23 pm »
Ah, that might be why my rebuild failed. Being a twit it didn't occur to me I needed to do the rebuild as root. Doh.
I'll have a go at installing lazreports and rebuilding as root and see how it goes.

No, please don't do that! Read carefully what was written about "startlazarus" program and act accordingly.
Rail's configuration is screwed somehow, hence his advice is not valid now.
« Last Edit: February 07, 2014, 12:46:31 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux.

Rails

  • Guest
Re: Broken Installation
« Reply #24 on: February 07, 2014, 12:56:53 pm »
Ok, right, the generated .ppu and .o files must obviously go to a writable dir, too.
However now your Lazarus seems to build itself under /usr/... because it is writable. It builds itself into the config dir only if the install dir is write-protected.

Could you please try it in a clean system, maybe a virtual machine. Standard installation from .deb packages, no "chmod" or "chown". Does it work?

I'll see what I can do, Juha. It make take a few days before I can set something up. I will report back when I have it.

I will install Laz from the sourceforge deb. I will install FPC from the debian repository.




Rails

  • Guest
Re: Broken Installation
« Reply #25 on: February 07, 2014, 03:30:46 pm »
[

I'll see what I can do, Juha. It make take a few days before I can set something up. I will report back when I have it.

I will install Laz from the sourceforge deb. I will install FPC from the debian repository.

OK, I installed the 64 bit laz 1.2rc2 deb from sourceforge. It installed OK, but it wants to be able to write to /usr/share/lazarus/1.2rc/*/* which is owned by root on debian, as recommended per the Filesystem Hierarchy Standard.

I was able to "rebuild' the IDE, but only immediately after a clean install. Once I changed the build settings, it choked on the clean all setting. The error message complained that /usr/share/lazarus/1.2rc wasn't writable. Then it suggested I consult the web site for other options on how to install Lazarus.  :D

I also tried compiling some example projects directly after the install. Laz immediately tried to back them up to /usr/share/lazarus/1.2rc/examples/backup which failed, of course.

On the other hand, the good new is the laz executable and its backup did appear in ./lazarus/bin. The bad news is the system is unusable as installed.


 


the.weavster

  • New Member
  • *
  • Posts: 16
Re: Broken Installation
« Reply #26 on: February 07, 2014, 05:13:00 pm »
No, please don't do that! Read carefully what was written about "startlazarus" program and act accordingly.
Rail's configuration is screwed somehow, hence his advice is not valid now.
I was only going to sudo to rebuild the IDE, I was not going to change the permissions of the installation folders or run Lazarus as root whilst developing.

I don't think the ~/.lazarus option is working right now and I really want lazreports and weblaz.


Rails

  • Guest
Re: Broken Installation
« Reply #27 on: February 07, 2014, 05:57:01 pm »
No, please don't do that! Read carefully what was written about "startlazarus" program and act accordingly.
Rail's configuration is screwed somehow, hence his advice is not valid now.
I was only going to sudo to rebuild the IDE, I was not going to change the permissions of the installation folders or run Lazarus as root whilst developing.

I don't think the ~/.lazarus option is working right now and I really want lazreports and weblaz.

I assume you read all the stuff I wrote earlier in response to Juha's concerns.

FYI, I do not agree with his assertion that I have a "screwed" configuration. I think that the tests I have done prove that. My installation works fine. It just requires dealing with the write permissions issue for the lazarus folder that gets installed under /usr/. My choice was to change it and its contents ownership to my user account.  That way I don't have to worry about switching to root just to rebuild the IDE, which can happen frequently if you are loading external packages.

It lets me install updates in the least painful manner. It simply is a matter of letting the package manager install the new package, then doing a chown on the lazarus directory to take care of the ownership changes that are imposed by the installation package.

I have no problems with this process.


JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3854
  • I like bugs.
Re: Broken Installation
« Reply #28 on: February 08, 2014, 11:52:01 am »
... it choked on the clean all setting.

Ok, finally I was able to reproduce the problem. It happens only with "Clean all" checked.

Without "Clean all" the rebuilding of Lazarus always works like train's toilet (*).
I tested with a clean Mint Linux 15 KDE edition under VirtualBox and tried many ways of installing packages and rebuilding Lazarus.

Rails and the.weavster, does this mean that you never tried building Lazarus WITHOUT the "Clean all"?
How is that even possible? When you install packages, there is no selection for "Clean all". It is available only in the Configure Build Lazarus dialog.
The whole setting is a hack made by Mattias some years ago.
It is needed only when developing Lazarus and its packages, and even then only after moving files or directories to a new place.
It is not needed when using a released version of Lazarus installed in a standard write-protected location.

Sure it is a bug and must be fixed. It is a good example that nothing should be assumed when designing a GUI.
[Edit] Reported : http://bugs.freepascal.org/view.php?id=25695

Another known issue are the example projects. They cannot be compiled in-place in a write-protected directory.
It must be solved somehow later, but it is not a show-stopper issue. It does not affect rebuilding Lazarus itself, and an example project can always be copied elsewhere if you want to run it.

However, failing to install packages in a standard installation of Lazarus without sudo rights would be a show-stopper issue.
Can you please confirm that the problem was ONLY about "Clean all".

Juha

(*) "works like train's toilet" is used at least here as a metaphor for reliable technology.
It comes from time when toilets in trains had only a hole under the seat and you could see the ground running by.
« Last Edit: February 08, 2014, 12:17:55 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux.

Rails

  • Guest
Re: Broken Installation
« Reply #29 on: February 08, 2014, 02:54:56 pm »
... it choked on the clean all setting.

Ok, finally I was able to reproduce the problem. It happens only with "Clean all" checked.

Without "Clean all" the rebuilding of Lazarus always works like train's toilet (*).
I tested with a clean Mint Linux 15 KDE edition under VirtualBox and tried many ways of installing packages and rebuilding Lazarus.

Rails and the.weavster, does this mean that you never tried building Lazarus WITHOUT the "Clean all"?
How is that even possible? When you install packages, there is no selection for "Clean all". It is available only in the Configure Build Lazarus dialog.
The whole setting is a hack made by Mattias some years ago.

Another known issue are the example projects. They cannot be compiled in-place in a write-protected directory.
It must be solved somehow later, but it is not a show-stopper issue. It does not affect rebuilding Lazarus itself, and an example project can always be copied elsewhere if you want to run it.

However, failing to install packages in a standard installation of Lazarus without sudo rights would be a show-stopper issue.
Can you please confirm that the problem was ONLY about "Clean all".


I'm responding in the order above.

No, it doesn't mean that at all. I first ran into this stuff a long time ago when I installed the luicairo package. Before that, I had never tried rebuilding the IDE. The package installation process told me the IDE needed to be rebuilt and the dialog asked me if I wanted to do that. I clicked on Rebuild Now (or equivalent term) and that is when the problem came up. I did not change any of the rebuild settings until later. I did not even know what they were at that time.

I started digging through the wiki and may have even posted here about it, but don't remember. When I found the wiki entry that I linked earlier regarding Linux permissions, I simply dealt with it that way. I have been doing so ever since. Unfortunately, I don't remember what version I was using at that time, other than it was 0.9 something and came from the Debian repository. From then on, I automatically changed the lazarus directory's owner to my local user every time I installed a newer version of Laz and never had a problem.

I have never tried any of the example projects before doing the clean install test for you yesterday. I simply tried to build one to see if the installation worked. I understood why they won't work, but have no doubt that new users are going to run into problems, since there are no instructions anywhere saying they need to me moved to be used.

Today I changed the lazarus directory's ownership back to root on my current installation and can confirm that the IDE can be rebuilt if Clean All is not selected.

 

TinyPortal © 2005-2018