Sign in Join

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

Mailing lists / lazarus / 2019-02

Lazarus 2 Installation under Raspbian Stretch fails

22 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Joe

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

Reply by email

Joe

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

Reply by email

Mattias Gaertner
to Joe: on a Pi 3B+ under Stretch I did this: ~ $ mkdir lazarus-2a sudo chmod a+w lazarus-2a svn…
Show quoted text 19 lines
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

Reply by email

Joe
to Joe
Joe wrote
Enclosed is the Output of Make with this Option.

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

--  Joe
-------------- next part --------------
fpc: /usr/bin/fpc /usr/lib/fpc /etc/fpc.bak /etc/fpc.cfg /usr/local/bin/fpc /usr/local/lib/fpc /usr/share/man/man1/fpc.1.gz

Reply by email

Joe
to Mattias Gaertner
Mattias Gaertner wrote
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

Reply by email

Mattias Gaertner
to Joe
Show quoted text 8 lines
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

Reply by email

Anthony Walter
to Joe: on a Pi 3B+ under Stretch I did this: ~ $ mkdir lazarus-2a sudo chmod a+w lazarus-2a svn…

Joe,

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

http://lists.lazarus.freepascal.org/pipermail/lazarus/2016-April/162928.html

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190210/d1a4382d/attachment.html>

Reply by email

Joe
to Anthony Walter
Anthony Walter wrote
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

Reply by email

Joe
to Mattias Gaertner: On Sat, 9 Feb 2019 22:19:13 +0100 Check that your /etc/fpc.cfg contains the right -Fu…
Mattias Gaertner wrote
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190210/f23fed47/attachment.html>

Reply by email

Mattias Gaertner
to Joe: I made this cfg file with fpcmkcfg and changed the symlink with ln -sf /etc/fpc-3.0.4.cfg…
Show quoted text 8 lines
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

Reply by email

Joe
to Mattias Gaertner
Mattias Gaertner wrote
Again, check with -vut: make bigide OPT=-vut

Mattias,
here you get the make output  and the cfg file.

--  Joe
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed... Name: MakeOutput.txt
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190210/5a74f8f7/attachment-0001.txt> -------------- next part --------------
#
# Config file generated by fpcmkcfg on 10-2-19 - 23:10:52 # Example fpc.cfg for Free Pascal Compiler
#

# ----------------------
# Defines (preprocessor)
# ----------------------

#
# nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed #
# -d is the same as #DEFINE
# -u is the same as #UNDEF
#

#
# Some examples (for switches see below, and the -? helppages) #
# Try compiling with the -dRELEASE or -dDEBUG on the commandline #

# For a release compile with optimizes and strip debuginfo #IFDEF RELEASE
-O2
-Xs
#WRITE Compiling Release Version
#ENDIF

# For a debug version compile with debuginfo and all codegeneration checks on #IFDEF DEBUG
-gl
-Crtoi
#WRITE Compiling Debug Version
#ENDIF

# assembling
#ifdef darwin
# use pipes instead of temporary files for assembling -ap
# path to Xcode 4.3+ utilities (no problem if it doesn't exist) -FD/Applications/Xcode.app/Contents/Developer/usr/bin #endif

# ----------------
# Parsing switches
# ----------------

# Pascal language mode
# -Mfpc free pascal dialect (default)
# -Mobjfpc switch some Delphi 2 extensions on # -Mdelphi tries to be Delphi compatible
# -Mtp tries to be TP/BP 7.0 compatible # -Mgpc tries to be gpc compatible
# -Mmacpas tries to be compatible to the macintosh pascal dialects #
# Turn on Object Pascal extensions by default
#-Mobjfpc

# Assembler reader mode
# -Rdefault use default assembler
# -Ratt read AT&T style assembler
# -Rintel read Intel style assembler
#
# All assembler blocks are AT&T styled by default
#-Ratt

# Semantic checking
# -S2 same as -Mobjfpc
# -Sc supports operators like C (*=,+=,/= and -=) # -Sa include assertion code.
# -Sd same as -Mdelphi
# -Se<x> error options. <x> is a combination of the following: # <n> : compiler stops after <n> errors (default is 1) # w : compiler stops also after warnings # n : compiler stops also after notes
# h : compiler stops also after hints
# -Sg allow LABEL and GOTO
# -Sh Use ansistrings
# -Si support C++ styled INLINE
# -Sk load fpcylix unit
# -SI<x> set interface style to <x>
# -SIcom COM compatible interface (default) # -SIcorba CORBA compatible interface
# -Sm support macros like C (global)
# -So same as -Mtp
# -Sp same as -Mgpc
# -Ss constructor name must be init (destructor must be done) # -Sx enable exception keywords (default in Delphi/ObjFPC modes) #
# Allow goto, inline, C-operators, C-vars
-Sgic

# ---------------
# Code generation
# ---------------

# Uncomment the next line if you always want static/dynamic units by default # (can be overruled with -CD, -CS at the commandline) #-CS
#-CD

# Set the default heapsize to 8Mb
#-Ch8000000

# Set default codegeneration checks (iocheck, overflow, range, stack) #-Ci
#-Co
#-Cr
#-Ct

# Optimizer switches
# -Os generate smaller code
# -Oa=N set alignment to N
# -O1 level 1 optimizations (quick optimizations, debuggable) # -O2 level 2 optimizations (-O1 + optimizations which make debugging more difficult) # -O3 level 3 optimizations (-O2 + optimizations which also may make the program slower rather than faster) # -Oo<x> switch on optimalization x. See fpc -i for possible values # -OoNO<x> switch off optimalization x. See fpc -i for possible values # -Op<x> set target cpu for optimizing, see fpc -i for possible values

#ifdef darwin
#ifdef cpui386
-Cppentiumm
-Oppentiumm
#endif
#endif

# -----------------------
# Set Filenames and Paths
# -----------------------

# Both slashes and backslashes are allowed in paths

# path to the messagefile, not necessary anymore but can be used to override # the default language
#-Fr/msg/errore.msg
#-Fr/msg/errorn.msg
#-Fr/msg/errores.msg
#-Fr/msg/errord.msg
#-Fr/msg/errorr.msg

# search path for unicode binary files (FPC 2.x does not know this switch) #ifndef VER2
-FM/unicode/
#endif

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

#ifdef cpui8086
-Fu/units/$fpctarget/$fpcsubarch-$fpcmemorymodel
-Fu/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/* -Fu/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/rtl #endif

#IFDEF FPCAPACHE_1_3
-Fu/units/$fpctarget/httpd13/
#ELSE
#IFDEF FPCAPACHE_2_0
-Fu/units/$fpctarget/httpd20
#ELSE
-Fu/units/$fpctarget/httpd22
#ENDIF
#ENDIF

# searchpath for fppkg user-specific packages
-Fu~/.fppkg/lib/fpc/$fpcversion/units/$FPCTARGET/*

# path to the gcclib

# searchpath for libraries
#-Fl/lib
#-Fl/lib;/usr/lib
-Fl/lib/$FPCTARGET

# searchpath for tools
-FD/bin/$FPCTARGET

#DEFINE NEEDCROSSBINUTILS

# never need cross-prefix when targeting the JVM
# (no native compiler, always cross-compiling)
#ifdef cpujvm
#undef NEEDCROSSBINUTILS
#endif

# for android cross-prefix is set by compiler
#ifdef android
#undef NEEDCROSSBINUTILS
#endif

# never need cross-prefix when targeting the i8086 # (no native compiler, always cross-compiling)
#ifdef cpui8086
#undef NEEDCROSSBINUTILS
#endif

# never need cross-prefix when targeting the i8086 # (no native compiler, always cross-compiling)
#ifdef cpujvm
#undef NEEDCROSSBINUTILS
#endif

# binutils prefix for cross compiling
#IFDEF FPC_CROSSCOMPILING
#IFDEF NEEDCROSSBINUTILS
-XP$FPCTARGET-
#ENDIF
#ENDIF

# -------------
# Linking
# -------------

# generate always debugging information for GDB (slows down the compiling # process)
# -gc generate checks for pointers
# -gd use dbx
# -gg use gsym
# -gh use heap trace unit (for memory leak debugging) # -gl use line info unit to show more info for backtraces # -gv generates programs tracable with valgrind # -gw generate dwarf debugging info
#
# Enable debuginfo and use the line info unit by default #-gl

# always pass an option to the linker
#-k-s

# Always strip debuginfo from the executable
-Xs

# Always use smartlinking on i8086, because the system unit exceeds the 64kb # code limit
#ifdef cpui8086
-CX
-XX
#endif

# -------------
# Miscellaneous
# -------------

# Write always a nice FPC logo ;)
-l

# Verbosity
# e : Show errors (default) d : Show debug info # w : Show warnings u : Show unit info # n : Show notes t : Show tried/used files # h : Show hints s : Show time stamps # i : Show general info q : Show message numbers # l : Show linenumbers c : Show conditionals # a : Show everything 0 : Show nothing (except errors) # b : Write file names messages r : Rhide/GCC compatibility mode # with full path x : Executable info (Win32 only) # v : write fpcdebug.txt with p : Write tree.log with parse tree # lots of debugging info
#
# Display Info, Warnings and Notes
-viwn
# If you don't want so much verbosity use
#-vw

Reply by email

Mattias Gaertner
to Joe
Show quoted text 5 lines
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

Reply by email

Joe
to Mattias Gaertner
Mattias Gaertner wrote
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

Reply by email

Anthony Walter
to Joe

Okay Joe, I've create a version of Lazarus 2.0 and it's available here:

https://www.getlazarus.org/setup/?download#raspberry_pi

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. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190211/2a7289b7/attachment.html>

Reply by email

Joe
to Anthony Walter
Anthony Walter wrote 15 lines
Okay Joe, I've create a version of Lazarus 2.0 and it's available here: https://www.getlazarus.org/setup/?download#raspberry_pi 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190211/acb7e2a7/attachment.html>

Reply by email

Bo Berglund
to Joe: on a Pi 3B+ under Stretch I did this: ~ $ mkdir lazarus-2a sudo chmod a+w lazarus-2a svn…
Joe wrote 19 lines
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

Reply by email

Bo Berglund
to Bo Berglund
Bo Berglund wrote 23 lines
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

Reply by email

Anthony Walter
to Bo Berglund: On Sat, 9 Feb 2019 20:31:56 +0100, Joe via lazarus I have created a script file to use…

Bo,

Buliding Lazarus pushes the limits of the hardware and default settings for Raspbian. The 1GB of RAM on the Pi is often not sufficient to build Lazarus. Typically you need to create modify the swap to be 512MB or 1GB. I recommend 1GB.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190211/02137498/attachment.html>

Reply by email