Sign in Join

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

Mailing lists / lazarus / 2009-12

trouble with packages

15 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

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

David Emerson

I have created a package called "sarala_tools" which I'm using in a couple projects. I've found it fun, interesting, and incredibly useful to create packages.

All was working great for a while, but now one of my projects has decided that it cannot find one of the units that is part of the sarala_tools package. I can compile the package just fine from the "open loaded package" > "package sarala_tools" window.

When I create a new project that uses the package I don't see such a problem.

I'm really not sure how to go about fixing my project. Any tips?

Thanks,
David

Reply by email

Phil Hess
to David Emerson

David,

Can you right click in the Message window (at bottom) and copy all messages to the clipboard, then send the last few lines here. I'm curious to see whether it's a checksum issue that I've been wrestling with.

Thanks.

-Phil

----- "David Emerson" wrote 24 lines
I have created a package called "sarala_tools" which I'm using in a couple projects. I've found it fun, interesting, and incredibly useful to create packages. All was working great for a while, but now one of my projects has decided that it cannot find one of the units that is part of the sarala_tools package. I can compile the package just fine from the "open loaded package" > "package sarala_tools" window. When I create a new project that uses the package I don't see such a problem. I'm really not sure how to go about fixing my project. Any tips? Thanks, David -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Graeme Geldenhuys
to David Emerson: I have created a package called "sarala_tools" which I'm using in a couple projects. I've…
David Emerson wrote
All was working great for a while, but now one of my projects has decided that it cannot find one of the units that is part of the

Can you open the package and double click on the unit in question in that package window? Does it find it and open correctly in the IDE? I often found that I might have manually renamed a unit (Linux case sensitive can cause unexpected results). The package compiles fine, but I experienced the same issues as you. Then when I tried to open that unit, package says it cannot find it. It seems the old .ppu file fooled the package for a long while.

Clear you unit output directory by deleting all *.ppu, *.o and *.a files and recompile the package - it should then complain if it can't find a unit.

Old *.ppu files can be a real evil sometimes.

Other than that, I fully agree with you about Packages. To me, they are the single most handy feature in Lazarus IDE!

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Roberto Padovani
to Graeme Geldenhuys

2009/12/1 Graeme Geldenhuys :

Show quoted text 9 lines
David Emerson wrote: Other than that, I fully agree with you about Packages. To me, they are the single most handy feature in Lazarus IDE! Regards, ?- Graeme - --

Very handy, but I have some packages installed in lazarus 0.9.26 and now I would like to install 0.9.28.2.
How can I keep the packages? I mean, is it possible to upgrade lazarus rather then reinstall?
When I moved from 0.9.24 to 0.9.26 I had to find again on internet all the packages I used to have and reinstall :-(

R#

Reply by email

Graeme Geldenhuys
to Roberto Padovani
Roberto Padovani wrote
When I moved from 0.9.24 to 0.9.26 I had to find again on internet all the packages I used to have and reinstall :-(

I install external 3rdParty packages (not included with Lazarus) in a separate folder from the Lazarus directory. eg:

/opt/lazarus/ <-- lazarus IDE, LCL, source /opt/lazarus-addons/ <-- external addons

That way I can trash, reinstall, upgrade /opt/lazarus/ and my 3rdParty addons stay untouched.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Luca Olivetti
to Graeme Geldenhuys

En/na Graeme Geldenhuys ha escrit:

Show quoted text 12 lines
Roberto Padovani wrote: > When I moved from 0.9.24 to 0.9.26 I had to find again on internet all > the packages I used to have and reinstall :-( I install external 3rdParty packages (not included with Lazarus) in a separate folder from the Lazarus directory. eg: /opt/lazarus/ <-- lazarus IDE, LCL, source /opt/lazarus-addons/ <-- external addons That way I can trash, reinstall, upgrade /opt/lazarus/ and my 3rdParty addons stay untouched.

I also use this approach, but the problem is you still have to reinstall them in the new lazarus starting with a fresh configuration[*], otherwise, for components bundled with lazarus, the configuration files will point to components in the old lazarus directory.

[*] I actually do a quick search & replace with perl to change the old path to the new one.

Bye

Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 (Ext.133) Fax +34 93 5883007

Reply by email

Graeme Geldenhuys
to Luca Olivetti
Luca Olivetti wrote
I also use this approach, but the problem is you still have to reinstall them in the new lazarus starting with a fresh configuration[*],

Nope, my Lazarus is installed in /opt/lazarus/ directory. The configuration files (which include external packages listing) are stored in $HOME/.lazarus/ directory.

So even if I upgrade or reinstall Lazarus, it does not touch my configuration files. I have been working like this for years.

I actually have two icons on my desktop, and both use the --pcp= parameter with different profile directories.

Lazarus (stable) -> $HOME/.lazarus-stable/
Lazarus (unstable). -> $HOME/.lazarus/

Now only if I could tell Lazarus (Tools > Configure Build Lazarus) what my desired output filename must be, instead of always defaulting to 'lazarus'

Anybody know if this is possible?

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Luca Olivetti
to Graeme Geldenhuys

En/na Graeme Geldenhuys ha escrit:

Show quoted text 10 lines
Luca Olivetti wrote: > I also use this approach, but the problem is you still have to reinstall > them in the new lazarus starting with a fresh configuration[*], Nope, my Lazarus is installed in /opt/lazarus/ directory. The configuration files (which include external packages listing) are stored in $HOME/.lazarus/ directory. So even if I upgrade or reinstall Lazarus, it does not touch my configuration files. I have been working like this for years.

Exactly.
Now, look at those file, they are referencing to packages, some of them are in your fixed extra packages (no problem with those) but some of them are pointing to packages in the lazarus directory. Again, it's no problem if you always use the *same* directory for lazarus, but if you use more than one version, each in a different directory (like your example below), even if you use a different pcp you have to either start from scratch (i.e with an empty pcp) and reconfigure lazarus to your liking *and* then reinstall the extra packages or copy the configuration files and edit them to point to the correct lazarus directory (that's what I do)

Show quoted text 5 lines
I actually have two icons on my desktop, and both use the --pcp= parameter with different profile directories. Lazarus (stable) -> $HOME/.lazarus-stable/ Lazarus (unstable). -> $HOME/.lazarus/

Bye

Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 (Ext.133) Fax +34 93 5883007

Reply by email

Graeme Geldenhuys
to Luca Olivetti
Luca Olivetti wrote
Exactly. Now, look at those file, they are referencing to packages, some of them are in your fixed extra packages (no problem with those) but some of

OK, maybe I'm not understanding the problem then. :)

When I started using the second profile (different version of Lazarus), I simply made a copy of the original profile directory (cp ~/.lazarus ~/.lazarus-stable) and pointed the new desktop icon to use that profile. So both had the same configurations and installed packages - as I wanted.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Luca Olivetti
to Graeme Geldenhuys

En/na Graeme Geldenhuys ha escrit:

Show quoted text 11 lines
Luca Olivetti wrote: > Exactly. > Now, look at those file, they are referencing to packages, some of them > are in your fixed extra packages (no problem with those) but some of OK, maybe I'm not understanding the problem then. :) When I started using the second profile (different version of Lazarus), I simply made a copy of the original profile directory (cp ~/.lazarus ~/.lazarus-stable) and pointed the new desktop icon to use that profile. So both had the same configurations and installed packages - as I wanted.

Beware, then, that the new profile is using packages from the old lazarus.

Bye

Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 (Ext.133) Fax +34 93 5883007

Reply by email

Mattias Gaertner
to Luca Olivetti
Show quoted text 14 lines
En/na Graeme Geldenhuys ha escrit: > Luca Olivetti wrote: >> Exactly. >> Now, look at those file, they are referencing to packages, some of them >> are in your fixed extra packages (no problem with those) but some of > > OK, maybe I'm not understanding the problem then. :) > > When I started using the second profile (different version of Lazarus), > I simply made a copy of the original profile directory (cp ~/.lazarus > ~/.lazarus-stable) and pointed the new desktop icon to use that profile. > So both had the same configurations and installed packages - as I wanted. Beware, then, that the new profile is using packages from the old lazarus.

Not with 0.9.29.
The packgefiles.xml stores the file names of the lpk files. lpk files in the lazarus directory are stored without the lazarus directory. So if your pcp uses another lazarus directory, then the packages from the new lazarus will be used.

Mattias

Reply by email

Mattias Gaertner
to David Emerson: I have created a package called "sarala_tools" which I'm using in a couple projects. I've…
Show quoted text 13 lines
I have created a package called "sarala_tools" which I'm using in a couple projects. I've found it fun, interesting, and incredibly useful to create packages. All was working great for a while, but now one of my projects has decided that it cannot find one of the units that is part of the sarala_tools package. I can compile the package just fine from the "open loaded package" > "package sarala_tools" window. When I create a new project that uses the package I don't see such a problem.

Delete the ppus of the project.
Check the project search paths in the compiler options. The project unit search paths should *not* contain any package directory, because this is done by the IDE automatically (see the inherited page in the compiler options).

Check for duplicate unit and include file names.

I'm really not sure how to go about fixing my project. Any tips?

About the checksum bug:
Compile your package twice. If the second time the compiler compiles two units again, you suffer from the bug.

Mattias

Reply by email

Luca Olivetti
to Mattias Gaertner: On Tue, 01 Dec 2009 12:25:42 +0100 Not with 0.9.29. The packgefiles.xml stores the file…

En/na Mattias Gaertner ha escrit:

Show quoted text 11 lines
>> When I started using the second profile (different version of Lazarus), >> I simply made a copy of the original profile directory (cp ~/.lazarus >> ~/.lazarus-stable) and pointed the new desktop icon to use that profile. >> So both had the same configurations and installed packages - as I wanted. > Beware, then, that the new profile is using packages from the old lazarus. Not with 0.9.29. The packgefiles.xml stores the file names of the lpk files. lpk files in the lazarus directory are stored without the lazarus directory. So if your pcp uses another lazarus directory, then the packages from the new lazarus will be used.

Good to know. It wasn't so with previous versions. In fact I asked for this feature some time ago.

Bye

Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 (Ext.133) Fax +34 93 5883007

Reply by email

David Emerson
to Phil Hess: Can you right click in the Message window (at bottom) and copy all messages to the…
Phil Hess wrote
David, Can you right click in the Message window (at bottom) and copy all

messages to the clipboard, then send the last few lines here. I'm curious to see whether it's a checksum issue that I've been wrestling with.

PPU Loading units/gamma_draw_unit.ppu
PPU Source: gamma_draw_unit.pas not found
Recompiling gamma_draw_unit, checksum changed for fpg_base gamma_draw_unit.pas(143,23) Fatal: Can't find unit gamma_draw_unit used by ab_db_access_unit

Deleting all my old .o and .ppu files appears to have solved this problem (although I haven't gotten the program compiled yet because of code-breaking changes in my libraries... but it looks like it's not having trouble finding the units, as it was before)

Thanks Graeme for that hint!

~David.

Show quoted text 9 lines
Thanks. -Phil ----- "David Emerson" wrote: > I have created a package called "sarala_tools" which I'm using in a > couple projects. I've found it fun, interesting, and incredibly

useful

Show quoted text 29 lines
> > to create packages. > > All was working great for a while, but now one of my projects has > decided that it cannot find one of the units that is part of the > sarala_tools package. I can compile the package just fine from > the "open loaded package" > "package sarala_tools" window. > > When I create a new project that uses the package I don't see such a > problem. > > I'm really not sure how to go about fixing my project. Any tips? > > Thanks, > David > > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email