Sign in Join

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

Mailing lists / lazarus / 2019-02

Raspbian FPC 3.3.1 and Lazarus 2.0 Available

40 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Anthony Walter

I've made available precompiled bundles of FPC 3.3.1 and Lazarus 2.0 for the Raspberry Pi. You can download this bundle at this location:

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

This Raspbian bundle is much larger than my previous bundle weighing in at 635MB compared to the previous version's 200MB. The increase in almost entirely size is due to the inclusion of more many FPC packages. If any of you feel that a reduced install size is more important, please let me know and I'll consider removing the same packages which were remove in the previous bundle.

Please note, if you are trying to run Lazarus 2.0 on Raspbian and want to rebuild the IDE you'll need at least a 512MB swap file size. Please see the Raspbian documentation on how to enable and manage your Raspbian swap file. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190211/d3d517c7/attachment.html>

Reply by email

Joe
to Anthony Walter: I've made available precompiled bundles of FPC 3.3.1 and Lazarus 2.0 for the Raspberry…
Anthony Walter wrote
I've made available precompiled bundles of FPC 3.3.1 and Lazarus 2.0 for the Raspberry Pi. You can download this bundle at this location:

Hi, Anthony,

several attempts failed to send you my bug report with screen shots. Some bytes too large...
So here you get a copy of my report without screem shots, but with stderr output of the script.

Regards --  Joe
------------------------------------------------------

Copy:

Hi, Anthony,

I installed a fresh Stretch (Nov 2018) on a new SD card and put it in a Pi 3B+-. Selected 'German' and 'Germany'. Enabled VNC. Then I installed Lazarus 1.6.2 via "Add/Remove software", started Lazarus and got the known error message "The package editor macro script has detected a problerm and was activated".

Copied your script in /home/pi, made it executable and started it.

I was asked to install libghx-x11-dev and did it. Started the script again, accepted /home/pi/Development/FreePascal as default install location.

Said 'y' to the shortcuts question. But then I got an error message from line 206 of the script, and it finished.

Tried it again to get a screen shot with the error messages. It is enclosed.

How to fix?

Thank you --  Joe
-------------- next part --------------
/home/pi/.local/share/applications (y/n)? % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 tar: Das sieht nicht wie ein „tar“-Archiv aus.

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
./setup.sh: Zeile 206: /home/pi/Development/FreePascal/fpc/bin/fpcmkcfg: Datei oder Verzeichnis nicht gefunden find: ‘/home/pi/Development/FreePascal/lazarus/config’: Datei oder Verzeichnis nicht gefunden find: ‘/home/pi/Development/FreePascal/lazarus/config’: Datei oder Verzeichnis nicht gefunden find: ‘/home/pi/Development/FreePascal/lazarus’: Datei oder Verzeichnis nicht gefunden find: ‘/home/pi/Development/FreePascal/lazarus’: Datei oder Verzeichnis nicht gefunden cp: der Aufruf von stat für '/home/pi/Development/FreePascal/lazarus/lazarus.desktop' ist nicht möglich: Datei oder Verzeichnis nicht gefunden mv: der Aufruf von stat für '/home/pi/Development/FreePascal/lazarus/lazarus.desktop' ist nicht möglich: Datei oder Verzeichnis nicht gefunden ./setup.sh: Zeile 237: /home/pi/Development/FreePascal/fpc/bin/fpc-terminal.sh: Datei oder Verzeichnis nicht gefunden ./setup.sh: Zeile 238: /home/pi/Development/FreePascal/fpc/bin/fpc-terminal.sh: Datei oder Verzeichnis nicht gefunden ./setup.sh: Zeile 239: /home/pi/Development/FreePascal/fpc/bin/fpc-terminal.sh: Datei oder Verzeichnis nicht gefunden ./setup.sh: Zeile 240: /home/pi/Development/FreePascal/fpc/bin/fpc-terminal.sh: Datei oder Verzeichnis nicht gefunden chmod: Zugriff auf '/home/pi/Development/FreePascal/fpc/bin/fpc-terminal.sh' nicht möglich: Datei oder Verzeichnis nicht gefunden

Reply by email

Anthony Walter
to Joe

Why are you posting a screenshot image of the terminal output? Just paste the terminal output in here.

It looks like your download of the gzipped tar file isn't working. I am guessing you don't have Internet on your Pi? Well you need it to run the install script. Otherwise it is likely a problem with AWS S3 not having a replicated instance of the my files in your region.

Try the following command:

wget http://cache.getlazarus.org/archives/fpc.lazarus.raspberry.tar.gz

That should download the the binary bundle from Amazon's servers. Please verify that it downloads the file fpc.lazarus.raspberry.tar.gz. If the download works:

tar xvf fpc.lazarus.raspberry.tar.gz

And you it should extract both a fpc and lazarus folder. Let me know what this does for you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190211/c781f8f8/attachment.html>

Reply by email

Anthony Walter
to Joe

Joe,

I am pretty sure the problem is that the setup script you downloaded was the old version. I use cloud distribution on Amazon and it wakes a while to replicate files to your area. As a result you received an old copy referencing deleted files. Delete the setup script, download it again, and re-run.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190211/be096f94/attachment.html>

Reply by email

Joe
to Anthony Walter
Anthony Walter wrote
Delete the setup script, download it again, and re-run.

Anthony,

the two versions are the same, says winmerge.

In the mean time, I reinstalled Raspian again, but this time I did not activate Lazarus 1.6.2.
Instead I did 'tar xvf fpc.lazarus.raspberry.tar.gz' and now there are the two new directories fpc and lazarus.

What is the next step?

Rewgards --  Joe

Reply by email

Anthony Walter
to Joe

Joe, you should delete setup.sh, download it again:

Here is the location of the Rasberry Pi setup script:

https://www.getlazarus.org/download/?platform=raspberry

chmod + x setup.sh && ./setup.sh

After that follow the instructions in the terminal. When the script completes you will have a menu entry in Raspbian under Programming titled Lazarus 2.0. Use that shortcut to launch Lazarus. Alternately you can navigate to the install location and in the lazarus folder run lazarus.sh to start Lazarus 2.0 to with the properly configured environment.

You should see the Lazarus splash screen with version 2.0 emboldened at the bottom.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190211/03d914da/attachment.html>

Reply by email

Joe
to Anthony Walter
Anthony Walter wrote 18 lines
Joe, you should delete setup.sh, download it again: Here is the location of the Rasberry Pi setup script: https://www.getlazarus.org/download/?platform=raspberry chmod + x setup.sh && ./setup.sh After that follow the instructions in the terminal. When the script completes you will have a menu entry in Raspbian under Programming titled Lazarus 2.0. Use that shortcut to launch Lazarus. Alternately you can navigate to the install location and in the lazarus folder run lazarus.sh to start Lazarus 2.0 to with the properly configured environment. You should see the Lazarus splash screen with version 2.0 emboldened at the bottom.

Anthony,

on executing this setup.sh I just got the same error messages:. Among them:

tar: Das sieht nicht wie ein "tar"-Archiv aus
gzip: stdin: unexpected end of file
./setup.sh: Zeile 206: /home/pi/Development/FreePascal/fpc/bin/fpcmkcfg: Datei nicht gefunden
and much more.

Nevertherless  setup.sh finishes with message "Your Free Pascal 3.0 with Lazarus is now installed".

Translation: 'Das sieht nicht wie ein "tar"-Archiv aus' -> Doesn't look like a "tar" archive
                     'Datei nicht gefunden -> Filre not found

Now I am preparing another sd card with Raspian Stretch again, but do
not switch to German and try this setup.sh again.

Regards --  Joe

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

Reply by email

Joe
to Joe
Joe wrote 45 lines
Am 12.02.2019 um 00:51 schrieb Anthony Walter via lazarus: > Joe, you should delete setup.sh, download it again: > > Here is the location of the Rasberry Pi setup script: > > https://www.getlazarus.org/download/?platform=raspberry > > chmod + x setup.sh && ./setup.sh > > After that follow the instructions in the terminal. When the script > completes you will have a menu entry in Raspbian under Programming > titled Lazarus 2.0. Use that shortcut to launch Lazarus. Alternately > you can navigate to the install location and in the lazarus folder > run lazarus.sh to start Lazarus 2.0 to with the properly configured > environment. > > You should see the Lazarus splash screen with version 2.0 emboldened > at the bottom. > Anthony, on executing this setup.sh I just got the same error messages:. Among them: tar: Das sieht nicht wie ein "tar"-Archiv aus gzip: stdin: unexpected end of file ./setup.sh: Zeile 206: /home/pi/Development/FreePascal/fpc/bin/fpcmkcfg: Datei nicht gefunden and much more. Nevertherless  setup.sh finishes with message "Your Free Pascal 3.0 with Lazarus is now installed". Translation: 'Das sieht nicht wie ein "tar"-Archiv aus' -> Doesn't look like a "tar" archive                      'Datei nicht gefunden -> Filre not found Now I am preparing another sd card with Raspian Stretch again, but do not switch to German and try this setup.sh again. Regards --  Joe

Anthony,

in English-UK settings, I see the same behaviour of the script. Now it says 'this does not look like an tar arc hive'.

Regards --  Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190212/7a476849/attachment.html>

Reply by email

Joe
to Anthony Walter: Joe, you should delete setup.sh, download it again: Here is the location of the Rasberry…
Anthony Walter wrote 18 lines
Joe, you should delete setup.sh, download it again: Here is the location of the Rasberry Pi setup script: https://www.getlazarus.org/download/?platform=raspberry chmod + x setup.sh && ./setup.sh After that follow the instructions in the terminal. When the script completes you will have a menu entry in Raspbian under Programming titled Lazarus 2.0. Use that shortcut to launch Lazarus. Alternately you can navigate to the install location and in the lazarus folder run lazarus.sh to start Lazarus 2.0 to with the properly configured environment. You should see the Lazarus splash screen with version 2.0 emboldened at the bottom.

Anthony, eventually  i increased the swap file size from 100 to 1000 MB, and now your script succeeded.
Thanx --  Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190218/3a31e478/attachment.html>

Reply by email

Bo Berglund
to Joe
Joe wrote 23 lines
Am 12.02.2019 um 00:51 schrieb Anthony Walter via lazarus: > Joe, you should delete setup.sh, download it again: > > Here is the location of the Rasberry Pi setup script: > > https://www.getlazarus.org/download/?platform=raspberry > > chmod + x setup.sh && ./setup.sh > > After that follow the instructions in the terminal. When the script > completes you will have a menu entry in Raspbian under Programming > titled Lazarus 2.0. Use that shortcut to launch Lazarus. Alternately > you can navigate to the install location and in the lazarus folder run > lazarus.sh to start Lazarus 2.0 to with the properly configured > environment. > > You should see the Lazarus splash screen with version 2.0 emboldened > at the bottom. > Anthony, eventually  i increased the swap file size from 100 to 1000 MB, and now your script succeeded. Thanx --  Joe

I just added the following to the top of my own FPC/Lazarus install scipt:

# Check swap space since building Lazarus uses lots of resources and swap. Need 1 GB swap.
SWAPSPACE=$(free | grep Swap | grep -P -o "[0-9]+" | head -1) if [ "$SWAPSPACE" -lt 1000000 ]; then
echo "Swap space $SWAPSPACE too small! You must set 1 GB swap!" exit 1
fi
echo "Swap space $SWAPSPACE OK!"

Bo Berglund Developer in Sweden

Reply by email

Joe
to Bo Berglund
Bo Berglund wrote
I just added the following to the top of my own FPC/Lazarus install scipt: Check swap space

Excellent idea. Where can I get it this new version? Have to update to Lazarus 2 some some more Pi-3s.

Reply by email

Bo Berglund
to Joe: Excellent idea. Where can I get it this new version? Have to update to Lazarus 2 some…
Joe wrote 6 lines
Am 18.02.2019 um 08:44 schrieb Bo Berglund via lazarus: > I just added the following to the top of my own FPC/Lazarus install > scipt: Check swap space Excellent idea. Where can I get it this new version? Have to update to Lazarus 2 some some more Pi-3s.

Do you mean my own installation script or Anthony Walter's? Mine works strictly from sources via svn.
I think Anthony's include compiled binaries and his files are hosted elsewhere than at https://svn.freepascal.org/svn/ . I use that server for both fpc and lazarus (but I do have a compiled binary as seed compiler for ARM hosted on my own site but all else comes from svn.

Bo Berglund Developer in Sweden

Reply by email

Joe
to Bo Berglund
Bo Berglund wrote
Do you mean my own installation script or Anthony Walter's?

Bo, in the mean time Anthony's script and fpupdeluxe work well. For comparison purposes, I would be glad I could test your script as well.

--  Joe

Reply by email

Anthony Walter
to Joe

My script uses prebuilt binaries for the Raspberry Pi to save network bandwidth time, compile speed, sd card space, and swap space. It downloads gzipped files, extracts the, sets up configuration files, and created desktop files to launch either an FPC terminal or Lazarus 2.0 both referencing the correct folders and variables. The process to build the compiler yourself results in approximately the same thing, but hopefully my methodology reduces possible problems during installation.

The snippet Bo supplied could work with any setup script, and 512MB or more of swap is needed to build Lazarus 2.0 on Raspberry. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190218/7a0b5317/attachment.html>

Reply by email

Bo Berglund
to Joe: Bo, in the mean time Anthony's script and fpupdeluxe work well. For comparison purposes,…
Joe wrote 6 lines
Am 18.02.2019 um 18:58 schrieb Bo Berglund via lazarus: > Do you mean my own installation script or Anthony Walter's? Bo, in the mean time Anthony's script and fpupdeluxe work well. For comparison purposes, I would be glad I could test your script as well.

http://blog.boberglund.com/install_lazfpc_local_pi_blog.sh

Bo Berglund Developer in Sweden

Reply by email

Bo Berglund
to Bo Berglund
Bo Berglund wrote 8 lines
On Tue, 19 Feb 2019 09:14:23 -0500, Anthony Walter via lazarus wrote: >Bo, > >You should probably put a shebang at the top of your script. Sorry, I don't understand. What is a "shebang"?

OK, googled it and I guess this is what you mean:
#!/bin/bash

Added it and updated the web version.

Bo Berglund Developer in Sweden

Reply by email

Anthony Walter
to Bo Berglund

Bo,

A shebang is important because it tells Unix like systems which interpreter to when a script is run. You might have written a script an executed it using "sh" rather than "bash". For example you might have been running your script as follows:

sh myscript.sh

The problem you create when doing this is that sh and bash are not the same. They have dialects with different rules, and if you use sh to run your script when other people get your script they have no way of knowing which interpreter you are using and the script may fail for them.

The solution is to include a shebang, or #!/path/to/interpreter, as the first line of you script. This allows people to run your script by changing it to an executable and running it directly rather than specifying the interpreter.

So if your script was writer to be used with sh, you would make the first line:

#!/bin/sh

And then people would run your script using the following code to mark it executable:

chmod +x myscript.sh
./myscript.sh

Then whenever you script is executed it will be run through sh, which would be what you designed the script to use. And by the way, I used sh as an example in this message. I have no idea what interpreter you used when writing your script. You know which one it was, so put that interpreter in the first line.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190219/3a379574/attachment.html>

Reply by email

Bo Berglund
to Anthony Walter
Anthony Walter wrote
The solution is to include a shebang, or #!/path/to/interpreter, as the first line of you script. This allows people to run your script by changing it to an executable and running it directly rather than specifying the interpreter.

That is what I do all the time with the scripts I create. After finishing editing the script file:
chmod +x scriptname.sh

So if your script was writer to be used with sh, you would make the first line: #!/bin/sh

actually I used bash (I believe) so I have now added thus as the first line:
#!/bin/bash

Show quoted text 6 lines
Then whenever you script is executed it will be run through sh, which would be what you designed the script to use. And by the way, I used sh as an example in this message. I have no idea what interpreter you used when writing your script. You know which one it was, so put that interpreter in the first line.

Yes, it was actually bash so:
#!/bin/bash

I am not fluent in linux scripting so usually I start with someone elses script as an example and work from there...

Bo Berglund Developer in Sweden

Reply by email

Joe
to Bo Berglund

Bo,
on a Pi 3B+, I created a new system with Raspbian Stretch Nov 2018 Edition, set 'locale' to German, connected it to the WLAN, increased the swap file size to 1000 and started your script 'sh.com' (yes, the one with SheBang)

It failed with this messages:

" A  2.0.0/test/manual/png/testsuite_check/basn0g08.png.gif  svn: E120108: Fehler beim Ausführen des: Kontextes: The server unexpectedly closed the connection.
 setup.sh: 156: Cannot download Lazarus sources for 2.0.0! Aborting".

This is just to let you know. I currently don't need it, since fpcupdeluxe and Anthony Walter's script both did this job for us.

Regards --  Joe

Reply by email

Bo Berglund
to Joe
Joe wrote 6 lines
Bo, I see in line 156 of your script this: svn co "https:// svn.freepascal.org/ ... But in line 152, I see svn co https://svn.freepascal.org/ .. .

Yes I see the differences between lines 152 and 156 being a double quote around the command to run.
This has not been an issue before (even though it is inconsistent).

Maybe on Raspbian sh is used rather than bash by default and in sh this does not matter?

The two lines are (for those who do not download the script): 152:
svn co https://svn.freepascal.org/svn/fpc/tags/$FPCTAG/ $FPCVER

156:
svn co "https://svn.freepascal.org/svn/lazarus/tags/$LAZTAG/" "$LAZVER"

I will make a test by changing the shebang to use sh instead.

Is there any way inside a script to determine what interpreter is running?

Bo Berglund Developer in Sweden

Reply by email

Bo Berglund
to Joe: on a Pi 3B+, I created a new system with Raspbian Stretch Nov 2018 Edition, set 'locale'…
Joe wrote 13 lines
Bo, on a Pi 3B+, I created a new system with Raspbian Stretch Nov 2018 Edition, set 'locale' to German, connected it to the WLAN, increased the swap file size to 1000 and started your script 'sh.com' (yes, the one with SheBang) It failed with this messages: " A  2.0.0/test/manual/png/testsuite_check/basn0g08.png.gif  svn: E120108: Fehler beim Ausführen des: Kontextes: The server unexpectedly closed the connection.  setup.sh: 156: Cannot download Lazarus sources for 2.0.0! Aborting".

While examining your error message above I see that the checkout has reached into the Lazarus svn command and stopped at the test stuff, so this really means that it has started working on the svn co command and downloaded FPC plus a lot of Lazarus files, but failed due to networking errors.

I have copied out the lines in my script that use svn to get the sources and modified the LAZTAG, FPCTAG, FPCVER and LAZVER variables so it all reads as follows:

#!/bin/bash
LAZDIR=/home/pi/dev/lazarus
FPCDIR=/home/pi/dev/fpc
FPCTAG=release_3_0_4/tests
FPCVER=3.0.4_tst
LAZTAG=lazarus_2_0_0/test
LAZVER=2.0.0_tst

function error_exit
{
# ---------------------------------------------------------------- # Function for exit due to fatal program error
# Accepts 1 argument:
# string containing descriptive error message
#---------------------------------------------------------------- echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2
exit 1
}

echo "Downloading version $FPCVER of FPC"
cd "$FPCDIR" || error_exit "$LINENO: Cannot access directory $FPCDIR! Aborting"
svn co "https://svn.freepascal.org/svn/fpc/tags/$FPCTAG" "$FPCVER" || error_exit "$LINENO: Cannot download fpc sources! Aborting"

echo "Downloading version $LAZVER of Lazarus"
cd "$LAZDIR" || error_exit "$LINENO: Cannot access dir $LAZDIR! Aborting"
svn co "https://svn.freepascal.org/svn/lazarus/tags/$LAZTAG/test" "$LAZVER" || error_exit "$LINENO: Cannot download Lazarus sources for $LAZVER! Aborting"

Then I ran this new script on the RPi3-Stretch machine I had earlier installed on. There were no errors shown and the reported file in your error was successfully checked out.

What kind of network connection do you have? I am on 250/100 Mbit/s fiber myself.

Bo Berglund Developer in Sweden

Reply by email

Bo Berglund
to Bo Berglund: On Wed, 20 Feb 2019 00:01:08 +0100, Joe via lazarus Yes I see the differences between…
Bo Berglund wrote
I will make a test by changing the shebang to use sh instead.

I did not change the shebang, but cut down the script to the two svn commands and the variable definitions and ran it successfully without any problems...
Must have been a network glitch for you.

The quotes do not make a difference at all (and should not).

Bo Berglund Developer in Sweden

Reply by email

Joe
to Bo Berglund: On Tue, 19 Feb 2019 23:43:21 +0100, Joe via lazarus While examining your error message…
Bo Berglund wrote
What kind of network connection do you have? I am on 250/100 Mbit/s fiber myself.

We have a VDSL connection with 265/42 Mbit/s.

I tried (at 11:30 hours local time) to download the newest version of your script from

http://blog.boberglund.com/install_lazfpc_local_pi_blog.sh,

but still got this:

#!/bin/bash
# This script is used to install FreePascal 3.0.0 and Lazarus 1.6 on a Raspberry Pi2/3 running Raspbian Jessie # Original script by Jim Kueneman (http://www.mustangpeak.net/install_laz.sh) # Modified 2016-01-07 by Bo Berglund as follows:
...
#Fpc and Lazarus tags and versions
FPCTAG=release_3_0_4
FPCVER=3.0.4
LAZTAG=lazarus_2_0_0
LAZVER=2.0.0
...

-- Joe

Reply by email

Bo Berglund
to Joe
Joe wrote
but still got this:

The only change should be that I removed the double quotes around the svn arguments in the command that had it.
I tested that in a cut down version of the script just having the parameter definitions and svn commands.

Bo Berglund Developer in Sweden

Reply by email

Unknown author
to Joe: We have a VDSL connection with 265/42 Mbit/s. I tried (at 11:30 hours local time) to…
Joe wrote 12 lines
Am 21.02.2019 um 00:09 schrieb Bo Berglund via lazarus: > What kind of network connection do you have? I am on 250/100 Mbit/s > fiber myself. We have a VDSL connection with 265/42 Mbit/s. I tried (at 11:30 hours local time) to download the newest version of your script from http://blog.boberglund.com/install_lazfpc_local_pi_blog.sh, but still got this:

if you are still getting the same file even after it has been changed, that means that something between you and the source server is caching it and hasn't updated the cache since the version you keep getting was originally pulled and cached...

FWIW: attached is the version that i just pulled and this is the first time i've pulled it...

NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list unless* *a signed and pre-paid contract is in effect with us.* -------------- next part -------------- A non-text attachment was scrubbed... Name: install_lazfpc_local_pi_blog.sh Type: application/x-shellscript Size: 10377 bytes Desc: not available URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190221/888d6ed6/attachment-0001.bin>

Reply by email

Bo Berglund
to Unknown author
wkitty42--- wrote 20 lines
On 2/21/19 5:38 AM, Joe via lazarus wrote: > Am 21.02.2019 um 00:09 schrieb Bo Berglund via lazarus: >> What kind of network connection do you have? I am on 250/100 Mbit/s >> fiber myself. > > We have a VDSL connection with 265/42 Mbit/s. > > I tried (at 11:30 hours local time) to download the newest version of your > script from > > http://blog.boberglund.com/install_lazfpc_local_pi_blog.sh, > > but still got this: if you are still getting the same file even after it has been changed, that means that something between you and the source server is caching it and hasn't updated the cache since the version you keep getting was originally pulled and cached...

I did not upload the modified script where I had removed the double quotes from the svn command to retrieve lazarus sources since I proved that the command would work anyway and the person reporting the problem he had showed a network access erroer well into the svn download.
However, I have now uploaded the script where the quotes are cleaned out also for the svn lazarus command. Also changed the modification notes

Bo Berglund Developer in Sweden

Reply by email

Unknown author
to Bo Berglund
Bo Berglund wrote 7 lines
On Thu, 21 Feb 2019 09:14:40 -0500, wkitty42--- via lazarus > if you are still getting the same file even after it has been changed, > that means that something between you and the source server is caching it > and hasn't updated the cache since the version you keep getting was > originally pulled and cached... > I did not upload the modified script where I had removed the double quotes from the svn command

ahh! that would explain it :)

NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list unless* *a signed and pre-paid contract is in effect with us.*

Reply by email

Joe
to Unknown author

Hi,

now Bo's script (current version as of this afternoon) created Lazarus 2.0, SVN Revision 60471.

But unfortunately, this Lazarus didn't compile my test programs. Error message:
"Project1.lpr(23,0): Error: resource compiler "fpcres" not found, switching to external mode"

Steps to reproduce:
Create a new Raspian Stretch (Nov 2018) system, switch locale to German, create Lazarus 2.0.0 with Bo's script.
with this Lazarus create a new project. Put a ToggleBox ToggleBox1 on Form1; Create an On Change
event handler for ToggleBox1, content "ShowMessage ('Hello')". Try to compile.

'sum'-Checksum of the script: 12667
Hardware: Pi 3B+
Result of 'sudo find / -name fpcres':
/home/pi/dev/fpc/3.0.4/utils/fpcres
/home/pi/bin/fpcres
/home/pi/share/src/fpc-3.0.4/fpc/utils/fpcres

--  Joe

Reply by email

Bo Berglund
to Joe
Joe wrote 19 lines
But unfortunately, this Lazarus didn't compile my test programs. Error message: "Project1.lpr(23,0): Error: resource compiler "fpcres" not found, switching to external mode" Steps to reproduce: Create a new Raspian Stretch (Nov 2018) system, switch locale to German, create Lazarus 2.0.0 with Bo's script. with this Lazarus create a new project. Put a ToggleBox ToggleBox1 on Form1; Create an On Change event handler for ToggleBox1, content "ShowMessage ('Hello')". Try to compile. 'sum'-Checksum of the script: 12667 Hardware: Pi 3B+ Result of 'sudo find / -name fpcres': /home/pi/dev/fpc/3.0.4/utils/fpcres /home/pi/bin/fpcres /home/pi/share/src/fpc-3.0.4/fpc/utils/fpcres

As I have written in the script it deposits the fpc and lazarus entirely within the users home dir, thus not polluting the system. So /home/pi/bin is on path and where the binaries built by make all and deposited by make install results in using this dir.

On my test machine:
$ which fpcres
/home/pi/bin/fpcres

I.e. exactly like you have.

So I proceeded to do what you described to replicate. Compile messages:

Compile Project, Target: /home/pi/tmp/project1: Success, Warnings: 2 project1.lpr(23,0) Warning: "crtbegin.o" not found, this will probably cause a linking failure
project1.lpr(23,0) Warning: "crtend.o" not found, this will probably cause a linking failure
(I have seen this crtbegin-crtend warning before, but have forgotten how to fix it, it is caused by something inside fpc.conf, I believe.)

And finally if I hit the green arrow to run the project it compiles again and then runs and shows the form with the togglebox. When clicked the message is show normally.

The only difference from your steps is that I have not changed locale of my Pi....
And Raspbian is what I already have:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.6 (stretch)
Release: 9.6
Codename: stretch

I don't know any command to use to get any more info regarding Raspbian...

Bo Berglund Developer in Sweden

Reply by email

Bo Berglund
to Bo Berglund
Bo Berglund wrote 7 lines
project1.lpr(23,0) Warning: "crtbegin.o" not found, this will probably cause a linking failure project1.lpr(23,0) Warning: "crtend.o" not found, this will probably cause a linking failure (I have seen this crtbegin-crtend warning before, but have forgotten how to fix it, it is caused by something inside fpc.conf, I believe.)

I found a solution to this:
nano ~/.fpc.cnf

A few pages down there is a section like this:

# searchpath for libraries
#-Fl/home/pi/lib/fpc/$fpcversion/lib
#-Fl/lib;/usr/lib
-Fl/home/pi/lib/fpc/$fpcversion/lib/$FPCTARGET

Here I added this after the above line:
#Added to get rid of crtbegin.o and crtend.o warnings when compiling in Lazarus
-Fl/usr/lib/gcc/arm-linux-gnueabihf/6/

The path was found by doing a search:

$ sudo find / -name crtend.o
find: ‘/proc/761/task/761/net’: Invalid argument find: ‘/proc/761/net’: Invalid argument
/usr/lib/gcc/arm-linux-gnueabihf/6/crtend.o

After this was added I compiled the project again and now these warnings were gone.

Bo Berglund Developer in Sweden

Reply by email

Joe
to Bo Berglund

Hi, Bo,

I switched the test system from locale German to locale English-UK and rebooted. Then I started  Lazarus 2.0 and run my ToggleBox test again. This time it run flawslesly!  How can a locale setting influence the inner workings of Lararus 2.0 in such a manner? Any ideas in the community?

Could you perhaps switch temporarely to German locale and try to run the ToggleBox test again?

Your solution for the crtbegin/crtend-phenomenon is very interesting. I'll try it tomorrow.

--  Joe

Reply by email

Joe
to Joe
Joe wrote 17 lines
Hi, Bo, I switched the test system from locale German to locale English-UK and rebooted. Then I started  Lazarus 2.0 and run my ToggleBox test again. This time it run flawslesly!  How can a locale setting influence the inner workings of Lararus 2.0 in such a manner? Any ideas in the community? Could you perhaps switch temporarely to German locale and try to run the ToggleBox test again? Your solution for the crtbegin/crtend-phenomenon is very interesting. I'll try it tomorrow. --  Joe

Hi, all,

another finding: After this test with locale English-UK  I switched the system back to locale German and to character set UTF-8. This time, the Toggle Box test program was compiled and run - despite the German environment. Looks like the charcter set could be the culprit as well.

-- Joe

Reply by email

Bo Berglund
to Joe
Joe wrote 5 lines
Am 21.02.2019 um 21:09 schrieb Bo Berglund via lazarus: > After this was added I compiled the project again and now these > warnings were gone. Confirmed.

Good! :-)

Bo Berglund Developer in Sweden

Reply by email