Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-12

Lazarus 1.6RC1 make bigide fails on Raspberry Pi2

20 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bo Berglund

I have checked out the lazarus 1.6 RC1 tag from svn. I have also checked out and built the fpc release 3.0.0 and installed it as the fpc compiler on my system.

Now I wanted to finally build lazarus 1.6RC1, but this happens: cd ~/development/src/lazarus/1.6.RC1
make bigide
make -C packager/registration
make[1]: Entering directory
'/home/pi/development/src/lazarus/1.6.RC1/packager/registration' /bin/rm -f ../units/arm-linux/fcllaz.ppu
/bin/mkdir -p ../units/arm-linux
/usr/local/bin/ppcarm -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -Fu. -Fu/usr/local/lib/fpc/3.0.0/units/arm-linux/rtl -FE. -FU../units/ arm-linux -darm fcllaz.pas
Hint: (11030) Start of reading config file /etc/fpc.cfg Hint: (11031) End of reading config file /etc/fpc.cfg Free Pascal Compiler version 3.0.0 [2015/12/14] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: Linux for ARMHF
(3104) Compiling fcllaz.pas
(3104) Compiling registerfcl.pas
(3104) Compiling lazaruspackageintf.pas
(9009) Assembling lazaruspackageintf
/home/pi/development/src/lazarus/1.6.RC1/packager/registration/registerfcl.pas(45,22) Fatal: (10022) Can't find unit process used by
RegisterFCL
Fatal: (1018) Compilation aborted
Makefile:2702: recipe for target 'fcllaz.ppu' failed make[1]: *** [fcllaz.ppu] Error 1
make[1]: Leaving directory
'/home/pi/development/src/lazarus/1.6.RC1/packager/registration' Makefile:3050: recipe for target 'registration' failed make: *** [registration] Error 2

Anyone knows why this happens?
I thought fpc 3.0.0 could be used to build lazarus 1.6RC1

Bo Berglund Developer in Sweden

Reply by email

Bo Berglund
to Bo Berglund
Bo Berglund wrote 7 lines
I have checked out the lazarus 1.6 RC1 tag from svn. I have also checked out and built the fpc release 3.0.0 and installed it as the fpc compiler on my system. Now I wanted to finally build lazarus 1.6RC1, but this happens: cd ~/development/src/lazarus/1.6.RC1 make bigide

...

Free Pascal Compiler version 3.0.0 [2015/12/14] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: Linux for ARMHF

...

Show quoted text 9 lines
(9009) Assembling lazaruspackageintf /home/pi/development/src/lazarus/1.6.RC1/packager/registration/registerfcl.pas(45,22) Fatal: (10022) Can't find unit process used by RegisterFCL Fatal: (1018) Compilation aborted Makefile:2702: recipe for target 'fcllaz.ppu' failed make[1]: *** [fcllaz.ppu] Error 1 make[1]: Leaving directory '/home/pi/development/src/lazarus/1.6.RC1/packager/registration' Makefile:3050: recipe for target 'registration' failed

I checked for the file in question:
pi at rpi2-jessie ~/development/src/lazarus/1.6.RC1 $ find -name process.*
./components/printers/unix/images/process.xpm

It seems like there is no such process unit....
Obviously an xpm file could not be a Pascal unit.

What is the deal here?

Strangely I did not get this error when compiling Lazarus 1.6RC1 on a Linux Mint 17.2 Cinnamon machine. And yet the process unit is not found here either.

Bo Berglund Developer in Sweden

Reply by email

Mattias Gaertner
to Bo Berglund: I have checked out the lazarus 1.6 RC1 tag from svn. I have also checked out and built…
Show quoted text 12 lines
I have checked out the lazarus 1.6 RC1 tag from svn. I have also checked out and built the fpc release 3.0.0 and installed it as the fpc compiler on my system. Now I wanted to finally build lazarus 1.6RC1, but this happens: [...] /home/pi/development/src/lazarus/1.6.RC1/packager/registration/registerfcl.pas(45,22) Fatal: (10022) Can't find unit process used by RegisterFCL [...] Anyone knows why this happens? I thought fpc 3.0.0 could be used to build lazarus 1.6RC1

Check if you have /etc/fpc.cfg.
A "make install" of FPC only installs the files, it does not setup your system to use the new FPC.
You need to install a link and create the /etc/fpc.cfg. To get an idea search for "samplecfg" on
http://wiki.freepascal.org/Install_fpc_on_Raspberry_with_Gentoo

Mattias

Reply by email

Bo Berglund
to Mattias Gaertner
Mattias Gaertner wrote
Check if you have /etc/fpc.cfg.

Yes I have.
In fact I do have several instances of the fpc compiler: The 2.6.4 bootstrap compiler
The 3.0.0 compiler I just built from the release sources The 3.1.1 compiler that resulted when I got the trunk sources a month or so ago and built it.

I also have Lazarus 1.5 and 1.2.4 working on the Pi2 system.

Now I just wanted to "upgrade" by installing the 1.6RC1 release candidate of lazarus and fpc release 3.0.0 and get them working side by side with the existing IDE:s

Show quoted text 5 lines
A "make install" of FPC only installs the files, it does not setup your system to use the new FPC. You need to install a link and create the /etc/fpc.cfg. To get an idea search for "samplecfg" on http://wiki.freepascal.org/Install_fpc_on_Raspberry_with_Gentoo

I cannot post the content of the fpc.cfg file here because it is too big. But I wonder how it can be placed in /etc/ since then it has to be working correctly for all versions of fpc that one may want to use.

Is there just a single fpc.cfg?

Bo Berglund Developer in Sweden

Reply by email

Mattias Gaertner
to Bo Berglund
Show quoted text 11 lines
On Tue, 15 Dec 2015 15:35:59 +0100, Mattias Gaertner wrote: >Check if you have /etc/fpc.cfg. Yes I have. In fact I do have several instances of the fpc compiler: The 2.6.4 bootstrap compiler The 3.0.0 compiler I just built from the release sources The 3.1.1 compiler that resulted when I got the trunk sources a month or so ago and built it.

Maybe you have too many fpc configs.
Find out what config is used by fpc. For example by compiling an empty file with -vut.
Then check the -Fu paths in the config.

Show quoted text 5 lines
I also have Lazarus 1.5 and 1.2.4 working on the Pi2 system. Now I just wanted to "upgrade" by installing the 1.6RC1 release candidate of lazarus and fpc release 3.0.0 and get them working side by side with the existing IDE:s

Should work.

Show quoted text 9 lines
>A "make install" of FPC only installs the files, it does not setup your >system to use the new FPC. >You need to install a link and create the /etc/fpc.cfg. >To get an idea search for "samplecfg" on >http://wiki.freepascal.org/Install_fpc_on_Raspberry_with_Gentoo I cannot post the content of the fpc.cfg file here because it is too big. But I wonder how it can be placed in /etc/ since then it has to be working correctly for all versions of fpc that one may want to use.

By the power of macros. The -Fu paths usually looks like this on Linux:

-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/*
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/rtl
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/$fpcsubarch-$fpcmemorymodel -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/* -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/rtl

Is there just a single fpc.cfg?

The compiler searches for a config at several places and stops at the first hit.

Mattias

Reply by email

Bo Berglund
to Mattias Gaertner
Mattias Gaertner wrote 5 lines
> Is there just a single fpc.cfg? The compiler searches for a config at several places and stops at the first hit.

I searched for the cfg files:
pi at rpi2-jessie / $ sudo find -name fpc*.cfg
./home/pi/fpc/fpcbuild-2.6.4/install/amiga/fpc.cfg ./var/lib/dpkg/alternatives/fpc.cfg
./etc/alternatives/fpc.cfg
./etc/fpc-2.6.4.cfg
./etc/fpc.cfg

I also found out that /etc/fpc.cfg is actually a symlink: /etc/fpc.cfg -> /etc/alternatives/fpc.cfg which in turn is a symlink: /etc/alternatives/fpc.cfg -> /etc/fpc-2.6.4.cfg

So in a roundabout way /etc/fpc.cfg is actually: /etc/fpc-2.6.4.cfg

Question:
Is the fpc version 2.6.4 cfg file any good for fpc 3.0.0?

Seems a very involved way of handling this, hard for me to follow in any case. :(

In case the problem was caused by the fpc 3.0.0 I switched back to 2.6.4 and tried to build lazarus 1.6RC1.
Same exact error message...

Bo Berglund Developer in Sweden

Reply by email

Mark Morgan Lloyd
to Bo Berglund
Bo Berglund wrote 26 lines
On Tue, 15 Dec 2015 17:17:47 +0100, Mattias Gaertner wrote: >> Is there just a single fpc.cfg? > The compiler searches for a config at several places and stops at the > first hit. > I searched for the cfg files: pi at rpi2-jessie / $ sudo find -name fpc*.cfg ./home/pi/fpc/fpcbuild-2.6.4/install/amiga/fpc.cfg ./var/lib/dpkg/alternatives/fpc.cfg ./etc/alternatives/fpc.cfg ./etc/fpc-2.6.4.cfg ./etc/fpc.cfg I also found out that /etc/fpc.cfg is actually a symlink: /etc/fpc.cfg -> /etc/alternatives/fpc.cfg which in turn is a symlink: /etc/alternatives/fpc.cfg -> /etc/fpc-2.6.4.cfg So in a roundabout way /etc/fpc.cfg is actually: /etc/fpc-2.6.4.cfg Question: Is the fpc version 2.6.4 cfg file any good for fpc 3.0.0? Seems a very involved way of handling this, hard for me to follow in any case. :(

With the caveat that this is for a native (i.e. not cross) compiler: you only need one of those. As discussed- several times- about the only thing that needs adjusting is the path to the GCC stuff if you move an existing fpc.cfg to another machine, under normal circumstances it's set up when you run install.sh to install the binary release files. I use the same fpc.cfg for everything from 2.2.4 through 3.0.1, and have not- so far- had to do anything special when building ARM or MIPS cross compilers.

Also see Lazarus's --pcp= option. Again, I don't think this is the first time I've pointed
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Bo Berglund
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote
Also see Lazarus's --pcp= option. Again, I don't think this is the first time I've pointed issue is not really the --pcp option to separate the lazarus

configs. I have done so already for the older lazarus.

Instead it is about actually being able to build the RC1 lazarus on the Pi2 using the fpc. I have now tried both the 3.0.0 version and the older 2.6.4 with the same results. So somehow it seems like there is something amiss in the lazarus sources, which depend on the platform it is being compiled for, or else the fpc 3.0.0 installation is incomplete in some way. Is the process unit part of lazarus code or fpc code?

Building Lazarus worked fine in the Linux Mint 17.2 virtual machine but won't work here. Same sources checked out from svn in both cases, yet there is this error about the missing process unit...

Fatal: (10022) Can't find unit process used by RegisterFCL

Does RegisterFCL work differently on Linux x64 than on Linux ARM?

By the way I found a process.pp file in the fpc 3.0.0 sources: packages/fcl-process/src/process.pp

Maybe the lazarus "make bigide" does not search the correct directory so it misses this on an ARM platform? Just guessing now of course...

Bo Berglund Developer in Sweden

Reply by email

Mattias Gaertner
to Bo Berglund
[...] >Fatal: (10022) Can't find unit process used by RegisterFCL Does RegisterFCL work differently on Linux x64 than on Linux ARM?

No.

By the way I found a process.pp file in the fpc 3.0.0 sources: packages/fcl-process/src/process.pp

You should have a process.ppu in your FPC install directory.

Maybe the lazarus "make bigide" does not search the correct directory so it misses this on an ARM platform? Just guessing now of course...

process.ppu is part of every FPC install.
It must be in the -Fu search path of your /etc/fpc.cfg.

Mattias

Reply by email

Mark Morgan Lloyd
to Mattias Gaertner
Mattias Gaertner wrote 21 lines
On Wed, 16 Dec 2015 22:48:02 +0100 Bo Berglund wrote: > [...] >> Fatal: (10022) Can't find unit process used by RegisterFCL > Does RegisterFCL work differently on Linux x64 than on Linux ARM? No. > By the way I found a process.pp file in the fpc 3.0.0 sources: > packages/fcl-process/src/process.pp You should have a process.ppu in your FPC install directory. > Maybe the lazarus "make bigide" does not search the correct directory > so it misses this on an ARM platform? Just guessing now of course... process.ppu is part of every FPC install. It must be in the -Fu search path of your /etc/fpc.cfg.

$ fpc -iV
3.0.0
# Unpack 1.6RC1, rename directory to lazarus-1.6.0+3.0.0 $ cd lazarus-1.6.0+3.0.0
$ make bigide
..
make[1]: Leaving directory ... lazarus-1.6.0+3.0.0/components/chmhelp/lhelp'

The result runs, including on Raspbian Jessie's GTK2. The only obvious thing that I'd fault is that the lazarus binary (i.e. specifically referring to the IDE) is poor at handling --help and --version. However

$ ./lazbuild --version
1.6RC1

works as expected.

So if an inexperienced twit like me can get it running, and can successfully maintain multiple versions of FPC and Lazarus including different combinations of compiler and IDE, why can't anybody?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Koenraad Lelong
to Mark Morgan Lloyd

Op 17-12-15 om 11:36 schreef Mark Morgan Lloyd:

Show quoted text 13 lines
$ fpc -iV 3.0.0 # Unpack 1.6RC1, rename directory to lazarus-1.6.0+3.0.0 $ cd lazarus-1.6.0+3.0.0 $ make bigide .. make[1]: Leaving directory ... lazarus-1.6.0+3.0.0/components/chmhelp/lhelp' The result runs, including on Raspbian Jessie's GTK2. The only obvious thing that I'd fault is that the lazarus binary (i.e. specifically referring to the IDE) is poor at handling --help and --version. However

Hi,

I tried what you said. Lazarus runs indeed, but can't compile a existing project.
I get an error stating fpcres could not be found. When I run fpcres on the command-line it starts and gives some output.

I also can't compile lazarus itself (e.g. after adding packages). I also get the error that fpcres can not be found.

Am I missing something ?

Koenraad.

Reply by email

Mark Morgan Lloyd
to Koenraad Lelong
Koenraad Lelong wrote 25 lines
Op 17-12-15 om 11:36 schreef Mark Morgan Lloyd: > $ fpc -iV > 3.0.0 > # Unpack 1.6RC1, rename directory to lazarus-1.6.0+3.0.0 > $ cd lazarus-1.6.0+3.0.0 > $ make bigide > .. > make[1]: Leaving directory ... > lazarus-1.6.0+3.0.0/components/chmhelp/lhelp' > > The result runs, including on Raspbian Jessie's GTK2. The only obvious > thing that I'd fault is that the lazarus binary (i.e. specifically > referring to the IDE) is poor at handling --help and --version. However > Hi, I tried what you said. Lazarus runs indeed, but can't compile a existing project. I get an error stating fpcres could not be found. When I run fpcres on the command-line it starts and gives some output. I also can't compile lazarus itself (e.g. after adding packages). I also get the error that fpcres can not be found. Am I missing something ?

I know this sounds silly, but check fpcres is on the path. My experience it that for Lazarus it's the only program that's needed apart from fpc and ppcarm etc.

Apart from that... on Raspbian Jessie some projects work and others don't. The one I've got here where I can see a problem also fails on 1.4.4+3.0.0, I think the problem might be when a .lfm is outside the normal project directory.

I'm about to take a look at other platforms.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 20 lines
> I tried what you said. Lazarus runs indeed, but can't compile a > existing project. > I get an error stating fpcres could not be found. When I run fpcres on > the command-line it starts and gives some output. > > I also can't compile lazarus itself (e.g. after adding packages). I > also get the error that fpcres can not be found. > > Am I missing something ? I know this sounds silly, but check fpcres is on the path. My experience it that for Lazarus it's the only program that's needed apart from fpc and ppcarm etc. Apart from that... on Raspbian Jessie some projects work and others don't. The one I've got here where I can see a problem also fails on 1.4.4+3.0.0, I think the problem might be when a .lfm is outside the normal project directory. I'm about to take a look at other platforms.

In my case on both armhf and amd64 the problems were caused by a lingering {$I ... .lrs } directive. This wouldn't show up if either an older Lazarus/FPC combination had recently built the project, or if the .lrs file was stored in local Subversion.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Koenraad Lelong
to Mark Morgan Lloyd: I know this sounds silly, but check fpcres is on the path. My experience it that for…

Op 17-12-15 om 18:17 schreef Mark Morgan Lloyd:

Show quoted text 31 lines
Koenraad Lelong wrote: > Op 17-12-15 om 11:36 schreef Mark Morgan Lloyd: >> $ fpc -iV >> 3.0.0 >> # Unpack 1.6RC1, rename directory to lazarus-1.6.0+3.0.0 >> $ cd lazarus-1.6.0+3.0.0 >> $ make bigide >> .. >> make[1]: Leaving directory ... >> lazarus-1.6.0+3.0.0/components/chmhelp/lhelp' >> >> The result runs, including on Raspbian Jessie's GTK2. The only obvious >> thing that I'd fault is that the lazarus binary (i.e. specifically >> referring to the IDE) is poor at handling --help and --version. However >> > Hi, > > I tried what you said. Lazarus runs indeed, but can't compile a > existing project. > I get an error stating fpcres could not be found. When I run fpcres on > the command-line it starts and gives some output. > > I also can't compile lazarus itself (e.g. after adding packages). I > also get the error that fpcres can not be found. > > Am I missing something ? I know this sounds silly, but check fpcres is on the path. My experience it that for Lazarus it's the only program that's needed apart from fpc and ppcarm etc.

Hi,

Like I said, when I run fpcres on the commandline, it works : pi at raspberrypi ~ $ fpcres
fpcres - resource file converter, version 2.0 [2015/12/06], FPC 3.0.0 Host platform: Linux - arm
Copyright (c) 2008 by Giulio Bernardi.
Syntax: fpcres [options] <inputfile> [<inputfile>...] [-o <outputfile>] ...
pi at raspberrypi ~ $ which fpcres
/home/pi/bin/fpcres

I downloaded fpc from somewhere (I can't find where from at the moment) and installed it in a non-previleged place (/home/pi/fpc-3.0.0). Then I made symbolic links in /home/pi/bin and set the PATH to include /home/pi/bin.

Koenraad

Reply by email

Mark Morgan Lloyd
to Alfred
Alfred wrote 5 lines
In my experience, fpres fails also due to lack of memory ! Just increase your swapsize with 500MB, and try again. Saved me many times. (normally, I use cross-compile ... also saves lots of time ... )

Doing just about anything with Lazarus- particularly a (re)build- has required something like 512Mb RAM+swap for a long time.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Koenraad Lelong
to Alfred: In my experience, fpres fails also due to lack of memory ! Just increase your swapsize…

Op 18-12-15 om 11:41 schreef Alfred:

Show quoted text 6 lines
In my experience, fpres fails also due to lack of memory ! Just increase your swapsize with 500MB, and try again. Saved me many times. (normally, I use cross-compile ... also saves lots of time ... )

Hi,

You seem to be right. I added swap, now I can compile an existing project.

Many thanks.

Koenraad.

Reply by email

Bo Berglund
to Mattias Gaertner: On Wed, 16 Dec 2015 22:48:02 +0100 No. You should have a process.ppu in your FPC install…
Mattias Gaertner wrote
process.ppu is part of every FPC install. It must be in the -Fu search path of your /etc/fpc.cfg. From the fpc.cfg file (actually symlinked to fpc-2.6.4.cfg):

# searchpath for units and other system dependent things -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/*
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/rtl

So for fpc 3.0.0 there should be a directory:
/usr/lib/fpc/3.0.0/units/arm-linux

But there is not! So here is the mystery:
I installed fpc 3.0.0 but it obviously did not create the needed directory for the fpc units....

Now looking back using the history command to verify how I actually installed fpc 3.0 I found this:

cd /home/pi/development/fpc
time svn co http://svn.freepascal.org/svn/fpc/tags/release_3_0_0 3.0.0 cd 3.0.0/
make all OPT=-dFPC_ARMHF
sudo make install OPT=-dFPC_ARMHF PREFIX=/usr/local sudo make install sourceinstall OPT=-dFPC_ARMHF PREFIX=/usr/local

Should another command be issued in order to get stuff loaded into /usr/lib/fpc/3.0.0?

Bo Berglund Developer in Sweden

Reply by email

Mattias Gaertner
to Bo Berglund
Show quoted text 8 lines
[...] # searchpath for units and other system dependent things -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget [...] sudo make install OPT=-dFPC_ARMHF PREFIX=/usr/local [...] Should another command be issued in order to get stuff loaded into /usr/lib/fpc/3.0.0?

PREFIX=/usr

Mattias

Reply by email

Bo Berglund
to Mattias Gaertner
Mattias Gaertner wrote 5 lines
> Should another command be issued in order to get stuff loaded into > /usr/lib/fpc/3.0.0? PREFIX=/usr

Thanks a bunch!
I just knew there would be something simple that I had wrong! Now started the lazarus RC1 build and it works just fine! :)

The PREFIX=/usr/local came from a cookbook webpage I have used to install trunk before and it did work then for some reason.

Additional question:

Is the command:
sudo make install sourceinstall OPT=-dFPC_ARMHF PREFIX=/usr

really needed after the "make all" and "sudo make install ..." have been executed?

I skipped this step now after changing PREFIX and the Lazarus compile just runs anyway.

Bo Berglund Developer in Sweden

Reply by email