[fpc-pascal] Updated FPC from svn but make does not work..

Bo Berglund bo.berglund at gmail.com
Mon Nov 9 10:15:11 CET 2015


On Sun, 08 Nov 2015 16:18:51 +0000, Mark Morgan Lloyd
<markMLl.fpc-pascal at telemetry.co.uk> wrote:

>Bo Berglund wrote:
>> I think my 2.6.4 is OK because I got it as follows (from my notes):
>> wget
>> http://sourceforge.net/projects/freepascal/files/Linux/2.6.4/fpc-2.6.4.arm-linux.tar
>> tar xvf fpc-2.6.4.arm-linux.tar
>> cd fpc-2.6.4.arm-linux
>> ./install.sh  (Reply /usr/local to the first question)
>
>I thought we'd already been through this loop once? You need a custom 
>binary tailored for the RPi.

Mark, thanks for hanging in and advicing me!
Most appreciated!

Right now I am getting dizzy by all the webpages, newsgroups, emails
and how-tos I have read the last week....
And still I seem not to completely understand how this works...
But I hope I am getting closer.

The tar file above does work on my RPi2 in order to build FPC from svn
trunk, so in what way is it not a valid ARM binary for the Pi?
Surely if it works on the Pi to build the bleeding edge trunk fpc
itself it should work in all other respects too??

Or do I need to check out fpc svn sources from the 2.6.4 tag and build
the 2.6.4 compiler itself on the Pi hardware in order to get it
working correctly? If that is the case then fpc from tar seems not to
have something that an fpc from the same sources but compiled locally
will contain. And this something is not needed for compiling FPC?

My previous tests with svn versions were based on svn trunk sources
and FPC was compiled with this tar binary into the 3.1.1 version, then
this fpc 3.1.1 was used to compile Lazarus itself.

Anyway, I decided to try to go the apt-get route instead irrespective
of the webpage notes I found in several places stating that it does
not work for getting fpc and lazarus installed on an RPi2.

So sudo apt-get install fpc lazarus gave me fpc 2.6.4 (again but in a
different location) and Lazarus 1.2.4 (pretty old but OK for now). No
error messages. :)

It also gave me a dialog when starting Lazarus (1.2.4) indicating that
in order to use multiple versions of Lazarus I had to add a command
line parameter --pcp <directory> in order to direct it to where the
user configuration should be saved.
So I did this and created a new command line program, again based on
TCustomApplication, into which I copied the code from my previous test
with lnet. I also used the GetTickCount64 call as I had done before in
order to time the program operations.

Surprise! GetTickCount64() (and GetTickCount() for that matter) are
flagged as "Identifier not found" when I try to compile the test.

But after adding LCLBase to project required packages and adding
LclIntf to uses it solved the GetTickCount problem.
Now the test program compiles and runs. :)

So as far as I can see now I could move forward using the apt-get
versions.

Only problem is how to safely remove all of the various builds and
compiles and tar versions that are now scattered around my disk and
potentially will cause conflicts down the line.
IOW: How does one uninstall stuff that has been installed by make
install scripts?
Maybe I should make a clean start now that I know how to proceed, i.e.
scrap the SDcard and start over with a fresh operating system on a
card...

Last note:
Since I got Lazarus 1.2.4 off apt-get and it is pretty old now, could
I check out lazarus_1_4_4 and then build it using the fpc I have from
apt-get and thus have a newer Lazarus still using fpc 2.6.4?
Or does Lazarus 1.4.4 release need stuff that is in newer fpc
versions?

-- 
Bo Berglund
Developer in Sweden




More information about the fpc-pascal mailing list