[Lazarus] Screwed up Lazarus installation - how to make clean and start over?

2023-02-21 Thread Bo Berglund via lazarus
I was trying to nail down the reason for the fppkg errors on start of Lazarus
2.2.4.
I had the install running fine except for the Config screen showing up on every
start of Lazarus with an error message about fppkg...

So I proceeded to install my usual set of packages from OLPM, but when I had
selected the set I usually install and it was done and asked about rebuilding
Lazarus it did so and at the end closed itself and did not re-appear!
Now I cannot start Lazarus at all

I tried to move the pcp dir away but it did not work either and starting with an
empty pcp dir does also not work.

So I tried to start over by going to the Lazarus dir and issue make clean, but
that did also not work:

~/dev/lazarus/2.2.4 $ make clean
Makefile:234: *** The Makefile doesn't support target can't-executed,, please
run fpcmake first.  Stop.

What would be the correct procedure now to start over?


-- 
Bo Berglund
Developer in Sweden

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Fppkg reports RTL not installed - Lazarus 2.2.4/fpc 3.2.2 from sources on Ubuntu

2023-02-21 Thread Luca Olivetti via lazarus

El 21/2/23 a les 13:48, Bo Berglund via lazarus ha escrit:

Any ideas what has gone wrong?


no idea really, I'm not familiar with fppkg.
I can only say that in lazarus my "fppkg configuration file" setting is 
empty, if I invoke "fppkg list" from the command line it works both 
under windows and linux, though under linux it shows that the installed 
rtl is 3.2.0 (even if I'm using fpc 3.2.2).


Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Fppkg reports RTL not installed - Lazarus 2.2.4/fpc 3.2.2 from sources on Ubuntu

2023-02-21 Thread Bo Berglund via lazarus
On Tue, 21 Feb 2023 11:46:57 +0100, Luca Olivetti via lazarus
 wrote:

>El 21/2/23 a les 11:12, Bo Berglund via lazarus ha escrit:
>
>> So it is definitely about the Lazarus version 2.2.4!
>
>
>I know that this won't help you, but just for the record I have Lazarus 
>2.2.4 both under windows and linux and no popup on either.
>Both self compiled with fpc 3.2.2 (32 bits fpc from installer under 
>windows, 64 bits fpc self compiled under linux).
>

Now I have installed Lazarus 2.2.4 with fpc 3.2.2 on an RPi4B where I already
had Lazarus 2.0.8 and fpc 3.0.4.

The result is *exactly the same* as what I have described above:

when I first start Lazarus 3.2.2 the customize dialog pops up where I have to
configure various parts of the system:
Lazarus:  /home/pi/dev/lazarus/2.2.4/
Fpc: /home/pi/lib/fpc/3.2.2/ppcarm
Fpc sources: /home/pi/dev/fpc/3.2.2
Make: /usr/bin/make
Debugger: /usr/bin/gdb
Fppkg: /home/pi/.config/fppkg.cfg (from the dropdown selector)

The bottom pane shows this message:
File: /home/pi/.config/fppkg.cfg
Error: there is a problem with the Fppkg configuration. (Fppkg reports that the
RTL is not installed.)
You could try to restore the configuration files automatically, or adapt the
configuration file manually.

At this point I can start the IDE and it looks pretty much normal.

Close Lazarus and open it again and I am back at the Config dialog with a stated
error about the Fppkg item.

My procedure for installing is this:

1. Build freepascal:

Install various dependencies first:
sudo apt install -y libx11-dev libgdk-pixbuf2.0-dev libcairo2-dev
gir1.2-coglpango-1.0 libpangox-1.0-dev xorg-dev libgtk2.0-dev libpango1.0-dev

sudo apt install -y freetds-dev gdb

copy ppcarm version 3.2.0 from another RPi to $HOME/dev/fpc

Then:

cd $HOME/dev/fpc
wget
https://gitlab.com/freepascal.org/fpc/source/-/archive/release_3_2_2/source-release_3_2_2.tar.gz
tar -xvf source-release_3_2_2.tar.gz
mv source-release_3_2_2 3.2.2

cd 3.2.2

make clean FPC="$HOME/dev/fpc/ppcarm"
make all FPC="$HOME/dev/fpc/ppcarm"
make install PREFIX="$HOME" FPC="$HOME/dev/fpc/3.2.2/compiler/ppcarm"
rm "$HOME/bin/ppcarm"
ln -sf "$HOME/lib/fpc/3.2.2/ppcarm" "$HOME/bin/ppcarm"
make sourceinstall PREFIX="$HOME" FPC="$HOME/bin/ppcarm"
$HOME/lib/fpc/3.2.2/samplecfg $HOME/lib/fpc/3.2.2 $HOME
mv "$HOME/fpc.cfg" "$HOME/.fpc.cfg"

2. Build Lazarus

cd $HOME/dev/lazarus
wget
https://gitlab.com/freepascal.org/lazarus/lazarus/-/archive/lazarus_2_2_4/lazarus-lazarus_2_2_4.tar.gz
tar xvf lazarus-lazarus_2_2_4.tar.gz
mv lazarus-lazarus_2_2_4 2.2.4

cd 2.2.4

make clean
time make bigide
strip -s lazarus
mkdir -p $HOME/.lazarus_2.2.4

3. Create desktop file to launch Lazarus:
-
nano $HOME/.local/share/applications/lazarus_2.2.4.desktop

Add this to the file:

[Desktop Entry]
Comment=Lazarus IDE 2.2.4
Terminal=false
Name=Lazarus 2.2.4
Exec=/home/pi/dev/lazarus/2.2.4/startlazarus --pcp=/home/pi/.lazarus_2.2.4 %f
Type=Application
Icon=/home/pi/dev/lazarus/2.2.4/images/ide_icon48x48.png
Categories=Application;IDE;Development;GTK;GUIDesigner;Programming;
NoDisplay=false
Keywords=editor;Pascal;IDE;FreePascal;fpc;Design;Designer;


At this point the start menu "Programming" submenu contains the "Lazarus 2.2.4"
item and Lazarus can be launched.


Any ideas what has gone wrong?
And please note that unlike on Linux (source install as above) I have installed
Lazarus 2.2.4 on Windows using the official installer from SourceForge and the
exact same thing happens...


-- 
Bo Berglund
Developer in Sweden

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Conditional Debugger breakpoints not working ?

2023-02-21 Thread Martin Frb via lazarus

On 20/02/2023 15:14, Michael Van Canneyt via lazarus wrote:


On Mon, 20 Feb 2023, Martin Frb via lazarus wrote:



It is a problem on Mac, with LLDB. Though I am not even sure that 
conditional breakpoint are supported at all...
Just checked, conditions are set. But users must type them C-style. That 
is "a == 1".




They are:
https://stackoverflow.com/questions/37204551/lldb-setting-conditional-breakpoint-with-string-equality-as-condition 



That looks like it actually invokes strcmp() in the debugged exe. Which 
then depends on an fpc generated app having that function, and having 
sufficient debug info to have it found.


The GDB $_streq on the other hand is an gdb intrinsic.
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Fppkg reports RTL not installed - Lazarus 2.2.4/fpc 3.2.2 from sources on Ubuntu

2023-02-21 Thread Luca Olivetti via lazarus

El 21/2/23 a les 11:12, Bo Berglund via lazarus ha escrit:


So it is definitely about the Lazarus version 2.2.4!



I know that this won't help you, but just for the record I have Lazarus 
2.2.4 both under windows and linux and no popup on either.
Both self compiled with fpc 3.2.2 (32 bits fpc from installer under 
windows, 64 bits fpc self compiled under linux).



Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Fppkg reports RTL not installed - Lazarus 2.2.4/fpc 3.2.2 from sources on Ubuntu

2023-02-21 Thread Bo Berglund via lazarus
On Thu, 9 Feb 2023 22:37:20 +0100, Martin Frb via lazarus
 wrote:

>On 09/02/2023 21:57, Bo Berglund via lazarus wrote:
>> And it seems to be looking for $HOME/.config/fppkg.cfg even though I 
>> am using
>> separate install dirs for Lazarus 2.0.12 and 2.2.4 and the launch file
>> lazarus_2.2.4.desktop contains --pcp=/home/bosse/.lazarus_2.2.4
>>
>> So I would expect the location of the fppkg.cnf file to be inside that pcp 
>> dir,
>> but it is not.
>
>According to what I gathered info wise, fppkg only supports one config 
>dir. (it has some options, but not sure the IDE uses those)
>So it does not work well for Lazarus multi install.

This is just terrible!
>From now on one has to view the error dialog every time one starts Lazarus?
And nothing can be done about it?

As I said I have used many Linux and Windows systems all with multiple installs
of different versions of Lazarus and FPC and it has all worked well regarding
launching the IDE. Never anything like this happened before.

And the problem is not even on a single new install but on every install I do
both using the Wiondows installer and building from sources.



>The IDE will work fine without it.
>It' only needed if you need some of the few packages that are only avail 
>via fppkg (though you can download them by hand anyway)

I have never been aware of this before and it has just worked.
I am not doing any fancy installs just first the basic installation and then use
OLPM to install all of the extra packages I need (same list every time).
Finally putting my own developed packages and utilities on each system as well.
I have never even been aware of the fppkg program or its use.

And with a new release I usually just make a parallel installation using pcp
functionality.

>>> Try to delete the old config by hand.
>>> Then -outside the IDE - use the latest (3.2.2) fppkg to create a new
>>> config. (may or may not need the fpc install in PATH)
>> Exactly what do you suggest here?
>> - Which old config? File name and location please.
>The one in your home folder (I don't have Linux path)...
>On Windows it's in %APPDATA%\Local\FreePascal\fppkg
>
>There are files like fppkg.cfg mirrors.xml packages.xml and some folders.
>

No other file found there than fppkg.cfg and if I reneme it and start fppkg.exe
manually it recreates the exact same content in a new fppkg.cfg file.

Still no effect on the actions on startup, error dislog pops up.

>> - How do I use the new fpc to recreate it? I don't even know what it is
>there is an fppkg utility in the fpc folder. (fppkg is part of fpc)

On Linux it is found here:
/home/bosse/bin/fppkg

Notice that this is a global location for my user.

And on my Windows install here:
C:\Programs\Lazarus_2.2.4\fpc\3.2.2\bin\x86_64-win64\fppkg.exe

This is a Lazarus unique location for ver 2.2.4 and on Windows it is not on
path...

Still both installations behave the same.

>
>If you just run it
>fppkg
>it should create a config file (if none exists).

Yes it creates a new cnf file identical to the old renamed file.
But still my new Lazarus won't start cleanly, whereas 2.0.12 starts just fine on
Winddows as well as on Linux.

No popup error message anywhere to be seen...


>It is not about the lazarus version, but different fpc versions.
>In my case (but maybe I was lucky) the older fpc didn't complain
>

I have used Lazarus since a long time, on my Windows 10 PC I have versions:
2.0.6, 2.0.8, 2.0.10, 2.0.12 and 2.2.4

All of these have their own fpc compiler installed with them in their own
directory trees and it has worked just fine up until this newest version 2.2.4
broke it.
And it does the same on both Linux and Windows!!!

So it is definitely about the Lazarus version 2.2.4!


I might try and put it on a Raspberry Pi4 just to check this...

One that I have access to has 7 different Lazarus versions with the latest being
2.0.12 and FPC versions are 3.0.4 and 3.2.0 and it uses the pcp dir
functionality to allow the multiple installs of different Lazarus versions.

I will do this when I get the time later...


-- 
Bo Berglund
Developer in Sweden

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus