Lazarus

Installation => General => Topic started by: alejol0 on May 02, 2010, 03:22:52 am

Title: A REAL installer for Lazarus
Post by: alejol0 on May 02, 2010, 03:22:52 am
Installing Lazarus on Linux is an adventure.

In some Linux distributions such as Ubuntu, things seem simple, but always missing puzzle piece.

In other Linux distributions, you need to compile Lazarus from scratch.
If you can get to work, the IDE, run the help system is another painful process.

Therefore, I would like a REAL installer, as in Windows. In Windows, it is not necessary to install the C compiler, the
Free Pascal compiler, the source code of Free Pascal, Lazarus IDE, then the documentation of Lazarus, crossing their fingers in the process hoping that all required libraries are available and well together.

 In Windows, download a single large executable installer and all the material is installed.

I hope the team of Lazarus begins to distribute a real installer for Linux.
Title: Re: A REAL installer for Lazarus
Post by: Marc on May 02, 2010, 01:10:34 pm
I hope the team of Lazarus begins to distribute a real installer for Linux.

I explained in a previous post with the same subject, that this is not possible, since the is not one linux, but dozens of distributions all doing things their way. So you need an installer/packager for each distro.
Title: Re: A REAL installer for Lazarus
Post by: wOvAN on May 02, 2010, 01:27:03 pm
Linux must die! However there is a way to simplify the installation process. Just unpack installation packages manually wherever you want and set all the path, I find this way easier and more convenient. 
Title: Re: A REAL installer for Lazarus
Post by: jarto on May 02, 2010, 01:52:16 pm
The Linux package management systems are actually really great. The offer very easy installation and updates. The problem is only, that FPC and Lazarus are usually not included in them. However, that will probably change as Lazarus matures.
Title: Re: A REAL installer for Lazarus
Post by: Troodon on May 02, 2010, 02:32:50 pm
The available .deb and .rpm Lazarus/FPC packages are fine. Installation is seamless on Linux Ubuntu and SUSE. People should be encouraged to learn Linux first, it's very different from Windows. Actually, that is the main complaint of Windows users trying to switch to Linux. There is no such thing as an "installer" for Linux (with a few statically-linked commercial exceptions), just packages that are installed by package management systems, somewhat like the .msi packages on Windows. The main reason for that is, each executable and shared libray has specific dependecies that must be resolved (i.e., additional packages must be found in the repositories, fetched, and installed if necessary, along with their own dependencies) by the package management system.

As Marc pointed out, it would be virtually impossible to create specific packages for the more than 600 Linux distributions (http://en.wikipedia.org/wiki/Linux_distribution) that one may choose from.

On Linux Ubuntu, always pick the metapackage for Lazarus to install, it includes everything.
Title: Re: A REAL installer for Lazarus
Post by: jhmos on May 02, 2010, 02:52:15 pm
Help installation is the one thing I would agree with in the complaint.
In the Ubuntu/debian packages at least, help does not get set up properly on installation.
Also there is no documentation I could find on how to set help up manually, having Hints against all the options in 'Environment ->Options-> Help Options' would be a good idea.
Title: Re: A REAL installer for Lazarus
Post by: alejol0 on May 02, 2010, 04:01:44 pm
Hi Marc.
Well, many people want "portable applications". Why? Because people hate installation troubleshooting. And I think they have reason. And portable applications are the future (and was the past, in Windows in DOS days).

Why Lazarus can not be statically linked with all the stuff neded to work in each Linux distro that have a desktop?
And, why separate downloads for documentation and compiler and IDE in Linux? Yes, ther are 600 Linux distros. But I believe that majority of this have a desktop methaphore, and that a executable installer can know in which environment it is running and adjust things for properly working on this particular distro.

People do not like Linux when things so simple to do in Windows are so difficult in Linux. And this form of distributing applications for Linux is a mess for common people and is compelling for return to Micro$oft. (Few people has a friend with advanced Linux knowledge, but a young children can install anything in windows).
Title: Re: A REAL installer for Lazarus
Post by: alejol0 on May 02, 2010, 04:14:06 pm
People should be encouraged to learn Linux first, it's very different from Windows. Actually, that is the main complaint of Windows users trying to switch to Linux. There is no such thing as an "installer" for Linux (with a few statically-linked commercial exceptions), just packages that are installed by package management systems, somewhat like the .msi packages on Windows.
Why? Imagine you have learned to drive a car. One day, someone want sell you a car that is managed using a joystick. How many people want to re-learn how to drive? And, what is the advantage in doing this? And, why the car constructor do not have respected the knowledge of common people and want to re-invent the wheel?

As Marc pointed out, it would be virtually impossible to create specific packages for the more than 600 Linux distributions (http://en.wikipedia.org/wiki/Linux_distribution) that one may choose from.

On Linux Ubuntu, always pick the metapackage for Lazarus to install, it includes everything.
Well, I have installed Lazarus in Ubuntu 9.10 and the off-line help is missed. I believe that help system must to be integrated in every application in XXI century.
Title: Re: A REAL installer for Lazarus
Post by: Martin_fr on May 02, 2010, 04:44:20 pm
I think marc reffered to this http://www.lazarus.freepascal.org/index.php/topic,9072.msg44958.html#msg44958

Anyway the point is, Lazarus needs certain libraries, certain include files, headers, and what else => they must be installed one your linux system, or lazarus can not run.

These dependencies are not part of lazarus, they are part off other packages (X11, gtk, libc, gcc, ...).
Even if we wanted Lazarus could not simply include a copy of them, because they come in different versions, and vary for each system.

If Lazarus had it's own "installer", then this installer would still have to find all those dependencies (or even if it carried a 100 diff copies of them, it would have to find out which one to use).
And the best info to find out where or what they are is the package system.

It would be impossible, impracticable, and nonsensical for Lazarus to maintain it's own list, and try to be better at this than the official package system...

---
The best way, do minimize issues, is at the time you install your Linux:
Somewhere there usually is an option, that let's you choose to install all the developer packages => then and only then all the stuff Lazarus needs, should be there already.
Title: Re: A REAL installer for Lazarus
Post by: wOvAN on May 02, 2010, 05:31:43 pm
Linux wasn't made for common people or independent developers. Linux was made for the linux community.
Title: Re: A REAL installer for Lazarus
Post by: jarto on May 02, 2010, 05:43:06 pm
People do not like Linux when things so simple to do in Windows are so difficult in Linux. And this form of distributing applications for Linux is a mess for common people and is compelling for return to Micro$oft. (Few people has a friend with advanced Linux knowledge, but a young children can install anything in windows).
Installing software in Linux: Start the package manager, select the software you want from a list and click install. That's it.

Installing software in Windows: Download the right version, save it somewhere, run setup, answer a bunch of questions.

Installing updates in Linux: The package manager monitors and takes care of all updates. You only have to click yes, when it asks.

Installing updates in Windows: Some software have automatic updates, but they are basically all different. Otherwise you have to download and reinstall yourself.

Having used both Windows and Linux for years, I sincerely think that Linux is way more user friendly and advanced in this regard.

It may be that the Lazarus help is not included in the rpm/deb-packages or the quality of the Lazarus rpm/deb-packages is not good enough. However, that can be fixed by improving the packages. Writing a dedicated and different setup program is a lot more work and a huge step in the wrong direction.
Title: Re: A REAL installer for Lazarus
Post by: LazaruX on May 02, 2010, 08:15:59 pm
As I know binaries on Linux may differ from distribution to distribution (don't know why, hoewever), so its impossible to create one binary that works everywhere.
Also, In Windows you can have Program A that depends on libDEP and program B that depents on libDEP, in windows you will find that libDEP is twice availabele, probably in the installation folder of Program A and of Program B, in Linux, to save space its shared, so creating one software with all the dependencies in it, is a huge difficulty.

However, yesterday I installed NetBeans and it has a kinda graphical installer, I don't know how it works, but it has an easier way. (i think its a sh that those some stuff)
OpenOffice.org also has a graphical installer,

So if those 2 big projects have a kind auserfriendly installer, why shouldn't Lazarus have one???
I know this is not a priority for version 1.0, but still it may be possible to create a kinda installer.
Title: Re: A REAL installer for Lazarus
Post by: wOvAN on May 02, 2010, 08:32:32 pm
Then it would be better to create a cross-platform scriptable installation-system. Like  Inno Setup :)
Title: Re: A REAL installer for Lazarus
Post by: Marc on May 02, 2010, 08:55:40 pm
On linux (and windows too) you have statically linked en dynamically linked applications. statically linked apps are huge and have all libraries linked into them. They have no dependencies.

But this is not the case for lazarus. And installing lazarus itself is not a problem too. But what everyone forgets is that lazarus is a development environment. Such environment must know where the (development) libraries are, to what libraries to link to. And thats the problem some ppl have here. They use a Lunix distribution not suitable for development. So all development links to the needed libraries aren't installed.
This is not something an installer can solve. This is something a developer can solve by installing the proper packages fit his/her distro.
Applications generate by lazarus don't suffer from this, it is only the linker who needs to know.
Title: Re: A REAL installer for Lazarus
Post by: Troodon on May 02, 2010, 09:05:10 pm
The availability of documentation (the help system included) is a known issue in open-source projects. Writing good documentation is time-consuming and keeping it up to date is even more. When resources are scarce it is difficult to find the time, and to put in the effort, required to keep documentation updated. Perhaps the fact that Lazarus Help defaults to the Web pages should be a strong hint for developers that the off-line help may be at least partly obsolete; that should not come as a surprise.

As for the installer for Linux: Inno Setup does not check for dependencies, so you need to create a statically linked program to make sure it will run at all. An .msi will allow you to specify at least some dependencies (e.g., minimum Windows, or DirectX version) but its major advantage is that it provides a mechanism to control software versions (e.g., you can replace an old version of your program with a new one). To create an installer for a Linux application, such as the Acrobat Reader installers from Adobe, you would need to statically link in your binary all libraries it depends on. I cannot imagine what the size of the Lazarus executable would be if it were statically linked against all of its dependencies (and I am not sure that would not break a few license agreements). One of the strongest paradigms in Linux is the use of shared libraries. Hence the need for a package management system, software repositories, etc.
Title: Re: A REAL installer for Lazarus
Post by: LazaruX on May 02, 2010, 09:41:40 pm
Well, the setup program could do something similar to the packet manager, and check what is installed needed by lazarus and what not.
As I know NetBeans is also a developer environment, not only for Java, but also C++.
Title: Re: A REAL installer for Lazarus
Post by: Marc on May 02, 2010, 10:03:34 pm
Well, the setup program could do something similar to the packet manager, and check what is installed needed by lazarus and what not.
As I know NetBeans is also a developer environment, not only for Java, but also C++.

I did a google search:
 lazarus ld lib not found -> 11000 hits
 netbeans ld lib not found -> 5500 hits

So the problem exists there too. And either NetBeans is less uses or C++ are used to install their development libs.
Title: Re: A REAL installer for Lazarus
Post by: theo on May 02, 2010, 10:40:03 pm
Netbeans itself is a Java Application.
Not sure what parts of it do if you want do develop C/CPP or PHP.
I do not think it's going to install distro specific gcc environment or apache/php either.
Title: Re: A REAL installer for Lazarus
Post by: vfclists on May 02, 2010, 10:53:41 pm

I have to say I sympathize with Lazarus developers for a reason. People who write programs are developers. They are supposed to be capable of reading documentation, following the steps and testing the results properly.
If things don't work they are supposed to document the findings and report the results back to the original developers to see if there are bugs in the system or the documentation is incorrect or incomplete.

I really can't sympathize with programmers who say things are difficult to install. There are always people out there who can help.

What I have to admit about FPC/Lazarus is that it is hard for a newcomer to get a bird's eye view of how it all hangs together. It is difficult to know who is in charge of his or that or who is in charge of what area. It doesn't seem to have taken shape well enough to be broken down into clearly defined parts which can be assigned to leaders and different groups.
I for one seeing how the whole setup looks like, just need the information on how to compile everything from scratch, from FPC to Lazarus. Once I know that I can carry on from there.
Currently I am even afraid to add new components and not even sure how to add libraries in case I break my existing setup, and It just ain't right.

A Software developer is like a builder. He doesn't need the architect to layout in detail the steps needed for construction, he only needs the plans. FPC/Lazarus leading developers should produce a single detailed document on how it all fits together, or how it is meant to. Once that is clear the community should be able to do the rest.

If such a already document exists, just point me/us to it. We can then all contribute to it, each in his own little way. The FPC/Lazarus community needs a webchick (http://www.webchick.net/) of its own. (Males not need apply)  O:-)

Title: Re: A REAL installer for Lazarus
Post by: Marc on May 02, 2010, 11:34:44 pm
Currently I am even afraid to add new components and not even sure how to add libraries in case I break my existing setup, and It just ain't right.

Just a tip.
NOTE: The following applies only if you have been compiling everything with the same compiler (or you have only one compiler installed). When you are using multiple compilers, I'll consider you as experienced and knowing what you are doing.

Lazarus consists of 3 parts:
1) the IDE
2) the LCL + compiled packages
3) the compiler + libraries (FPC + RTL + FCL)

Starting with 3.
You only have one version installed. Your /etc/fpc.cfg points to the locations if this compiler. When installing lazarus packages nothing is changed here. So no worries at this point.

Now 2)
When installing packages, nothing of the existing LCL + Packages is changed. OK there might be a rebuild, but this is done by the same compiler, so the result are the same units.

Finally 1)
When installing package, the IDE is rebuild and the new components are added to the ide. This can indeed be tricky. But..... if you keep a copy of your working lazarus executable (only the exe is needed), you can use that exe as a fallback when recompilation failed.

(from the early pre fpc 1.0 versions I kept my habit of having a backup of at least 5 previous versions of the ide)
Title: Re: A REAL installer for Lazarus
Post by: jhmos on May 03, 2010, 01:34:48 am
I don't think there is any fundamental problem with the current Linux install systems, its just that the packages need improving (for Ubuntu at least). From my experience, the Ubuntu packages work fine (except for the Help System) if no other Lazarus version has been installed before but may trip up not adjusting configuration files to point to new paths (like in fpc.cfg). It would just take someone familiar with package scripts or someone willing to learn. The Help System probably just needs the path options to have correct defaults, currently does not seem to match paths and hierarchy of where the help files actually get installed, which should be an easier fix I would think.
I suspect though that this is one of those things where those who know what to do are busy doing other things and it would take just as long to document what needs to be done as it would to actually do it. So neither happens. Perhaps when I get a few hours to work out what to do ... :-)

What I hope for Lazarus help is that it will become as good as that for freepascal, particularly rtl.pdf from ftp://ftp.freepascal.org/pub/fpc/docs-pdf/ (http://ftp://ftp.freepascal.org/pub/fpc/docs-pdf/) which includes examples.

For those with install problems though, there is a fair amount of documentation concerning installation scattered around the Wiki that is quite helpful, when you find it. For instance http://wiki.lazarus.freepascal.org/Getting_Lazarus (http://wiki.lazarus.freepascal.org/Getting_Lazarus), http://wiki.lazarus.freepascal.org/Installing_Lazarus (http://wiki.lazarus.freepascal.org/Installing_Lazarus) and http://wiki.lazarus.freepascal.org/How_to_setup_a_FPC_and_Lazarus_Ubuntu_repository (http://wiki.lazarus.freepascal.org/How_to_setup_a_FPC_and_Lazarus_Ubuntu_repository)
Title: Re: A REAL installer for Lazarus
Post by: Ocye on May 03, 2010, 07:21:04 am
First, I disagree with people that want clickable application only for Linux. But maybe those could be interested in a project that was presented in the German Lazarus forum: http://www.lazarusforum.de/viewtopic.php?f=11&t=3696.