* * *

Author Topic: New fpc version fails to build on Raspberry Pi  (Read 2311 times)

ertank

  • Full Member
  • ***
  • Posts: 203
New fpc version fails to build on Raspberry Pi
« on: December 23, 2017, 11:41:59 pm »
Hello,

Normally I am using minimal compilers from https://www.getlazarus.org/setup/minimal/ This link has fpc version 3.0.0 minimal compiler sets for various platforms including Raspberry Pi.

When I try to build 3.0.4 fixes branch (svn 37788), I got following error:
Makefile:2918: *** The only supported starting compiler version is 3.0.4. You are trying to build with 3.0.0..  Stop.

Question is, is there any 3.0.4 version fpc minimal compiler available for Raspberry Pi platform?

Thanks & regards,
Ertan

rvk

  • Hero Member
  • *****
  • Posts: 3450
Re: New fpc version fails to build on Raspberry Pi
« Reply #1 on: December 24, 2017, 12:02:46 am »
Question is, is there any 3.0.4 version fpc minimal compiler available for Raspberry Pi platform?
No, there is not. (at least not officially)
There is also no bootstrap fpc version 3.0.4. For some reason they refused to make one. (not sure of what the exact reason is again)

You can "just" download FPC 3.0.4 and use ppcarm from it. (It's a 52MB download just to use ppcarm :( )
ftp://ftp.freepascal.org/pub/fpc/dist/3.0.4/arm-linux/fpc-3.0.4.arm-linux-eabihf-raspberry.tar
You don't need to install this version. Just extract it all and use it with the PP option:

make all install OPT=$OPTIONS PREFIX=$BASE/fpc PP=$BASE/compiler3/lib/fpc/3.0.4/ppcarm
(where $BASE/compiler3 is where I unpacked the tar and $BASE is where I want the installation of fpc and Lazarus)

I use this successfully in my scripts.

ertank

  • Full Member
  • ***
  • Posts: 203
Re: New fpc version fails to build on Raspberry Pi
« Reply #2 on: December 24, 2017, 01:06:14 am »
I got compatible ppcarm and started my compile using following command
Code: [Select]
make all OPT=-dFPC_ARMHF PP=/home/pi/fpc-3.1/bin/ppcarm

In the middle of compilation I got below error:
Code: [Select]
[ 50%] Compiled package utils-fprcp
Start compiling package utils-h2pas for target arm-linux.
Executing command "/home/pi/fpc-3.1/bin/pyacc h2pas/h2pas.y h2pas/h2pas.pas"
The installer encountered the following error:
External command "/home/pi/fpc-3.1/bin/pyacc h2pas/h2pas.y h2pas/h2pas.pas" failed with exit code 256. Console output:
TP Yacc Version 4.1a [April 2000], Copyright (c) 1990-2000 Albert Graef

FATAL: cannot open file /usr/lib/fpc/lexyacc/yyparse.cod

Makefile:2426: recipe for target 'all' failed
make[2]: *** [all] Error 1
make[2]: Leaving directory '/home/pi/fpc/source/utils'
Makefile:2696: recipe for target 'utils_all' failed
make[1]: *** [utils_all] Error 2
make[1]: Leaving directory '/home/pi/fpc/source'
Makefile:2940: recipe for target 'build-stamp.arm-linux' failed
make: *** [build-stamp.arm-linux] Error 2
There is no directory /usr/lib/fpc in my system. But I do have /home/pi/fpc-3.1/lib/fpc/lexyacc/yyparse.cod

Source version details:
Code: [Select]
pi@raspberrypi:~/fpc/source $ svn info
Path: .
Working Copy Root Path: /home/pi/fpc/source
URL: https://svn.freepascal.org/svn/fpc/trunk
Relative URL: ^/trunk
Repository Root: https://svn.freepascal.org/svn/fpc
Repository UUID: 3ad0048d-3df7-0310-abae-a5850022a9f2
Revision: 37788
Node Kind: directory
Schedule: normal
Last Changed Author: karoly
Last Changed Rev: 37788
Last Changed Date: 2017-12-23 17:05:09 +0300 (Sat, 23 Dec 2017)

Any idea anyone?

molly

  • Hero Member
  • *****
  • Posts: 2345
Re: New fpc version fails to build on Raspberry Pi
« Reply #3 on: December 24, 2017, 01:21:39 am »
Code: [Select]
make all OPT=-dFPC_ARMHF PP=/home/pi/fpc-3.1/bin/ppcarm
Eh, what ?

What are you trying to compile using 3.1 as starting compiler ?

ertank

  • Full Member
  • ***
  • Posts: 203
Re: New fpc version fails to build on Raspberry Pi
« Reply #4 on: December 24, 2017, 01:44:41 am »
Eh, what ?

What are you trying to compile using 3.1 as starting compiler ?
Do not be mistaken by the directory name. It is not a 3.1 compiler but 3.0.4rc1

molly

  • Hero Member
  • *****
  • Posts: 2345
Re: New fpc version fails to build on Raspberry Pi
« Reply #5 on: December 24, 2017, 01:49:26 am »
Ah, ok ertank. That indeed works confusing.

You require the latest release version. Not release candidate.

ertank

  • Full Member
  • ***
  • Posts: 203
Re: New fpc version fails to build on Raspberry Pi
« Reply #6 on: December 24, 2017, 03:51:01 pm »
SVN 37792 is working fine. I think it was something temporary.

molly

  • Hero Member
  • *****
  • Posts: 2345
Re: New fpc version fails to build on Raspberry Pi
« Reply #7 on: December 25, 2017, 01:11:32 am »
@ertank:
That is always a possibility. Trunk is not guaranteed to compile (although developers do try).

Another possibility (which i often forget) is to clean up my local tree. fwiw: sorry as i did not recognize you as notorious building from svn. I haven't checked the revision that you mentioned.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus