Recent

Author Topic: Broken Installation  (Read 20907 times)

the.weavster

  • New Member
  • *
  • Posts: 16
Broken Installation
« on: February 06, 2014, 08:04:36 am »
Hi,

I installed FPC and Lazarus on Ubuntu Studio using the deb files. At first the install went well and everything was working fine but then I tried to add lazreports and rebuild the IDE, The IDE vanished half way through the rebuild and I can't get it to launch again, I get the splash screen and then it just vanishes.

I have tried uninstalling and reinstalling (including the FPC) using the deb files but the problem persists. I tried 'complete removal' from Synaptic and installing the version from Ubuntu's repositories but even then the problem persists.

Please help, I'm stuck.

Thanks.

Rails

  • Guest
Re: Broken Installation
« Reply #1 on: February 06, 2014, 12:40:33 pm »
You probably have a bit of an old or improper installation corrupting things.  Try finding and removing every trace of Lazarus manually with something like "locate lazarus", then reinstall.  Run updatedb first to make sure locate is working with the most recent file data.

If you want to be really thorough, do the same thing with FPC as well.

Edit:

You didn't mention error messages, but I am adding this just in case that is what it was.

Rebuilding Lazarus normally requires root privileges in Linux. Rebuilding as a regular user usually produces an error message at some point and a failed rebuild. This wiki entry covers the problem.

http://wiki.lazarus.freepascal.org/Lazarus_directory_permissions_on_Linux_and_Unix

Personally, I just assign ownership of the lazarus directory under /usr (somewhere, its exact location isn't consistent) to my regular user, which takes care of the problem. As I am the only user, it's Linux, and the machine is behind multiple firewalls and NATs, I don't consider this particularly risky.





« Last Edit: February 06, 2014, 03:38:49 pm by Rails »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3633
  • I like bugs.
Re: Broken Installation
« Reply #2 on: February 06, 2014, 05:31:48 pm »
Rebuilding Lazarus normally requires root privileges in Linux. Rebuilding as a regular user usually produces an error message at some point and a failed rebuild. This wiki entry covers the problem.

http://wiki.lazarus.freepascal.org/Lazarus_directory_permissions_on_Linux_and_Unix

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.
Is this system not known by Linux users? The "Lazarus_directory_permissions..." page (written by Arny and Jwdietrich) should be fixed to explain the proper way. There is a page documenting startlazarus but another page for this specific issue is good (once it has the facts right).
  http://wiki.lazarus.freepascal.org/startlazarus#Searching_the_right_executable

Or, is there a bug that prevents using startlazarus? If yes, it should be reported at once. Such a serious bug can even delay 1.2 release if needed.
« Last Edit: February 06, 2014, 05:38:26 pm by JuhaManninen »

Rails

  • Guest
Re: Broken Installation
« Reply #3 on: February 06, 2014, 05:46:35 pm »
Rebuilding Lazarus requires root privileges on a standard Linux installation. That is the problem.  Startlazarus does not solve that one. 

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3633
  • I like bugs.
Re: Broken Installation
« Reply #4 on: February 06, 2014, 05:59:04 pm »
Rebuilding Lazarus requires root privileges on a standard Linux installation. That is the problem.  Startlazarus does not solve that one.

Startlazarus is made to solve EXACTLY that problem. If it does not work, then there is a bug.

zeljko

  • Hero Member
  • *****
  • Posts: 1056
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Broken Installation
« Reply #5 on: February 06, 2014, 06:14:20 pm »
Rebuilding Lazarus requires root privileges on a standard Linux installation. That is the problem.  Startlazarus does not solve that one.

That should not be the case.
When you rebuild lazarus it should rebuild itself into $HOME/.lazarus and it works so. Just tried to install 1.0.16 on Fedora 19 in virtual machine and it works as expected - I can rebuild lazarus but it does not change anything in /usr/lib/lazarus, but it saves lazarus binary in my $HOME/.lazarus
Maybe you want to change something in lcl, in that case you do not have permission to do it (except if you're root).
My advice in that case would be:
http://wiki.lazarus.freepascal.org/Lazarus_directory_permissions_on_Linux_and_Unix

Rails

  • Guest
Re: Broken Installation
« Reply #6 on: February 06, 2014, 06:28:42 pm »
Installing under the user's home directory is but one of the options mentioned in the link. There are others.

I don't install from svn, so don't know where it installs in that case. Installing from the rpm packages via alien puts it under /usr/libsomething/lazarus on my systems, per the Debian policy manual. For me, there is no problem now that I know how to deal with it.

Edit:

As far as I can tell (I'm far from an expert on the deb packaging system), the Laz packages from the Debian repository and the Laz debs on sourceforge (built with Ubuntu, AFAIK) both default to installing under /usr.


« Last Edit: February 06, 2014, 07:42:28 pm by Rails »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3633
  • I like bugs.
Re: Broken Installation
« Reply #7 on: February 06, 2014, 07:55:11 pm »
Installing under the user's home directory is but one of the options mentioned in the link. There are others.

There was no mention that Lazarus' standard installation rebuilds itself there automatically and startlazarus starts the right executable for you.
I added a note on the top of the page. Somebody (the authors maybe) should fix it properly. The information is very misleading.

Quote
I don't install from svn, so don't know where it installs in that case.

Then you don't need to actually install, but the sources go to wherever you want.
The path is given as a parameter for "svn co" command.

Quote
Installing from the rpm packages via alien puts it under /usr/libsomething/lazarus on my systems, per the Debian policy manual. For me, there is no problem now that I know how to deal with it.

I remember you wrote already some time ago that installation from Debian package does not work for you and you must use Alien. Do you still have the problem? Now before 1.2 would be a good time to dig out all installation problems.
However, the Debian packages work well for many people.

Rails

  • Guest
Re: Broken Installation
« Reply #8 on: February 06, 2014, 08:04:30 pm »

That should not be the case.
When you rebuild lazarus it should rebuild itself into $HOME/.lazarus and it works so. Just tried to install 1.0.16 on Fedora 19 in virtual machine and it works as expected - I can rebuild lazarus but it does not change anything in /usr/lib/lazarus, but it saves lazarus binary in my $HOME/.lazarus


So, you are saying that Lazarus lives in /usr/lib/lazarus but gets rebuilt as a different executable under the user's home directory? What then, move it manually to /usr/lib/lazarus, which requires root permission? Or just use the version under the user's home directory from now on? That would leave two versions on the machine, would it not?


Rails

  • Guest
Re: Broken Installation
« Reply #9 on: February 06, 2014, 08:14:45 pm »

I remember you wrote already some time ago that installation from Debian package does not work for you and you must use Alien. Do you still have the problem? Now before 1.2 would be a good time to dig out all installation problems.
However, the Debian packages work well for many people.

The debian built packages tend to be out of date for my puposes. I don't remember if I had any other specific problems with them. It is possible, but mainly I want something more up to date, but not from svn.

The ubuntu built debs on sourceforge gave me problems, but that is not surprising. Canonical has been dragging ubuntu as far away from debian as they can. It used to be not a problem to install debian packages on ubuntu and vice versa. These days, quite often it doesn't work.  I have given up trying. When I want to install something that isn't in the debian repositories, I can almost always install it from an RPM without any issues.   

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3633
  • I like bugs.
Re: Broken Installation
« Reply #10 on: February 06, 2014, 08:32:37 pm »
That would leave two versions on the machine, would it not?

Yes, you got it!
I improved the explanation in
  http://wiki.lazarus.freepascal.org/startlazarus#Searching_the_right_executable
Please check if it is better now.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3633
  • I like bugs.
Re: Broken Installation
« Reply #11 on: February 06, 2014, 08:41:02 pm »
The debian built packages tend to be out of date for my puposes. I don't remember if I had any other specific problems with them. It is possible, but mainly I want something more up to date, but not from svn.

Yes, the packages from Ubuntu repo are old. Lazarus project provides new ones.
Why not from SVN? I think the fixes branch would be a good match for you. Trunk maybe not.

Quote
The ubuntu built debs on sourceforge gave me problems, but that is not surprising. Canonical has been dragging ubuntu as far away from debian as they can. It used to be not a problem to install debian packages on ubuntu and vice versa. These days, quite often it doesn't work.  I have given up trying. When I want to install something that isn't in the debian repositories, I can almost always install it from an RPM without any issues.

Our deb packages work for everybody else, including myself. Ubuntu + Unity created GUI related problems but installation should be OK.
I honestly wonder how only you have the same problem for many years already.

Rails

  • Guest
Re: Broken Installation
« Reply #12 on: February 06, 2014, 08:46:42 pm »
Yes, the explanation is much, much better thank you  8), but we are still back to the original problem.   ;)

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.   At least that was still the case for me when I moved to 1.2RC2 recently.
« Last Edit: February 06, 2014, 09:00:52 pm by Rails »

Rails

  • Guest
Re: Broken Installation
« Reply #13 on: February 06, 2014, 08:53:41 pm »

Our deb packages work for everybody else, including myself. Ubuntu + Unity created GUI related problems but installation should be OK.
I honestly wonder how only you have the same problem for many years already.

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.



JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3633
  • I like bugs.
Re: Broken Installation
« Reply #14 on: February 06, 2014, 09:11:13 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.