Recent

Author Topic: Rant: Lazarus on Linux: messed up. Completely.  (Read 28013 times)

Nimral

  • Jr. Member
  • **
  • Posts: 97
Rant: Lazarus on Linux: messed up. Completely.
« on: February 07, 2017, 04:09:33 pm »
 >:D
Hi guys,

I admit, I am primarily a Windows guy, pretty tired of Microsoft's ways, but that's a different story. But Windows (tried 7 and 10) both did give me an absolutely hassle free jump-start with Lazarus. Download, install, works, period.

Over the weekend I gave MacOS a try. This was a bit more of work, but finally I got all together: XCODE from Apple, GDB from don't remember where, build it, sign it, and Lazarus on top. Seems to work, at least I could compile, run and debug the "Hello" demo, which is kind of a promising start.

Then I turned my attention to Linux, yesterday morning. Isn't that the guys who do always complain about poor Microsoft software quality, and say they do better? Well, it doesn't seem so. First attempt was to use a Linux Mint "Petra" (Ubuntu 13.10) I had lying around. Installation went well, "Hello" Test went well, but Lazarus choked on re-compiling itself, the Leakview component won't compile, message not helpful. I wasted considerable time re-downloading the package from source, browsing forums, asking others, but no progress, only the error messages changed from "don't know whats going on" to "absurd". All I got from the forums was shady remarks that Petra was outdated, though the problem with leakview doesn't look like a typical "outdated OS" problem to me.

Considering that Mint "Petra" is indeed quite outdated, I went for Mint "Serena" (Ubuntu 16.4) this morning. Expecting some hickups I installed it into a VMware and took a snapshot after the OS was tested OK, so I dodn't need to re-install the whole thing over and over to get a clean machine to start from.

Then Lazarus. I was really shocked about the carelessness the project seems to hamper starters like me. First of all, try to find proper installation instructions for Linux. There are dozens: outdated, incomplete, dead links, contradictory, even the official wiki page at
http://wiki.freepascal.org/Lazarus_release_version_for_Ubuntu
starts with a "this page is outdated" warning (dating back almost 2 years), and the installation attempts all didn't work, no matter which of the described methods I tried. Each try wasted considerable time and resources downloading a lot of stuff and installing it, some even without complaints, but after starting Lazarus I wasn't even able to open a single demo project without ignoring several seriously looking errors first, none (zero, nada, 0) projects would compile, not even the basic "application" with nothing but an empty form.

Then - though some "gurus" explicitly told me to do not - I gave the built-in Software Manager a try. Searching for "Lazarus" reveals 26 (!) different packages. Two can be ruled out easily, 24 remain. We got "Lazarus" (SDK depencendy package <-- ???), Lazarus-IDE, Lazarus-1.6 (Suite) and 21 more. Looking into the details they all look the same, so I choose the top one with the most reviews.

Download and install runs well, Lazarus first start, first error, what a warm welcome: though the package description proudly presents itself as the metapacket of packets, pulling in all that's required, Lazarus on first start complains about FPC sources missing. Back to Software manager: FPC Sources: no hit, Free Pascal Sources: no hit, FPC-Source: gotcha. 4 hits, again the packages seem to be identical. Though they have different names. Looking into the details ... ouch ... says it is Version 3.0.0+dfsg-2, while Lazarus sais it is Version +dfsg-1. And most of all it says: "installed". And "0B of disk space required". Must be a very efficient compression.

So who is right: Lazarus saying not installed, or Software Manager saying installed (0Bytes) or what? Next search: where is fpc installed (if it is installed at all): some sources say etc/alternatives, others say usr/local, others say usr/[my username], i finally find promising files in /usr/share/fpcsrc, and Lazarus indeed accepts that path.

Nevertheless, no project will compile, if I try, I get a series of error messages (the project ist only a blank form with no code in it and no controls on it - the thing you get if you just open Lazarus and tell it to create a project of type "Application"):

"Compile Project, Target: /home/linder/tmp/project1: Access violation
  $0887A1B0
  $0887A861
  $0887A7E9
  $084148B1
  $08418653
  $08105EA8
, Errors: 7
Panic: internal error: Access violation
Panic: internal error:   $0887A1B0
Panic: internal error:   $0887A861
Panic: internal error:   $0887A7E9
Panic: internal error:   $084148B1
Panic: internal error:   $08418653
Panic: internal error:   $08105EA8
"

This is much like my three year old, repeating the same complaint over and over, but not giving any useful infos about why and what to do now.

All I can do is tell you that the mentioned directory does exist, it is actually even created on compile if I delete it, and that the compile process seems to crash somewhere in the middle, since a ton of files is created in that directory. No executable though.

Recently I was said, in a forum post, that Lazarus was used by 10 thousands of people without complaints, I really wonder how they get their installations right, and which OSses they are on, but maybe it's just me, expecting too much, having a bad Karma, whatever?

So now the final question (thanks to whoever read that far): if I really don't give a damn what Linux distro I am using (reasonable stability in a VMWare environment is probebly the only must-have for me right now), what do I have to install, and how do I do it, so that I get a working Lazarus/FPC installation? I am willing to do a handstand after every packet, bow towards Helsinki or Lake Oswego every half an hour, whatever is necessary, as long as I get a Lazarus installation in Linux which lets me

- write a simple program on Linux
- run an simple program on Linux
- debug a simple program on Linux
- recompile Lazarus on Linux

Any hints welcome.

Armin.
« Last Edit: February 07, 2017, 04:17:22 pm by Nimral »
Lazarus 1.8 on Windows 10/7, VMWare Workstation 12

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1148
Re: Rant: Lazarus on Linux: messed up. Completely.
« Reply #1 on: February 07, 2017, 04:19:16 pm »
Try fpcupdeluxe ?
https://github.com/newpascal/fpcupdeluxe/releases/latest
Remember, you have to start the Lazarus/FPC install with the desktop-link that is created during install.
I wish you well.
http://forum.lazarus.freepascal.org/index.php/topic,34645.300.html

Handoko

  • Hero Member
  • *****
  • Posts: 3188
  • My goal: build my own game engine using Lazarus
Re: Rant: Lazarus on Linux: messed up. Completely.
« Reply #2 on: February 07, 2017, 04:24:41 pm »
I'm sorry to hear that your Lazarus adventure didn't run well.

And welcome the Linux world.
 :-X ssst, I tell you Linux isn't as good as most Linux fanatic said.

I use Linux, it's not bugs free, it has many issues. But to me all of them are tolerable. At least I can forget about harddisk defrag and computer viruses. I ever and still heavily use Linux Ubuntu and Ubuntu Mate + Lazarus, no serious problem so far.

Here are some tips for Ubuntu + Lazarus:

- Don't install Lazarus from the Ubuntu repository.

- But visit this download page:
https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%201.6.2/

- Download and install all the three deb packages

- If Ubuntu ask you to upgrade your Lazarus or FPC, don't ever do it.

- To upgrade, download them from Lazarus site, uninstall the old and install the newly downloaded.

- If you want to compile OpenGL related projects, you may need to install libgl1-mesa-dev

Give it a try, if you ever run into problems. We are here to help.

Have fun.
« Last Edit: February 07, 2017, 04:43:33 pm by Handoko »

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 635
Re: Rant: Lazarus on Linux: messed up. Completely.
« Reply #3 on: February 07, 2017, 04:24:59 pm »
On Debian, with Lazarus 1.4 and 1.6, it was just "apt-get install lazarus" and "startlazarus", IIRC. But this is about a year ago.

Thaddy

  • Hero Member
  • *****
  • Posts: 9181
Re: Rant: Lazarus on Linux: messed up. Completely.
« Reply #4 on: February 07, 2017, 04:49:16 pm »
Well. Bit strange. Seems the package maintainers of your Linux versions do not do their job.
I build FPC trunk daily ( from source, 3.0.0 as starting compiler) and Lazarus weekly (from source, staring compiler is trunk) on a lowly RPi3 Raspbian, on WIN64/10, on Debian Jessie/x86_64, sometimes on other platforms too, and do not have any problems *at all*.
Really need to give more information.
also related to equus asinus.

Nimral

  • Jr. Member
  • **
  • Posts: 97
Re: Rant: Lazarus on Linux: messed up. Completely.
« Reply #5 on: February 07, 2017, 04:56:21 pm »
Three replies, three different approaches. Thanks though, at least it's good thing to know one isn't alone :-)

Since it takes the least efforts, after resetting the VM, I go with Handokos "download from sourceforge" approach first.

If that fails, next is fpcupdeluxe. Question: why does one write his own installer, and further contribute to what I consider one of Linux'es most dominant problems (things not fitting together since multiple groups with mutiple interests drag into different directions), when it was possible to spend the time and efforts for making the existing installers better? Not a rant .. I really wonder.

And if fpcupdeluxe fails too, it's probably "Mint" to blame ... since installation is quite painless (except, of course, the time wasted), I'll give Debian 1.6 a try, as I said, I don't care which distro I use for my first attempts to get my Windows code cross-platform. My experience on the Mac was quite promising: all I had to do is remove two or three dependencies with Windows specifics, and my program ran without any problems.

thanks, guys, I'll walk the dogs now, cool down a bit, and then continue trying.

Armin.
Lazarus 1.8 on Windows 10/7, VMWare Workstation 12

Nimral

  • Jr. Member
  • **
  • Posts: 97
Re: Rant: Lazarus on Linux: messed up. Completely.
« Reply #6 on: February 07, 2017, 05:07:32 pm »
Well. Bit strange. Seems the package maintainers of your Linux versions do not do their job.
I build FPC trunk daily ( from source, 3.0.0 as starting compiler) and Lazarus weekly (from source, staring compiler is trunk) on a lowly RPi3 Raspbian, on WIN64/10, on Debian Jessie/x86_64, sometimes on other platforms too, and do not have any problems *at all*.
Really need to give more information.

Hi Thaddy,

I didn't mention that I have also installed Lazarus on the Raspi last year, and that I cannot remember having had any serious problems with it (except, of course, that when the projects grow larger a Raspi isnt quite the platform of choice to do the main work).

If you want, you can have access to my recent Mint VM using Teamviewer right away, and see yourself. I can copy the VM over to a 24/7 machine any time and send you access details per pm. Or I'll happily provide any infos, logs, whatever you need, so the issues can be tracked and eventuelly fixed. Just let me know what you need.

And you're #2 which mentions Debian, if everything alese fails, I'll get me a copy and give it a try.

Thnks,

Armin.
Lazarus 1.8 on Windows 10/7, VMWare Workstation 12

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7503
Re: Rant: Lazarus on Linux: messed up. Completely.
« Reply #7 on: February 07, 2017, 05:26:14 pm »
Well. Bit strange. Seems the package maintainers of your Linux versions do not do their job.

For complicated packages off the downtrodden path that is more the rule than the exception IMHO.

But the core problem is that Linux in 25+ years hasn't managed to tackle the problem that all software need to compiled for a certain distribution-version combination. To aggravate that even more the distro use incompatible package systems and rules.

At the very least a distro should run package and packages of the versions of the previous 5 years (if they are not drivers of some sort). That would give the package maintainers a fighting chance of catching up.
« Last Edit: February 07, 2017, 05:37:59 pm by marcov »

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 635
Re: Rant: Lazarus on Linux: messed up. Completely.
« Reply #8 on: February 07, 2017, 05:30:16 pm »
I even had a setup with Debian in a VM as well as on a server somewhere in a data-center, Lazarus 1.4 and 1.6 installed on both (that took some experimenting, with the two different compilers) and sometimes used those all at the same time, the ones on the server through an xming X-server. With occasional rebuilds when installing packages.

There was initially with 1.6 one component in the BGRABitmap package that broke the build and required installation of a fresh BGRABitmap. And that was it. But that might have been a leftover from the 1.4 version.

Handoko

  • Hero Member
  • *****
  • Posts: 3188
  • My goal: build my own game engine using Lazarus
Re: Rant: Lazarus on Linux: messed up. Completely.
« Reply #9 on: February 07, 2017, 05:40:04 pm »
My first attempt of installing BGRABitmap on Ubuntu (version 14, if I remember correctly) was failed. Some months ago I did my second attempt on Ubuntu Mate 16.10, it succeed. But some weeks ago, I installed it on same Ubuntu Mate 16.10 but different machine, although it succeed too but the installation didn't run smoothly.

Hope the BGRABitmap developer can make the installation easier on Linux.

Nimral

  • Jr. Member
  • **
  • Posts: 97
Re: Rant: Lazarus on Linux: messed up. Completely.
« Reply #10 on: February 07, 2017, 06:05:35 pm »
Ok ... back from walk, dogs happy, calmed down.

Trying an install from the sourceforge sources (3 packages, installed fpc - fpc-sources - lazarus) changed things, unfortunately not for the better.

This time lazarus found the sources right away.
A "startlaz[arus]" thing cannot be found on the machine, so I used the usual Start-Menu - Programming - Lazarus GUI path. In case there is a startlaz[arus] application which does some housekeeping ... it hasn't installed on my machine.

Nevertheless the Lazarus GUI started, but it didn't bring me far.

When trying to compile the empty application, I get:

Compile Project, Target: /home/linder/tmp/project1: Exit code 256, Errors: 1
project1.lpr(9,3) Fatal: Cannot find Interfaces used by Project1. Make sure all ppu files of a package are in its output directory. ppu in wrong directory=/usr/share/lazarus/1.6.2/lcl/units/i386-linux/gtk2/interfaces.ppu. Clean up package "LCL"..

I'll try this and that now: rebuild everything, try different configs, at least Lazarus isn't crashing like before.

Seen from the perspective of jump-start and building up confidence in a product I must say: attempt already failed. The basics must work right out of the box, or many starters and almost all the beginners will turn their back on the solution right away.

Armin.
« Last Edit: February 07, 2017, 09:42:08 pm by Nimral »
Lazarus 1.8 on Windows 10/7, VMWare Workstation 12

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7503
Re: Rant: Lazarus on Linux: messed up. Completely.
« Reply #11 on: February 07, 2017, 06:15:37 pm »
Seen from the perspective of jump-start and building up confidence in a product I must say: attempt already failed. The basics must work right out of the box, or many starters and almost all the beginners will turn their back on the solution right away.

1. Note that the packaging is not done by the product, but by the *nix distribution. It is their core business (integrating the various packages)
2. Seen from the perspective of a developer, if you want a smooth ride, you chose the wrong OS.

Handoko

  • Hero Member
  • *****
  • Posts: 3188
  • My goal: build my own game engine using Lazarus
Re: Rant: Lazarus on Linux: messed up. Completely.
« Reply #12 on: February 07, 2017, 06:20:45 pm »
@Nimral

You failed to install Lazarus on fresh Ubuntu installation?!
Wow, that's really strange.

I've been installed/reinstalled both Lazarus and Ubuntu(Mate) a lot since 2010, everything just run smoothly.

I wish I could teleport the your place to see and inspect what went wrong.

--- edited:

Have you ever think there could be something wrong with the hardware? Maybe you should perform it again but on other machine perhaps direct install without VM.
« Last Edit: February 07, 2017, 06:24:19 pm by Handoko »

Nimral

  • Jr. Member
  • **
  • Posts: 97
Re: Rant: Lazarus on Linux: messed up. Completely.
« Reply #13 on: February 07, 2017, 06:32:38 pm »
@Nimral

You failed to installed Lazarus on fresh Ubuntu installation?!
Wow, that's really strange.

I've been installed/reinstalled both Lazarus and Ubuntu(Mate) a lot since 2010, everything just run smoothly.

I wish I could teleport the your place to see and inspect what went wrong.

You can! You got Teamviewer? You got time and nerve? Just say "yes" and I'll copy the latest failed attempt (the one with the Sources from Sourceforge) over to a 24/7 Platform and give you access via Teamviewer.

Meanwhile I tried to re-compile the IDE, the current error message is:

"Cannot find interfaces used by Lazarus, incompatible ppu={path}, package LCL

At least it doesn't get boring, the error messages change with every attempt.

Armin.

P.S: it isn't "pure" Ubuntu, though based on the Ubuntu core, it's the "Mint" variant.
Lazarus 1.8 on Windows 10/7, VMWare Workstation 12

Handoko

  • Hero Member
  • *****
  • Posts: 3188
  • My goal: build my own game engine using Lazarus
Re: Rant: Lazarus on Linux: messed up. Completely.
« Reply #14 on: February 07, 2017, 06:39:00 pm »
I never use Mint. But I'm sure Lazarus works on both Ubuntu and UbuntuMate. I prefer UbuntuMate simply because it's more lightweight.

Can TeamViewer run on UbuntuMate? I'm okay to help you to fix it. But it is late midnight 12.37 AM here, I'm going to sleep now.

Some suggestion:
- Try UbuntuMate
- Install the debs with the correct order:  fpc, fpc-src and (the last one) lazarus.