[Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
Hi,

on a Pi 3B+ under Stretch I did this:

~ $ mkdir lazarus-2a
sudo chmod a+w lazarus-2a
svn co https://svn.freepascal.org/svn/lazarus/trunk lazarus-2a
cd lazarus-2a
make clean all

I get this error message:
...
Compiling fcllaz
home/pi/lazarus-2a/packager/registration/fcllaz.pas(11,3)  Fatal:
(10022) Can't find unit db used by fcllaz
Fatal: (1018) Compilation aborted

What's wrong?
BTW: fpc -iW returns "3.0.4".

Regards --  Joe
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
On Sat, 9 Feb 2019 20:31:56 +0100
Joe via lazarus <[hidden email]> wrote:

> Hi,
>
> on a Pi 3B+ under Stretch I did this:
>
> ~ $ mkdir lazarus-2a
> sudo chmod a+w lazarus-2a
> svn co https://svn.freepascal.org/svn/lazarus/trunk lazarus-2a
> cd lazarus-2a
> make clean all
>
> I get this error message:
> ...
> Compiling fcllaz
> home/pi/lazarus-2a/packager/registration/fcllaz.pas(11,3)  Fatal:
> (10022) Can't find unit db used by fcllaz
> Fatal: (1018) Compilation aborted
>
> What's wrong?
> BTW: fpc -iW returns "3.0.4".

Have you tried "make OPT=-vt" to see why fpc can't find unit db?

Mattias
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
Am 09.02.2019 um 21:30 schrieb Mattias Gaertner via lazarus:
> Have you tried "make OPT=-vt" to see why fpc can't find unit db?
Enclosed is the Output of Make with this Option.
--  Joe

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus

MakeOutput.txt (81K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
Am 09.02.2019 um 22:19 schrieb Joe via lazarus:
> Enclosed is the Output of Make with this Option.

Additionally here you get the output of "whereis fpc".

--  Joe

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus

WhereOutput.txt (172 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Sat, 9 Feb 2019 22:19:13 +0100
Joe via lazarus <[hidden email]> wrote:

> Am 09.02.2019 um 21:30 schrieb Mattias Gaertner via lazarus:
> > Have you tried "make OPT=-vt" to see why fpc can't find unit db?  
> Enclosed is the Output of Make with this Option.

Check that your /etc/fpc.cfg contains the right -Fu paths.

Mattias
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
Am 09.02.2019 um 23:20 schrieb Mattias Gaertner via lazarus:
> Check that your /etc/fpc.cfg contains the right -Fu paths.

/etc/fpc.cfg -> /etc/alternatives/fpc.cfg -> /etc/fpc-3.0.0.cfg

It seems, something is wrong with upgrading from fpc 3.0.0 to fpc 3.04.
What's the official method to do this? I did sudo apt-get upgrade.

cat /etc/fpc-3.0.0.cfg (first for of 278 lines):

#
# Config file generated by fpcmkcfg on 9-2-19 - 13:29:42
# Example fpc.cfg for Free Pascal Compiler
#

Regards --  Joe

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
On Sun, 10 Feb 2019 09:41:08 +0100
Joe via lazarus <[hidden email]> wrote:

> Am 09.02.2019 um 23:20 schrieb Mattias Gaertner via lazarus:
> > Check that your /etc/fpc.cfg contains the right -Fu paths.  
>
> /etc/fpc.cfg -> /etc/alternatives/fpc.cfg -> /etc/fpc-3.0.0.cfg
>
> It seems, something is wrong with upgrading from fpc 3.0.0 to fpc
> 3.04. What's the official method to do this? I did sudo apt-get
> upgrade.

Debian supports installing multiple fpc versions.
Create a /etc/fpc-3.0.4.cfg and change the
symlink /etc/alternatives/fpc.cfg

Mattias
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
Joe,

Either your fpc config environment is wrong or you are running out of memory. First read this message from the mailing lists:


To change GPU memory run "sudo raspi-config" and go to Advanced Options then Memory Split. Set the value to 64 or 32 then reboot and try to recompile.

If you still have problems compiling, let me know and I'll post a proper raspberry build script.

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
Am 10.02.2019 um 11:39 schrieb Anthony Walter via lazarus:
> If you still have problems compiling, let me know and I'll post a
> proper raspberry build script.

Yes, Anthony, please send this script (very appreciated). To the GPU 64
MB are assigned.
Thanx --  Joe
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
Am 09.02.2019 um 23:20 schrieb Mattias Gaertner via lazarus:
Am 09.02.2019 um 21:30 schrieb Mattias Gaertner via lazarus:

Create a /etc/fpc-3.0.4.cfg and change the
symlink /etc/alternatives/fpc.cfg
I made this cfg file with fpcmkcfg and changed the symlink with ln -sf /etc/fpc-3.0.4.cfg /etc/alternatives/fpc.cfg,
but 'make clean bigide' still fails with message "Can't find unit db used by fcllac".

Does this 'make' work on your Raspi 3B+?
/etc/fpc-3.0.4.cfg 

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
I'll post a build script in a little while. I have to reconfigure another SD raspbian image because my current one is dedicated to another project. Hang in there.

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Sun, 10 Feb 2019 20:07:02 +0100
Joe via lazarus <[hidden email]> wrote:

> Am 09.02.2019 um 23:20 schrieb Mattias Gaertner via lazarus:
> >> Am 09.02.2019 um 21:30 schrieb Mattias Gaertner via lazarus:
> >> Create a /etc/fpc-3.0.4.cfg and change the symlink
> >> /etc/alternatives/fpc.cfg  
> I made this cfg file with fpcmkcfg and changed the symlink with ln
> -sf /etc/fpc-3.0.4.cfg /etc/alternatives/fpc.cfg,
> but 'make clean bigide' still fails with message "Can't find unit db
> used by fcllac".

Again, check with -vut:
make bigide OPT=-vut

Mattias
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
Am 10.02.2019 um 22:31 schrieb Mattias Gaertner via lazarus:
> Again, check with -vut:
> make bigide OPT=-vut
Mattias,
here you get the make output  and the cfg file.

--  Joe

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus

MakeOutput.txt (84K) Download Attachment
fpc-3.0.4.cfg (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
On Sun, 10 Feb 2019 23:33:04 +0100
Joe via lazarus <[hidden email]> wrote:

> Am 10.02.2019 um 22:31 schrieb Mattias Gaertner via lazarus:
> > Again, check with -vut:
> > make bigide OPT=-vut
> Mattias,
> here you get the make output  and the cfg file.

Your cfg contains
-Fu/units/$fpctarget

This path does not exists:
...
Hint: (11030) Start of reading config file /etc/fpc.cfg
Path "/units/arm-linux/" not found
...

Maybe you mean
-Fu/usr/local/lib/fpc/$fpctarget/

?

Mattias

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
Am 11.02.2019 um 00:07 schrieb Mattias Gaertner via lazarus:
> Maybe you mean
> -Fu/usr/local/lib/fpc/$fpctarget/

Do you refer to the content of the cfg file? I created the cfg file
automagically with "fpcmkcfg -o /etc/fpc-3.0.4.cfg", but have no idea
about its content and did not change anything in it.

In the meantime, to be sure fpc 3.0.4 is ok, I updated its sources (to
revision 41293) and did "make build" and "sudo make install". No errors.

But when trying again to make lazarus, still the same error message pops up.
How does it work on your  Raspberry Pi 3B+?

Regards --  Joe
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
Okay Joe, I've create a version of Lazarus 2.0 and it's available here:


Please see this mailing list message titled "Raspbian FPC 3.3.1 and Lazarus 2.0 Available" for the notes.

I made this a precompiled bundle rather than an svn build script because it takes MUCH longer to download and build sources on a Raspberry Pi, and also I've reduced the storage footprint by at least 1.5GB, which is a lot given the typical space people have available on their Raspbian SD card.

Let me know if you have any questions or problems.

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
Am 11.02.2019 um 15:17 schrieb Anthony Walter via lazarus:
Okay Joe, I've create a version of Lazarus 2.0 and it's available here:


Please see this mailing list message titled "Raspbian FPC 3.3.1 and Lazarus 2.0 Available" for the notes.

I made this a precompiled bundle rather than an svn build script because it takes MUCH longer to download and build sources on a Raspberry Pi, and also I've reduced the storage footprint by at least 1.5GB, which is a lot given the typical space people have available on their Raspbian SD card.

Let me know if you have any questions or problems.


Hi, Anthony,

unfortunately this script fails on a Pi3B+ with  a fresh installed Stretch (Version Nov 2018).
I have created a bug report with enclosed screen shot and tried to send it to you, but got this answer:
Your mail to 'lazarus' with the subject

    Re: [Lazarus] Raspbian FPC 3.3.1 and Lazarus 2.0 Available/Bug
Report

Is being held until the list moderator can review it for approval.

The reason it is being held:

    Message body is too big: 161273 bytes with a limit of 100 KB

I am going to make the screen shot smaller and to try again.

Regards --  Joe

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
Just include the output of  the setup script. There shouldn't be too much text in it. Reminder, you'll need to the prerequisite packages before the install will work. The prerequisites will be listed when you run the setup script.


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Sat, 9 Feb 2019 20:31:56 +0100, Joe via lazarus
<[hidden email]> wrote:

>Hi,
>
>on a Pi 3B+ under Stretch I did this:
>
>~ $ mkdir lazarus-2a
>sudo chmod a+w lazarus-2a
>svn co https://svn.freepascal.org/svn/lazarus/trunk lazarus-2a
>cd lazarus-2a
>make clean all
>
>I get this error message:
>...
>Compiling fcllaz
>home/pi/lazarus-2a/packager/registration/fcllaz.pas(11,3)  Fatal:
>(10022) Can't find unit db used by fcllaz
>Fatal: (1018) Compilation aborted
>
>What's wrong?
>BTW: fpc -iW returns "3.0.4".

I have created a script file to use for installing fpc + lazarus on
RPi platforms including the dependencies and build tools. I have used
it many times on pristine RPi builds and it always worked fine for FPC
3.0.0 to 3.0.4 and Lazarus 1.6 to 1.8.x
I have put the script on my website for simplicity (so I can wget it
into a new RPi easily).

After reading this post I puilled out an RPi3 unit I had used for
other stuff so there was no old fpc/lazarus files on it and it was
running stretch too.

So this is what I did:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Then I manually created the user bin dir at /home/pi/bin since this is
where my script deposits the binaries. I also logged out and back in
to make sure this bin dir was recognized as the user's bin and was on
path.

I then created a ~/dev dir for my tools and downloaded my build script
into it using wget and configured the script regarding versions so
that fpc 3.0.4 and lazarus 2.0.0 would be the targets for
installation.

What happened when I ran the script is that it seemed to go OK as far
as all dependencies, subversion etc being installed and fpc 3.0.4
compiled and set up for use.
But the last steps where lazarus was to be installed ended after 37
minutes total with this message:

(9009) Assembling sourceeditor
sourceeditor.pp(11384) Error: (9008) Can't call the assembler, error
-1 switching to external assembling
sourceeditor.pp(11384) Fatal: (10026) There were 2 errors compiling
module, stopping
Fatal: (1018) Compilation aborted
Makefile:4144: recipe for target 'lazarus' failed
make[2]: *** [lazarus] Error 1
make[2]: Leaving directory '/home/pi/dev/lazarus/2.0.0/ide'
Makefile:4576: recipe for target 'bigide' failed
make[1]: *** [bigide] Error 2
make[1]: Leaving directory '/home/pi/dev/lazarus/2.0.0/ide'
Makefile:3378: recipe for target 'idebig' failed
make: *** [idebig] Error 2
install_lazfpc_local_pi.sh: 174: Cannot make Lazarus bigide! Aborting

I wonder at what step you are getting the missing db error?

And of course I wonder what was the reason for my failure?


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2 Installation under Raspbian Stretch fails

Free Pascal - Lazarus mailing list
On Mon, 11 Feb 2019 18:04:39 +0100, Bo Berglund via lazarus
<[hidden email]> wrote:

>What happened when I ran the script is that it seemed to go OK as far
>as all dependencies, subversion etc being installed and fpc 3.0.4
>compiled and set up for use.
>But the last steps where lazarus was to be installed ended after 37
>minutes total with this message:
>
>(9009) Assembling sourceeditor
>sourceeditor.pp(11384) Error: (9008) Can't call the assembler, error
>-1 switching to external assembling
>sourceeditor.pp(11384) Fatal: (10026) There were 2 errors compiling
>module, stopping
>Fatal: (1018) Compilation aborted
>Makefile:4144: recipe for target 'lazarus' failed
>make[2]: *** [lazarus] Error 1
>make[2]: Leaving directory '/home/pi/dev/lazarus/2.0.0/ide'
>Makefile:4576: recipe for target 'bigide' failed
>make[1]: *** [bigide] Error 2
>make[1]: Leaving directory '/home/pi/dev/lazarus/2.0.0/ide'
>Makefile:3378: recipe for target 'idebig' failed
>make: *** [idebig] Error 2
>install_lazfpc_local_pi.sh: 174: Cannot make Lazarus bigide! Aborting

>And of course I wonder what was the reason for my failure?

I found the problem!
Swap size had not been increased on this RPi3 image!
After changing to 1024M swap I ran my lazarus-only install script (it
is a cut-down version of the original script) and it finished OK after
13 min and the Stretch menu was updated to include Lazarus 2.0.0 in
its Programming section.

All is well and good, so I am not able to help the OP with any other
advice but making sure his swap is set to 1024 MB.


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
12