Lazarus

Installation => Linux => Topic started by: Sheepdog on March 20, 2017, 10:58:11 am

Title: Pi AND a bigger PC
Post by: Sheepdog on March 20, 2017, 10:58:11 am
Dear Lazarus friends- Forgive re-opening something discussed many times? Here's why I did it... I'm hoping there are some experts out there which a foot in TWO camps. I long to leave Windows. Linux here I come. But I NEED my Lazarus! And I don't want too much hassle if I create something on a "big" computer, and want to use it in a Pi. (Creating things in the Pi, i.e. installing the full Lazarus devel pkg there, would not be out of the question, though. Good idea?)

So... which Linux? So far, so "is your Google button broken?"...

But! I want to use BOTH Pi and a bigger computer. Anyone already doing this? Which Linux for the bigger computer do you like? (I assume Rasbian in Pi... beginners should do the "ordinary"?)...

Thoughts? In general. A specific worry: Are "versions" a big issue? Do I have to use an older Lazarus, or an older distro of a particular Linux to get them to "play nicely"? Is this an ongoing woe for the Linux user?    Thanks!
Title: Re: Pi AND a bigger PC
Post by: mig-31 on March 20, 2017, 11:22:21 am
I use Mageia distribution. It good for beginners.

There are a lot of distribution. The best way is to try out and find the most sutiable for you:
OpenSuse, Ubuntu and it clones (Linux Mint), Debian, Fedora...

Lazarus is usually in distribution repository (older version). For newest version download rpm or deb packeges (lazarus, fpc, fpc-src) from Lazarus IDE site and install it.

Read the wiki page about cross-compiling for ARM architecture. Usually you need to install cross-arm-binutils and use GTK+ widgetset for GUI. I think all Rasberry Pi distribution use LXDE desktop.

ldd <exe file name> command show you all dependencies.

Title: Re: Pi AND a bigger PC
Post by: Handoko on March 20, 2017, 11:28:41 am
@Sheepdog
What bigger computer did you mean? Server?

I don't play with Pi. I personally choose Ubuntu for my desktop. The reason I use Ubuntu is it has large user base. Which means it will be easier to find information if I ever run in to problem. Linux is great, no need to think about viruses and harddisk defragmentation. But I ever have problems several times especially with my NVidia graphics card. Luckily with some efforts to search the web, problems can be solved.

But some years ago, Ubuntu pushed its desktop manager "Unity". I didn't like it, it was buggy. So I switched to Ubuntu Mate. Basically Ubuntu Mate is a simplified version of Ubuntu. Some will said Mate is uglier, but I don't care. It is lightweight and easy to use.

There are a lot of distribution. The best way is to try out and find the most sutiable for you:
OpenSuse, Ubuntu and it clones (Linux Mint), Debian, Fedora...

I ever tried Fedora. It looks good, has more things to configure. For people who like customization, Fedora is a good choice. But I prefer simple thing, Fedora is not for me. If you don't have above average computer, you should avoid Fedora, it runs a bit slower.
Title: Re: Pi AND a bigger PC
Post by: Sheepdog on March 20, 2017, 11:52:25 am
By "bigger computer", I simply meant an "ordinary" tower or laptop. Something to use at my desk. (Yes, Pi people, I KNOW I can "use Pi at desk" (^_^)... keyboard, mouse, monitor, integrated hard drive.

Tried to install Lazarus to an Ubuntu machine... not in repository (that I could find... "Ubuntu Software" app?). Tried to install from .debs... blew the Ubunto out of the water. (No hardware damage, but required from scratch rebuild of OS installation)... and I am not "new" to computers. Wrote first program in 1968.
Title: Re: Pi AND a bigger PC
Post by: Handoko on March 20, 2017, 12:29:35 pm
If you want to use Ubuntu, you should install Synaptic Package Manager. The default Ubuntu Software Manager is great, it keeps the history of your software installation/removal/upgrade. But I don't know why, it run slower and slower. Last time I used it, it need about 2 minutes to start up. Alternatively, I recommend you to use Synaptic.

To Install Lazarus, you should use the 3 deb files downloaded from Lazarus website (via SourceForge). After the installation, you should lock the version (using Synaptic) to prevent it automatically to updade (actually downgrade, I think).

I use Ubuntu Mate 16.10 + Lazarus 1.6.4 FPC 3.0.2. Everything seems to run correcly. But the installation process, didn't run smoothly.
Title: Re: Pi AND a bigger PC
Post by: sky_khan on March 20, 2017, 12:50:08 pm
You would want your desktop to be stable and reliable but if you want to have latest versions of everything too, dependency hell is there for Linux too, especially if you install software from 3rd party. If you mess up, you may end up all kind of conflicting packages and defunct desktop. So I will recommend finding a good distribution which supports your hardware well and you feel comfortable and stick with it. Dont install 3rd party software, use only its own repositories. Then use some kind of virtualization for your other bleeding edge developments. Because I know I managed to achieve broken dependencies on Linux and had to reinstall it before because I couldn't fix it with my limited knowledge.
Title: Re: Pi AND a bigger PC
Post by: Handoko on March 20, 2017, 01:14:05 pm
Yes, dependency issue is a problem on Linux. I often have software that can't be installed on Ubuntu because of dependency issues, sometimes it said it's holding a broken package.

I also ever messed up my Ubuntu. It's so bad, I had to reinstall the OS. After that I learned a good trick. If you're Ubuntu user (perhaps works on other Linux too), you should:

- Create a new partition and put your /home there
- Install your Linux not on the /home partition

The advantage of using the trick above is, you can reinstall your Linux even format the OS partition as long as you keep the /home folder separate. Your data and all software setting will be kept (except OS related software settings).

The first time I used that trick, I was surprised after I reinstalled my Linux, I opened my Opera browser all my previous settings are kept. Including the last page I opened.

Note: I work part time as a computer technician, I format and install computer a lot. I know for sure, on Windows you can can't save software settings on a separate partition. If you format the Windows partition, all of your program settings will be destroyed.
Title: Re: Pi AND a bigger PC
Post by: sky_khan on March 20, 2017, 01:24:54 pm
Well, I have a slow and not so reliable internet connection plus it has 50GB/month quota. So reinstalling is torture to me.
Title: Re: Pi AND a bigger PC
Post by: Handoko on March 20, 2017, 01:49:05 pm
Mine is not better than yours. My internet connection has 20 GB per month fair usage program, it will still run if over 20 GB but run veeeery slow.  :'(
Title: Re: Pi AND a bigger PC
Post by: Thaddy on March 20, 2017, 02:54:36 pm
Does that still exist? 20 GB limits? Where? ( I know that is true, but not here, for years, Netherlands and Lithuania). Time to get into politics. Unacceptable and the infra-structure costs J.S.  Only my mobile G3/4 has limits but well above 200GB a month)
Title: Re: Pi AND a bigger PC
Post by: Sheepdog on March 20, 2017, 03:55:37 pm
SkyKhan- Thank you, helpful. Gave me consolation that several of my fears are valid.
Title: Re: Pi AND a bigger PC
Post by: JuhaManninen on March 20, 2017, 07:30:07 pm
SkyKhan- Thank you, helpful. Gave me consolation that several of my fears are valid.
No, they are not valid if you choose your distro wisely.
Ubuntu at desktop is not very good now. They concentrate on other things, namely mobile and cloud.
I don't know why many people have an obsession to use and recommend it without trying other distros.
Mint is not good either any more, at least not for FPC / Lazarus users because their packages are both old and broken.

I use Manjaro now and can recommend it!
It has very recent versions of everything. For example I got FPC 3.0.2 semi-accidentally with other updates shortly after it was released.
I never have to install any new released SW from 3rd party because Manjaro has them all.
I feel frustration reading the agony of Ubuntu and Mint users because it could be avoided easily ... by using another distro.
Manjaro is a rolling distro, one would expect it to be unstable but it is not. It just keeps working. Never failed in ~2 years. Before it I had screwed my Xubuntu installation somehow and had to reinstall.

Of course there are many other good distros. For example I installed a promising SparkyLinux with KDE in a laptop and it works very well!
Like many others, it is based on Debian testing. There are also rolling distros based on Debian Sid (unstable).

Be smart. If a Linux distro does not work, please switch to another distro instead of banging your head again and again with it.
Title: Re: Pi AND a bigger PC
Post by: jacmoe on March 20, 2017, 07:54:08 pm
I use Netrunner (http://www.netrunner.com/) - highly recommended if you like KDE/Qt and/or want a distribution which is based on Debian, actively contributes back to the Debian project, does not have the bugs/issues that Ubuntu (or any derivatives) suffer, and that has a 'rolling release' mode which ensures that your system is shiny new. ;D

I also use fpcupdeluxe - because installing Lazarus/Free Pascal globally is not really a great idea on any *nix.
Title: Re: Pi AND a bigger PC
Post by: Phil on March 20, 2017, 08:19:04 pm
I don't know why many people have an obsession to use and recommend it without trying other distros.

Perhaps some of the "obsession" (as you term it) with Ubuntu is that pros and ambitious hobbyists are probably already working with or plan to work with Linux servers in the cloud and there Ubuntu is quite common. So why not use the same Linux on your "desktop" system, if you're using Linux there, as you have on your server? There are lots more docs on Ubuntu than the others, eg,

https://macpgmr.github.io/MacXPlatform/PascalDynLibs_4.html

I updated to FPC 3.0.2 and Laz 1.6.4 over the weekend on an Ubuntu Virtual Box installation and it couldn't have been easier:

- From the command line, I first uninstalled existing fpc, fpc-src and lazarus packages using dpkg.

- I usually prefer to use the official FPC .rpm instead of the Laz .deb, so I used alien like this (and also to test that this still works):

      sudo apt-get install alien
      sudo alien -d --scripts fpc-3.0.2-1.x86_64.rpm
      sudo dpkg -i fpc_3.0.2-2_amd64.deb

Installed fine. Then...

  sudo dpkg -i fpc-src_3.0.2-170225_amd64.deb
  sudo dpkg -i lazarus-project_1.6.4-0_amd64.deb

Also installed fine, although with a warning that the fpc package didn't match or something (probably because of the "-2" that alien added to the package in creating the .deb).

Everything ran fine afterwards.
Title: Re: Pi AND a bigger PC
Post by: jacmoe on March 20, 2017, 08:26:29 pm
That's flawed logic.
I wouldn't want to install a LTS Ubuntu server to be my desktop Linux..
Why would you?
That's two very different things.
Title: Re: Pi AND a bigger PC
Post by: sky_khan on March 20, 2017, 08:27:58 pm
@JuhaManninen
If you did not have to install any 3rd Party software because you already had all you want, it is great but as I said generally there will be no problem on other distros as well if you stick with what they install.
Problems arise when you want to have other than your distro provides. You may need newer or older version of something. Lets suppose you have a very big old Lazarus project but after your regular update Manjaro upgraded Lazarus to 1.6.4 and its dependancy fpc to 3.0.2 automatically and your project is not compiling  anymore. Then what ?

I 've used Slackware, Redhat-Fedora, Debian-Ubuntu-Mint, PCLinuxOS and some others before. None of them was free of dependancy conflicts. I bet you can mess up Manjaro too. Its a Debian derivative too after all.
Anyway, It may not matter if all you do on computer is disposable but it is nice to have controlled environment and using a source version control system if you have any serious project at hand.
Title: Re: Pi AND a bigger PC
Post by: jacmoe on March 20, 2017, 08:30:33 pm
Lets suppose you have a very big old Lazarus project but after your regular update Manjaro upgraded Lazarus to 1.6.4 and its dependancy fpc to 3.0.2 automatically and your project is not compiling  anymore. Then what ?
Then you will probably regret not using a local Lazarus/FPC installation :D
Title: Re: Pi AND a bigger PC
Post by: sky_khan on March 20, 2017, 08:42:22 pm
Then you will probably regret not using a local Lazarus/FPC installation :D

What if your second (old) installation stops working because of updated gtk library or xserver or graphics card driver or .... something
I would not regret. Because if it is any serious it would be on cloned virtual machine and sources on backed up on scm anyway.

I think you have no idea of having a hundreds of thousands line project which is used by many clients.
Any disruption or delay would hurt you, badly.
Title: Re: Pi AND a bigger PC
Post by: jacmoe on March 20, 2017, 09:01:54 pm
I am on rolling release and thus updates happen daily.
I am yet to experience issues.
Mileage varies, doesn't it?
Or are you suggesting that you keep your system locked in a historical state?
Title: Re: Pi AND a bigger PC
Post by: sky_khan on March 20, 2017, 09:24:10 pm
@jacmoe

Sorry but my english is actually poor. It is somewhat difficult to me explain something in English so this is my last comment about this.
If you have, lets say 500K+  sloc (source lines of code) project and hundreds of clients (who have yearly support-contracts by you) use this project, you will keep your system whatever state your project dictates. Period.
Title: Re: Pi AND a bigger PC
Post by: JuhaManninen on March 20, 2017, 09:27:57 pm
I bet you can mess up Manjaro too. Its a Debian derivative too after all.
No, it is derived from Arch. See:
 https://manjaro.org/
It is easier to install and its packages are not as bleeding edge as in Arch. Maybe for that reason it is so stable.
I can only say that with my usage patterns it works well while I had many dependency problems with Ubuntu and its derivatives. Reading this forum I know that many people have those problems.
Title: Re: Pi AND a bigger PC
Post by: sky_khan on March 20, 2017, 09:36:40 pm
@JuhaManninen
Give me a privileged account and ip of your machine and lets test how solid its package manager :p

Jokes aside, thanks for sharing anyway, I will try it  ( of course in Virtualbox first :) )
Title: Re: Pi AND a bigger PC
Post by: avra on March 20, 2017, 10:09:32 pm
I use Manjaro now and can recommend it!
It has very recent versions of everything. For example I got FPC 3.0.2 semi-accidentally with other updates shortly after it was released.
I also have positive experience with Manjaro and LMDE. Not so good with several Ubuntu variations lately.
Title: Re: Pi AND a bigger PC
Post by: JuhaManninen on March 20, 2017, 10:30:31 pm
I updated to FPC 3.0.2 and Laz 1.6.4 over the weekend on an Ubuntu Virtual Box installation and it couldn't have been easier:

- From the command line, I first uninstalled existing fpc, fpc-src and lazarus packages using dpkg.

- I usually prefer to use the official FPC .rpm instead of the Laz .deb, so I used alien like this (and also to test that this still works):

      sudo apt-get install alien
      sudo alien -d --scripts fpc-3.0.2-1.x86_64.rpm
      sudo dpkg -i fpc_3.0.2-2_amd64.deb

Installed fine. Then...

  sudo dpkg -i fpc-src_3.0.2-170225_amd64.deb
  sudo dpkg -i lazarus-project_1.6.4-0_amd64.deb

Also installed fine, although with a warning that the fpc package didn't match or something (probably because of the "-2" that alien added to the package in creating the .deb).
Well, it could have been easier :
Accept new updates when Manjaro offers them. Type root password in a dialog and hit Enter.
Title: Re: Pi AND a bigger PC
Post by: sky_khan on March 21, 2017, 12:52:21 pm
At first attempt. lol
Title: Re: Pi AND a bigger PC
Post by: JuhaManninen on March 21, 2017, 01:59:59 pm
At first attempt. lol
You must have talent. :)
I have installed and then updated it frequently without issues. The last update was just today for KDE frameworks and other stuff. Still no issues.

The best maintained desktops in Manjaro are XFCE and KDE. Maybe some other desktop and related packages have issues. Don't know.
Title: Re: Pi AND a bigger PC
Post by: Cyrax on March 21, 2017, 07:43:20 pm
I tried Manjaro at some point, got strange problems with it and changed to Arch.

With BTRFS, carefully designed root structure (BTRFS subvolumes for certain directories and enabled for easy snapshot restoration) and snap-pac package installed, I should be safe for any inconvenience that may surface in the future.
TinyPortal © 2005-2018