feverish
Posts: 486
Joined: Wed Jun 27, 2012 2:29 pm

Re: free pascal / lazarus

Postby feverish » Sun Feb 17, 2013 4:05 pm

The changed units I mentioned are needed in the application that fails to compile. Lots of notes about this on the web using a google search. Good luck to you if you don't need those units and haven't been affected by a Raspi Upgrade/update.
If discrimination is not challenged then we are effectively in collusion with the perpetrators of such behaviour:-Oxford dictionaries
zog
Posts: 181
Joined: Sun Nov 20, 2011 5:43 pm
Contact:

Re: free pascal / lazarus

Postby zog » Sun Feb 17, 2013 11:36 pm

Hi I have managed to compile Lazarus Subversion 39422
( Version 1.0.4 )on my new Raspberry pi 512 Mb model, this won't work on a 256 MB model as it doesn't have enough memory.

I broke the SD card holder on my original pi so I had to buy a new one.

The new pi runs much better than the old one did.

Blue tooth installed with out hitch
Wipi just worked

Starting from a freshly down loaded image this is what I did.
Use raspi config to fill an 8 GB SD card

memory split GPU 64 MB pi 448

note don't try to compile lazarus with x windows running because you will run out of memory

login as super user

sudo bash

apt-get update
apt-get upgrade
apt-get install subversion
apt-get
cd /usr/share
svn co -r 39422 http://svn.freepascal.org/svn/lazarus/trunk lazarus

NOTE THIS EQUATES TO VERSION 1.0.4

cd lazarus
make clean all

IF THE COMPILATION CRASHES JUST TRY make all

startx

YOU WILL NOW NEED TO INSTALL A COPY OF THE FPC SOURCES INTO THE LAZARUS DIRECTORY

to be found here http://sourceforge.net/projects/freepas ... es/Source/

download the zip file for version 2.6.0

unzip the zip file to the directory

/usr/share/lazarus/fpc/2.6.0/source

use file manager excute the script /usr/share/lazarus/install/Lazarus

This will bring up a config wizard. If the fpc sources are missing point the install wizard at them using the tool.

If you fail to do this you can do this in project options in lazarus.

You will also need create a link to startlazarus script which can be found in /usr/share/lazarus as unlike the packaged

version it doesn't create a handy shortcut in the programming folder.

I have tried and run a few of the demo programs these seem to work.

I hope these instructions are helpful. :)
rj999
Posts: 31
Joined: Wed Feb 01, 2012 12:22 pm

Re: free pascal / lazarus

Postby rj999 » Mon Feb 18, 2013 10:08 am

Thanks for your work Zog! I shall have to get myself another 16GB SD card so I can mirror my current one, which has the 0.9 version working OK, so I can safely try it.
Is there a reason why you went for 1.04 rather than the 1.06 that appears to be current?
zog
Posts: 181
Joined: Sun Nov 20, 2011 5:43 pm
Contact:

Re: free pascal / lazarus

Postby zog » Mon Feb 18, 2013 10:46 am

I choose this version as I knew it works with the castle game engine on i386 on windows and Linux. Unfortunately the castle game engine won't compile on rpi at the moment using Lazarus 1.04. I know i could sort this out if I had the time. I am seriously hampered by family life.Also did you know the new versions of Delphi uses the free Pascal compiler and is going to target ios. Pity it isn't going to target Linux as well.
rj999
Posts: 31
Joined: Wed Feb 01, 2012 12:22 pm

Re: free pascal / lazarus

Postby rj999 » Mon Feb 18, 2013 11:35 am

The last time I looked at Real Delphi, it was vastly expensive and the firm that bought Inprise was still targetting it at corporate database stuff. I think, as a retired person, I shall support Lazarus! Now that I've finished hoovering, I've ordered the second 16GB card to install the new version on.
feverish
Posts: 486
Joined: Wed Jun 27, 2012 2:29 pm

Re: free pascal / lazarus

Postby feverish » Mon Feb 18, 2013 4:28 pm

I hope these instructions are helpful. :)


Helpful??? More like the answer to a maiden's prayer!!! Thank you so very much, zog.
If discrimination is not challenged then we are effectively in collusion with the perpetrators of such behaviour:-Oxford dictionaries
DirkS
Posts: 7130
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: free pascal / lazarus

Postby DirkS » Tue Feb 19, 2013 1:10 pm

If you want to check out a certain release it's better to use the 'tags' branch instead of a certain revision #
For version 1.0.4 you would change

Code: Select all

svn co -r 39422 http://svn.freepascal.org/svn/lazarus/trunk lazarus

to

Code: Select all

svn co http://svn.freepascal.org/svn/lazarus/tags/lazarus_1_0_4/ lazarus


Gr.
Dirk.
feverish
Posts: 486
Joined: Wed Jun 27, 2012 2:29 pm

Re: free pascal / lazarus

Postby feverish » Tue Feb 19, 2013 10:40 pm

How do we drill down to allow us to choose a particular version, please?
If discrimination is not challenged then we are effectively in collusion with the perpetrators of such behaviour:-Oxford dictionaries
DirkS
Posts: 7130
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: free pascal / lazarus

Postby DirkS » Wed Feb 20, 2013 6:27 pm

feverish wrote:How do we drill down to allow us to choose a particular version, please?

If you open the URL used in the svn command (http://svn.freepascal.org/svn/lazarus/t ... rus_1_0_4/) in a browser you should see a the folder structure of the Freepascal repository. From there you can navigate to other parts of the repo.

Gr.
Dirk.
feverish
Posts: 486
Joined: Wed Jun 27, 2012 2:29 pm

Re: free pascal / lazarus

Postby feverish » Wed Feb 20, 2013 8:27 pm

That pointer also helped me answer for myself a number of other questions that would have arisen before I had that opportunity to read some of the .txt files scattered around svn, so many thanks. My 512 Raspi is ordered so soon I expect to have Lazarus up and running again and I'll retire raspi1 to surfing the web and running Lazarus-written Applications. :D
If discrimination is not challenged then we are effectively in collusion with the perpetrators of such behaviour:-Oxford dictionaries
rj999
Posts: 31
Joined: Wed Feb 01, 2012 12:22 pm

Re: free pascal / lazarus

Postby rj999 » Fri Feb 22, 2013 12:23 am

I've now got the current version, 1.06 running by following zog's script with a few minor alterations:
1.. If you are starting from a clean machine you do need to run apt-get install fpc before trying to do the make, since it uses Freepascal to build Lazarus.
2. I used the line:
svn co http://svn.freepascal.org/svn/lazarus/t ... rus_1_0_6/ lazarus
as suggested by DirkS to pull down the current version.
3. There is no initialisation script inside /usr/share/lazarus/install/Lazarus, however simply running
/usr/share/lazarus/startlazarus for the first time will bring up the config dialogue box for which, in my case, all source dirs checked out OK.
So, the ide appears to work, and so does a basic compile.
Off to bed now, I don't want to do a Kevin Ayers by burning the candle at both ends...
feverish
Posts: 486
Joined: Wed Jun 27, 2012 2:29 pm

Re: free pascal / lazarus

Postby feverish » Fri Feb 22, 2013 2:11 pm

That is more very good news. I wonder if there is now a way to transform your success into something an apt-get ugrade/update will succeed in making this updated version of lazarus readily available to those who want to use the Raspi as a programming tool but get a bit put off by the hoops one has to jump through otherwise, on the way?
If discrimination is not challenged then we are effectively in collusion with the perpetrators of such behaviour:-Oxford dictionaries
rj999
Posts: 31
Joined: Wed Feb 01, 2012 12:22 pm

Re: free pascal / lazarus

Postby rj999 » Fri Feb 22, 2013 11:28 pm

I think it was plugwash who kindly packaged up the earlier version, looking back in this thread. So it needs someone with access to whatever autobuilder tools he used to put it into a form suitable for apt-get.
feverish
Posts: 486
Joined: Wed Jun 27, 2012 2:29 pm

Re: free pascal / lazarus

Postby feverish » Sat Feb 23, 2013 4:15 pm

Yes. However, is 'access' the total decider?
For instance I've repeatedly read http://man.he.net/man1/dpkg-buildpackage and while bits of it seem readily understandable, the huge amount of obscurantist linuxjargon and prior dependencies makes any worthwhile detailed understanding impossible at my present level of learning.
I can see what I want to do, can see quite a bit of what tools I may need to use, but the tools themselves are too abstruse to use. I can't get around to designing a car's fuel-computer system every time I just want to know how to drive a new car safely. This is quite a dilemma.
If discrimination is not challenged then we are effectively in collusion with the perpetrators of such behaviour:-Oxford dictionaries
rj999
Posts: 31
Joined: Wed Feb 01, 2012 12:22 pm

Re: free pascal / lazarus

Postby rj999 » Sat Feb 23, 2013 6:08 pm

It's unix, just go with the flow and put up with its 'flexibility'! But that is one reason why I like to escape to a higher level language.

I've been playing with the led demo prog and have got this going OK now, though I did have to change a number of things to make it work and be a little nicer, like making the status memo scroll to the bottom automatically as new items are added to it. I'm vaguely beginning to remember what it's all about with lots of googling when I get stuck. Delphi/Lazarus that is...
Because this is accessing the hardware from the graphics IDE I do have to start Lazarus via sudo, but it all seems to hang together after that. The only oddity is that Lazarus uses the GNU debugger, integrated with the IDE, so all the debugger messages start coming out in the terminal window used to start Lazarus. But, just like Delphi, if problems are found or breakpoints used the IDE code editor sets itself properly to the point in the source where the error or breakpoint is.

In one way I'm glad it's cold since I have an excuse not to do anything about the garden!.
feverish
Posts: 486
Joined: Wed Jun 27, 2012 2:29 pm

Re: free pascal / lazarus

Postby feverish » Sat Feb 23, 2013 7:58 pm

There is a Startlazarus front-end which used (before Lazarus0.9.32.4 or some such, became crippled) to allow Lazarus to be started from an LXDE desktop. I saw the updated version while looking through the svn website. (under /Install ?). Any use?
If discrimination is not challenged then we are effectively in collusion with the perpetrators of such behaviour:-Oxford dictionaries
rj999
Posts: 31
Joined: Wed Feb 01, 2012 12:22 pm

Re: free pascal / lazarus

Postby rj999 » Sun Feb 24, 2013 10:36 am

As I mentioned in my post on installing 1.06, startlazarus is in /usr/share/lazarus and is, indeed, how you start lazarus.
rj999
Posts: 31
Joined: Wed Feb 01, 2012 12:22 pm

Re: free pascal / lazarus

Postby rj999 » Mon Feb 25, 2013 2:48 pm

Oh dear. Stupidly pulled out the multi mains socket block I had the Pi plugged into this morning without doing a 'sudo shutdown -hP now' first (That's another example of odd unix syntax. I mean, why are some options in caps?! The whim of some laid back 60s hippy programmer who's about my age I suppose..).
On restart, the boot was reporting blocks that were unable to be read on the SD card and wouldn't reach the initial login. Fortunately I was able to use my other card to get the thing started and then read the messed up SD card. I suspect that when the power was lost, the device was in the middle of sending my weather station report to my web page so probably tmp or the swap file had become corrupted. I was able to read and back up the home directory via an SD to USB converter, and after a format, am now re-imaging the card from one I took on Saturday.
But it's a reminder that unlike normal uses of an SD card, this system is dependent on it for even its root system: shutting down tidily is absolutely essential...
rj999
Posts: 31
Joined: Wed Feb 01, 2012 12:22 pm

Re: free pascal / lazarus

Postby rj999 » Tue Feb 26, 2013 9:17 pm

I've noticed that unlike the old Delphi 5 which was the last PC version that I used, in its standard from, Lazarus is missing visual component network stuff like the old Fastnet package. After a lot of experiments, I came across the lnet package, which can be installed from the freepascal people and includes a useful set of visual components. It seems to work OK for me:
From your home dir:
sudo svn co http://svn.freepascal.org/svn/fpcprojects/lnet lnet
cd ~/lnet/trunk
sudo make clean all

Then start lazarus as root and install the 2 packages that will be in
~/lnet/trunk/lazaruspackage
lnetbase.lpk
lnetvisual.lpk

And you're away. There are example projects in the trunk/examples directory.
feverish
Posts: 486
Joined: Wed Jun 27, 2012 2:29 pm

Re: free pascal / lazarus

Postby feverish » Wed Feb 27, 2013 12:55 pm

If and when my 512 arrives in this backwater, after fighting its way through the USA's transit airmail maze, it'll be fun finding out. On the bright side, our Christmas cards have just arrived.
If discrimination is not challenged then we are effectively in collusion with the perpetrators of such behaviour:-Oxford dictionaries
feverish
Posts: 486
Joined: Wed Jun 27, 2012 2:29 pm

Re: free pascal / lazarus

Postby feverish » Tue Mar 05, 2013 10:12 pm

Oh, dear !
Raspi512 arrived today.
I quickly set it up and only got as far as 'sudo apt-get install subversion' before the screen reported: 'Could not resolve 'mirrordirector.raspi.org' and it all went kerplunk from then on, finally:
'E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?'
So I tried the update and then sudo apt-get install subversion --fix-missing but it all ended with:
'E: Aborting install.'
Clues for the clueless, anyone, please?
If discrimination is not challenged then we are effectively in collusion with the perpetrators of such behaviour:-Oxford dictionaries
feverish
Posts: 486
Joined: Wed Jun 27, 2012 2:29 pm

Re: free pascal / lazarus

Postby feverish » Tue Mar 05, 2013 11:33 pm

WOW ! For no reason I can see, it suddenly worked on about the 5th retry and all sorts of wonderful things are happening as I write this on another laptop. Will report final results.
If discrimination is not challenged then we are effectively in collusion with the perpetrators of such behaviour:-Oxford dictionaries
Albion123
Posts: 2
Joined: Sat Mar 09, 2013 8:42 pm

Re: free pascal / lazarus

Postby Albion123 » Sat Mar 09, 2013 9:12 pm

If this post is inappropriate, please would the Moderators feel free to remove it?

I found this thread through Google when I was looking for information on the lNet suite for Lazarus. Although I do not have a Raspberry Pi (yet), I would be grateful for any advice and assistance Forum Members may be able to provide.

I used Tortoise SVN and followed the instructions earlier in this thread to download the lNet file tree. All seemed well. However, when I tried to install the two .pkg files as instructed, Lazarus could not do so. Two errors messages were displayed, one for each package file:

lnetbase.pas(0,0) Fatal: Can not find unit lNet used by lnetbase. Check if package lnetbase is in the dependencies.
and
'The package "lnetbase 0.6.6" failed to compile. Remove it from the installation list?'

In case I had somehow corrupted my Lazarus installation previously, I uninstalled Lazarus completely, re-installed a fresh copy and tried again, but to no avail. I am running Lazarus V1.0.6 on Windows XP.

I would really like to be able to use the FTP Client components lNet appears to offer, as at present my application is having to shell out to a command prompt and run raw FTP commands when it needs to to transfer files over FTP. This is very slow and inefficient. Even worse, the resulting window keeps grabbing the focus, which makes the PC well-nigh unusable for other applications while it is running.

The "Synapse" component from Ararat installs fine, but I cannot see how to make it do anything other than download one file at a time from the FTP server, or delete files from the server. There seems to be no equivalent to the command-line "mget" and "mdel" commands, unfortunately. It also does not behave well if the login fails for some reason.

I should add that I have only recently returned to programming after a 41-year gap. The modern, visual world of applications still seems a little strange by comparison with the character-based interfaces I used to know, although I am finding the wealth of information available on the Internet is being a great help.

If any Forum Member feels able to offer any assistance or advice, even though this post is clearly in no way related to the Raspberry Pi, I would be very grateful.

Thank you.
feverish
Posts: 486
Joined: Wed Jun 27, 2012 2:29 pm

Re: free pascal / lazarus

Postby feverish » Sun Mar 10, 2013 3:52 pm

feverish wrote:WOW ! For no reason I can see, it suddenly worked on about the 5th retry and all sorts of wonderful things are happening as I write this on another laptop. Will report final results.


After much soul-searching, having been faced with failure after failure during the final make clean all and make all compiles, and not understanding enough linux to discover why, I decided to do a sledgehammer-might-crack-a-nut technique.
1 Shutdown Raspi512
2 Reloaded the latest Raspbian image on 3 SD cards
3 Did a new Raspi-config edit
4 apt-get installed fpc
5 Apt-get installed subversion
6 Searched the svn repository for the latest trunk version of lazarus (it was revision 40520)
7 Downloaded that version from svn
8 Did a cd lazarus
make clean all
SUCCESS! Much relief for stout party. Now to get on with using the new Lazarus.
I cannot thank enough the helpers who pointed to enough of the way for me to try again and again through the failures. The next thing is to try to gather enough facts to make a package for learners to use <apt-get install lazarus> and get there weeks faster than I did.
If discrimination is not challenged then we are effectively in collusion with the perpetrators of such behaviour:-Oxford dictionaries
DirkS
Posts: 7130
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: free pascal / lazarus

Postby DirkS » Sun Mar 10, 2013 3:54 pm

If this post is inappropriate, please would the Moderators feel free to remove it?

Why post on a RasPi forum about your Lazarus problems under Windows?
There's a dedicated Lazarus / FPC forum at http://www.lazarus.freepascal.org . There's a much better chance of getting answers there...

Gr.
Dirk.