Forum > General

Compiling Lazarus

<< < (2/2)

BrunoK:
And I use FPDebug

Martin_fr:
I haven't tried... So I don't know. But maybe the following is one of the puzzle pieces...

If you create your own project, and you add a package, then you make sure that your code contains a "uses some_unit_from_that_package". Or, well, if you don't, then nothing will happen. Adding a package means that the ppu for that package will be build, and that the search path for ppu will include the directory with those ppu. The rest only happens if there is a "uses" clause.

But then if you add e.g. AnchorDocking to the IDE, well you want something to happen. But, as explained, by just adding it to the lazarus.lpi => nothing does happen.
That magic happens in staticpackages.inc, which is $I included in the uses clause of lazarus.pp (or main.pp?). So to build lazarus you need an up to date staticpackges.inc.

And that resides in your pcp (primary config path). Because, depending on install the install dir may not be user-writeable and/or shared between different users with different config.
So to build, the current users pcp must be passed in the right place to get the correct staticpackages.inc.

I guess the lpi does by default not contain such info.

I don't know what other magic bits may be needed, and why (e.g. multi user setup of a single project).
I haven't read that other thread to find what issues it listed.

For the above, if you did not need a lazarus setup shared by multiple users, you could add the include path for staticpackages into your lpi (or move the file into the project dir, and keep it updated there).
And then you could find out what the next problem may be.

Obviously to try that, you have to undo the "no compiler" setting in the lazarus.lpi.

MarkMLl:

--- Quote from: Martin_fr on September 03, 2024, 10:39:41 am ---And that resides in your pcp (primary config path). Because, depending on install the install dir may not be user-writeable and/or shared between different users with different config.
So to build, the current users pcp must be passed in the right place to get the correct staticpackages.inc.

--- End quote ---

Yes, that's the key bit. Older thread at https://forum.lazarus.freepascal.org/index.php/topic,65706.msg500981.html applies.

MarkMLl

BrunoK:

--- Quote from: Martin_fr on September 03, 2024, 10:39:41 am ---But then if you add e.g. AnchorDocking to the IDE, well you want something to happen. But, as explained, by just adding it to the lazarus.lpi => nothing does happen.
That magic happens in staticpackages.inc, which is $I included in the uses clause of lazarus.pp (or main.pp?). So to build lazarus you need an up to date staticpackges.inc.

And that resides in your pcp (primary config path). Because, depending on install the install dir may not be user-writeable and/or shared between different users with different config.
So to build, the current users pcp must be passed in the right place to get the correct staticpackages.inc.
.
.
.
For the above, if you did not need a lazarus setup shared by multiple users, you could add the include path for staticpackages into your lpi (or move the file into the project dir, and keep it updated there).
And then you could find out what the next problem may be.

--- End quote ---
I restested my "instructions" and noticed that in fact I had moved the staticpackages to my Config_dbg directory but hadn't gone all the way correcting the .lpi.
So here a corrected .lpi where the staticpackages.inc in the project inspector point to the Config_dbg folder.

And the current staticpackages.inc I use in my debug trunk, this must be adapted to your needs.



--- Quote ---Obviously to try that, you have to undo the "no compiler" setting in the lazarus.lpi.
undo the "no compiler"

--- End quote ---
-->Hence the lazarus_dbg.lpi.

The proof is in the pudding attachment.

440bx:
Thank you all, particularly Bruno for your efforts.  All good information.

Thank you again.

I'll be giving it a try (again) when I'm done with my current project (probably a couple of months away)

Navigation

[0] Message Index

[*] Previous page

Go to full version