Install Lazarus on Raspberry Pi lazarus / 32-Linux ---------------------------------------------------------------------- Pascal++ · 2013-09-22 06:59 Hi everyone, As you know, the Raspberry Pi OS (Raspbian) is a port of Debian to Raspberry. I have no previous experience in Linux (beyound the basics) and I want to develop with Lazarus on Raspberry Pi, but until now I can't. In the Free Pascal wiki (http://wiki.freepascal.org/Lazarus_on_Raspberry_Pi) I've read this: In the Raspbian OS it is easy to install Lazarus and Free Pascal. In order to do this simply open a terminal window and type: sudo apt-get update sudo apt-get upgrade sudo apt-get install fpc sudo apt-get install lazarus I've tryed to install FPC for Linux ARM, but the installer didn't work. Moreover I dont't know where to get Lazarus for Linux ARM. It seems that Lazarus and FPC for Linux are target more to x86/x64 than for ARM. Can someone help me where can I download one single bundled of binaries (Lazarus + FPC) that install out of the box (without the need of source compilation) in the same way as the Windows version? Another question: is that possible to cross-compile from Windows to Raspbian? I've done cross-compilations many times but between other OSs. Thank you ---------------------------------------------------------------------- bracara · 2013-09-22 12:55 Quote from: Pascal++ on September 22, 2013, 08:59:13 amIn the Free Pascal wiki (http://wiki.freepascal.org/Lazarus_on_Raspberry_Pi) I've read this: In the Raspbian OS it is easy to install Lazarus and Free Pascal. In order to do this simply open a terminal window and type: sudo apt-get update sudo apt-get upgrade sudo apt-get install fpc sudo apt-get install lazarus I've tryed to install FPC for Linux ARM, but the installer didn't work. The instructions in the wiki worked perfectly for me. This method is definitely far easier than downloading and trying to install third party binaries or setting up a cross-compile system.  Perhaps we will be able to help if you tell us what error messages you got when you followed the instructions. ---------------------------------------------------------------------- Dick, from the internet · 2013-09-22 14:06 This topic has been discussed quiet a bit on this forum - just do a search for raspberry.   A good resource is the page at http://www.michellcomputing.co.uk/blog/?p=72  There you will find a couple of scripts to help install and setup a FPC/Lazarus installation from trunk.   Before you get started with that, you will need to adjust the pi's memory / swapfile allocations using raspi-config as mentioned here htt p://forum.lazarus.freepascal.org/index.php/topic,19012.msg120235.html# msg120235 ; also set it to boot into console mode instead of the desktop. This should be enough to get you started on the road to success.    regards,       geno ---------------------------------------------------------------------- jwdietrich · 2013-09-22 14:08 Quote from: Pascal++ on September 22, 2013, 08:59:13 amIn the Raspbian OS it is easy to install Lazarus and Free Pascal. In order to do this simply open a terminal window and type: sudo apt-get update sudo apt-get upgrade sudo apt-get install fpc sudo apt-get install lazarus I've tryed to install FPC for Linux ARM, but the installer didn't work. Moreover I dont't know where to get Lazarus for Linux ARM. I wrote the cited lines in the wiki page, and I wonder why it doesn't work for you. This is the way to get Lazarus for Linux ARM. Did you boot your Raspberry with Raspbian Wheezy? For starting Lazarus you have to run an GUI, usually with the LXDE environment. If your Pi doesn't automatically boot to LXDE you have to enter startx from the command line. After the GUI started you will be able to run Lazarus from the "Programming" section in the Start menu of your Raspberry. ---------------------------------------------------------------------- Pascal++ · 2013-09-22 14:26 Quote from: jwdietrich on September 22, 2013, 04:08:56 pm I wrote the cited lines in the wiki page, and I wonder why it doesn't work for you. This is the way to get Lazarus for Linux ARM. Did you boot your Raspberry with Raspbian Wheezy? Yes I did. QuoteFor starting Lazarus you have to run an GUI, usually with the LXDE environment. If your Pi doesn't automatically boot to LXDE you have to enter startx from the command line. I've already do that, but when i wrote sudo apt-get install fpc in the command line nothing happens. Maybe I've downloaded the wrong version of FPC. Can you please give me the links where I must do the download of the correct versions of both FPC + Lazarus for Raspbian because I'm affraid I download some port for another Linux version Thank you ---------------------------------------------------------------------- jwdietrich · 2013-09-22 14:35 Quote from: Pascal++ on September 22, 2013, 04:26:12 pmI've already do that, but when i wrote sudo apt-get install fpc in the command line nothing happens. Maybe I've downloaded the wrong version of FPC. You have to wait a long time after issuing each one of the sudo-apt commands. Depending from the speed of internet connection and the current version of your installed software, execution of each of the four commands may last up to an hour, although it are usually a few minutes "only". Not each of the four commands delivers visual feedback to indicate that it is being executed. Reappearance of the command prompt is the hint that it has been finished. ---------------------------------------------------------------------- CaptBill · 2013-09-22 18:40 Quote from: Pascal++ on September 22, 2013, 04:26:12 pmQuote from: jwdietrich on September 22, 2013, 04:08:56 pm I wrote the cited lines in the wiki page, and I wonder why it doesn't work for you. This is the way to get Lazarus for Linux ARM. Did you boot your Raspberry with Raspbian Wheezy? Yes I did. QuoteFor starting Lazarus you have to run an GUI, usually with the LXDE environment. If your Pi doesn't automatically boot to LXDE you have to enter startx from the command line. I've already do that, but when i wrote sudo apt-get install fpc in the command line nothing happens. Maybe I've downloaded the wrong version of FPC. Can you please give me the links where I must do the download of the correct versions of both FPC + Lazarus for Raspbian because I'm affraid I download some port for another Linux version Thank you Have you considered all the options? If you want a local compiling environment on the raspberry, and you are going through all the trouble compiling from scratch, why not give the Tinycore ARM port a go? Look at the size of the installation for Rasbian, MUCH larger that TinycoreARM. Plus, there is no real "install" necessary like your typical "distro". I can tell you that it is a breeze to set up git/svn/mercurial and all the C compiler tools you need to compile directly from Lazarus repository. Unfortunately, Lazarus isn't in the ARM repository yet. If you can succeed at compiling from trunk that would be ideal anyway. If you can get a good installation we can snapshot it into an  .iso image bochs/qemu "target emulator" I am currently running Tinycore thought it's paces I can perform a complete installation, from scratch--the OS, git/svn/mercurial, C compiler environment, Firebird Server (with directories, aliases, global settings game plan), Tftp server, adding my favorite components...all in under 2 hours...from scratch. I hope to chronicle it shortly and if you can get the Tinycore ARM port installed, you will be able to use the same steps as the x86, hopefully, to round out a completely configured system...is record time flat. Cheers. http://distro.ibiblio.org/tinycorelinux/ports.html ---------------------------------------------------------------------- CaptBill · 2013-09-22 19:22 Easy peasy... http://distro.ibiblio.org/tinycorelinux/4.x/armv6/README.txt Now you have a full windowed X11 system running with the FLWM window manager. Simply install and run the git.tgz , create a directory /mnt/sda3/home/tc/fpc and navigate to it then: Code: [Select] git clone git://github.com/graemeg/lazarus.git look here for the detais for fpc: http://wiki.freepascal.org/git_mirrors Install and run binutils.tcz (maybe compiletc.tcz as well), then you should be well on your way from compiling from scratch. Might be simpler, in the long run anyway. ---------------------------------------------------------------------- jwdietrich · 2013-09-22 19:37 Quote from: CaptBill on September 22, 2013, 08:40:32 pmHave you considered all the options? If you want a local compiling environment on the raspberry, and you are going through all the trouble compiling from scratch, why not give the Tinycore ARM port a go? Look at the size of the installation for Rasbian, MUCH larger that TinycoreARM. Plus, there is no real "install" necessary like your typical "distro". I think that this doesn't answer Pascal++'s question. However, your reply is very interesting anyway. BTW, I have updated the wiki page to include screenshots in order to further facilitate installation. ---------------------------------------------------------------------- CaptBill · 2013-09-22 20:22 Quote from: jwdietrich on September 22, 2013, 09:37:24 pmQuote from: CaptBill on September 22, 2013, 08:40:32 pmHave you considered all the options? If you want a local compiling environment on the raspberry, and you are going through all the trouble compiling from scratch, why not give the Tinycore ARM port a go? Look at the size of the installation for Rasbian, MUCH larger that TinycoreARM. Plus, there is no real "install" necessary like your typical "distro". I think that this doesn't answer Pascal++'s question. However, your reply is very interesting anyway. BTW, I have updated the wiki page to include screenshots in order to further facilitate installation. Great Wiki page. I see your point but it really depends on the type of apps you want to build for the Pi. If it is an appliance type device, then TinycoreARM is certainly worth a look. And frankly, a blast to work with. ---------------------------------------------------------------------- Dick, from the internet · 2013-09-22 20:44 @jwdietrich   That is a most impressive job on the wiki page, especially with the demo programs using the GPIO.  I scrolled through it, and am thoroughly impressed - it looks like you put a lot of effort into it.    I would just like to point out that the link to Michell Computing must have changed.  I found it here:  http://www.michellcomputing.co.uk/blog/?p=72: @CaptBill That is some great info on Tiny Core Linux; maybe even gives me the motivation to try something different, especially with the aforementioned demo programs   regards,        geno ---------------------------------------------------------------------- jwdietrich · 2013-09-22 21:01 @geno Thanks for your positive feedback. Not every part of the wiki page has been written by me - I would like to forward your thanks to the co- authors. I have corrected the link to the Michell Computing site - thank you also for posting the new URL here. @CaptBill: Thank you for your info, I will give TinycoreARM a try. Hopefully Lazarus will stably run there. ---------------------------------------------------------------------- CaptBill · 2013-09-22 22:09 Quote from: jwdietrich on September 22, 2013, 11:01:55 pm@geno Thanks for your positive feedback. Not every part of the wiki page has been written by me - I would like to forward your thanks to the co- authors. I have corrected the link to the Michell Computing site - thank you also for posting the new URL here. @CaptBill: Thank you for your info, I will give TinycoreARM a try. Hopefully Lazarus will stably run there. @Jd that would be great. I'm too noob to get it to compile from scratch. Probably a cakewalk for you. Something of note for you: if you use the stock /home/tc as the main directory structure, everything put there will be compressed and make a long backup. You might want to use the boot codes to set home=/mnt/yourHomeDirectory and the opt=/mnt/yourOptDirectory specifically. This will save in a normal filesystem fashion vs the Ram mounted mode. The ram mount mode was problematic for me in a compiling environment. http://kittyandbear.net/linux/installs/tinycore-linux-boot-options.txt @Geno, just what I was wondering...how well would the great demo's compile with TC_ARM. It's been great fun getting Lazpaint, Fpgui, Msegui, DoubleCommander(almost!), BrookFramework, Uos (the sound library from fredvs) and lot's more set up no problem. And fast! You won't believe the latency number I get from the UOS sound demo. Something incredible like 5.60 latency score. ---------------------------------------------------------------------- Dick, from the internet · 2013-09-23 03:32 Quote@Geno, just what I was wondering...how well would the great demo's compile with TC_ARM. It's been great fun getting Lazpaint, Fpgui, Msegui, DoubleCommander(almost!), BrookFramework, Uos (the sound library from fredvs) and lot's more set up no problem. And fast! You won't believe the latency number I get from the UOS sound demo. Something incredible like 5.60 latency score.Dude, you are so far out in front of me right now!   I finally just pulled the plug (for tonight) so I can start doing my daily close-out here; it's time to hit the rack! I ran up against the non-persistent home folder issue the first time I tried cloning Lazarus.  OK - got it; that's what you meant with Quotecreate a directory /mnt/sda3/home/tc/fpc and navigate to it then:...It's at this point I happened upon the BootOption document and the options to create  persistent /home and /opt folders.  I happened to find this while trying to download and enable the wireless drivers to get my USB dongle working, as right now I going back and forth with the cat from my main box to the RPi .  It was like that with the HDMI plug as well, until it finally dawned on me to just drag out another monitor.  Sometimes that little Pi just wears me out - heh-heh.   But all in all, it looks like it is going to be an interesting challenge to learn my way around TCL; something to look forward to tomorrow.   regards,       geno