Recent

Author Topic: error while building Lazarus  (Read 3261 times)

WooBean

  • Sr. Member
  • ****
  • Posts: 270
Re: error while building Lazarus
« Reply #15 on: June 30, 2024, 12:51:23 pm »
As an (old) boy who quite recently started his journey in an attempt to see how Lazarus works I would suggest:
  • be patient, the task (after) is really easy;
  • the most annoying problem at starting is that what was written to explain how to do something everyone interprets in his/her own way;
  • guru level assistance (guru - forgive me, please) is directing often to their world of acting (trunk development, Gitlab and git ussage), "trivial" things are too trival to be explained;
  • every installation of Lazarus with its source can be used to debugging itself;
  • as a first task to be passed configure chosen instalation of Lazarus to debugging itself.
Configure "Build Lazarus" (under menu option Tools), rebuild IDE, select project Lazarus.lpi (somewhere in your instalation directory \lazarus\ide), RUN the project with green arrow.
When a default project appears chose AGAIN the same project in this instance. You will have 4 windows, it is OK. Breakpoints set in parent Lazarus instance will control the last invoked.

I am not sure if it helped, anyway tried.     

« Last Edit: June 30, 2024, 01:04:10 pm by WooBean »
Platforms: Win7/64, Linux Mint Ulyssa/64

440bx

  • Hero Member
  • *****
  • Posts: 4487
Re: error while building Lazarus
« Reply #16 on: June 30, 2024, 01:17:08 pm »
@440bx, I'm not entirely sure what you mean - normal application breakpoints? Or about debugging the IDE itself?

What debugger do you have in the settings "Main menu > Tools > Options > Debugger > Debugger backend"? gdb or fpdebug?
I use FpDebug. 

Normal application breakpoints are those set using F5 (or clicking in the right place in the window gutter.) Other breakpoints can be had using DebugBreak(), I use those extensively (more than regular breakpoints.)




@WooBean,

Every little bit helps, thank you.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4517
  • I like bugs.
Re: error while building Lazarus
« Reply #17 on: June 30, 2024, 11:34:58 pm »
I choose that version because it is stable.  If I mess it up, I can "refresh" it to a working installation using fpcupdeluxe.
Trunk is also amazingly stable most of the time. You need a release version if you maintain an important application. For studying the code you should use the trunk version (3.99). You don't need fpcupdeluxe to get Lazarus, just get the sources with "git clone" and later "git pull".
fpcupdeluxe is good for getting FPC versions and cross-compilers.
If you mess up your Lazarus trunk sources, just run "git reset --hard" and you are good.

Quote
First thing's first.  I want to see and learn how Lazarus works.
... but you want an extra complication by using Lazarus 3.99 IDE to debug Lazarus 3.4 IDE. Makes no sense.
Just use Lazarus 3.99.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

440bx

  • Hero Member
  • *****
  • Posts: 4487
Re: error while building Lazarus
« Reply #18 on: July 01, 2024, 01:45:30 am »
... but you want an extra complication by using Lazarus 3.99 IDE to debug Lazarus 3.4 IDE. Makes no sense.
Just use Lazarus 3.99.
I don't understand... how is that an extra complication ?  As long as the version used as a debugger is stable, it seems to me that there is no added complication.  If there is one I am missing, please enlighten me.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4517
  • I like bugs.
Re: error while building Lazarus
« Reply #19 on: July 01, 2024, 08:04:25 am »
I don't understand... how is that an extra complication ?  As long as the version used as a debugger is stable, it seems to me that there is no added complication.  If there is one I am missing, please enlighten me.
Maybe there is no extra complication. I haven't tried debugging with different IDE versions myself.
Earlier I understood some of the difficulties you faced were caused by debugging with different versions.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

440bx

  • Hero Member
  • *****
  • Posts: 4487
Re: error while building Lazarus
« Reply #20 on: July 01, 2024, 08:24:00 am »
Earlier I understood some of the difficulties you faced were caused by debugging with different versions.
The difficulties I faced were caused by, let's say, "imprecise" instructions.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

bytebites

  • Hero Member
  • *****
  • Posts: 670
Re: error while building Lazarus
« Reply #21 on: July 01, 2024, 11:13:24 am »
If you can't beat them, join them.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4517
  • I like bugs.
Re: error while building Lazarus
« Reply #22 on: July 06, 2024, 11:04:12 am »
I tried many times but got :
 Internal error: Status::getWikiText called for a good result, this is incorrect
Wiki seems to be fixed. I was able to change the text.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

BrunoK

  • Hero Member
  • *****
  • Posts: 566
  • Retired programmer
Re: error while building Lazarus
« Reply #23 on: July 06, 2024, 03:25:42 pm »
WINDOWS

Personally, I load lazarus project and save it, same directory, as lazarus_dbg.

The Primary Config directory for the Debugger lazarus instance is Config and the lazarus_dbg is started with run parameters pointing to a $(ConfigDir)..\Config_dbg directory. This way the lazarus_dbg has its own last project / search history etc... That makes life easier.

Reason is that, at least in my installation, for cause I never found out, some Units and Packages must be added to the debug Project.

Also the project options may require -dAddStaticPkgs and a staticpackages.inc file needed to customize the debug environment.

The lazarus instance used as the Debugger instance is compiled with optimizations, but of course the lazarus_dbg instance has all that is required to be debugged.




BrunoK

  • Hero Member
  • *****
  • Posts: 566
  • Retired programmer
Re: error while building Lazarus
« Reply #24 on: July 06, 2024, 03:27:49 pm »
Cloning a Working Config directory (Please be very careful !)
==================================
Find the config dir of a satisfying working installation via Menu / View /IDE Internals / About IDE, look for the primary config directory. Too old versions cannot be processed this way because the Configuration specs have been evolving.
Copy the contents of that folder to the new target config dir.
From that dir open environmentoptions.xml
Since the installation you want to work with is in a new location, you have to replace paths from the old installation to the new installation.

With Find in files (Shit+Ctrl+F) search and replace, in all files (*.*) of the new Config Directory, incorrect paths pointing to other Lazarus installs with the new location.

Note, as indicated in the https://wiki.freepascal.org/Extending_the_IDE#Debugging_the_IDE page use as much as possible available macros, it helps a lot when jumping between versions.

440bx

  • Hero Member
  • *****
  • Posts: 4487
Re: error while building Lazarus
« Reply #25 on: July 06, 2024, 03:46:50 pm »
Thank you Bruno, I'll keep your comments in mind.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

BrunoK

  • Hero Member
  • *****
  • Posts: 566
  • Retired programmer
Re: error while building Lazarus
« Reply #26 on: July 06, 2024, 04:05:32 pm »
Also the project options may require -dAddStaticPkgs and a staticpackages.inc file needed to customize the debug environment.
Edit :
Also the project options may require -dAddStaticPkgs and a staticpackages.inc file needed to customize the debugged environment.

 

TinyPortal © 2005-2018