Sign in Join

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

Mailing lists / lazarus / 2011-01

That pesky LazarusPackageIntf

5 messages · 2 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 had this problem on several different occasions now, and each time it seems to cost me an hour -- sometimes many -- of banging my head against a wall. Despite my repeated attempts to discover a consistent way to resolve it, it remains elusive. The problem is this:

/Docs/fpc/saralatools/Extras/sarala_tools.pas(1,1) Fatal: Can't find unit
LazarusPackageIntf used by sarala_tools

The best part, of course, is that I don't think my sarala_tools package ought to be using "LazarusPackageIntf" at all. The fpgui_toolkit package does not list it as a requirement, and that package file works fine (in fact I use it as a requirement). So I go and delete LazarusPackageIntf from the "uses" list. But when I try to compile the package file, Lazarus PUTS THE REQUIREMENT BACK IN! And then it cannot find the thing it put in! Totally absurd!

Aside from the question of what did I do to make it want this requirement, my real question is how on earth can I consistently resolve this issue?

It seems to pop up at some point after upgrading lazarus (I upgraded to the 0.9.29 fixes branch from the ubuntu repo roday). But the problem did not surface for a few hours after that. Then all of a sudden the problem appeared, and that means I cannot compile my work grinds to a complete halt for an hour and a half, while I pull my hair out trying to figure out how to make the thing work again: by reinstalling, removing my ~/.lazarus folder, checking paths in /etc/fpc.cfg, whatever nonsense thing might somehow be related. And then, after I do something which I've already done 4 times before, seemingly by magic, it just starts working again.

Does anybody know what is behind this?

thanks -- sorry for being ranty -- hopefully it was at least a little bit fun to read!
~David.

Reply by email

José Mejuto
to David Emerson

Hello Lazarus-List,

Monday, January 3, 2011, 11:02:15 AM, you wrote:

DE> Does anybody know what is behind this?
DE> thanks -- sorry for being ranty -- hopefully it was at least a little bit fun to DE> read!

If I'm not wrong this package is the code that glues the IDE and the components in a package so it is logical that is needed by a package as a requirement.

The problem arises when you change something in the code that is being used by the lazaruspackageintf and meanwhile you change the code generator (fpc). So a typical example, you update your fpc and change something in your package, so it must be recompiled but the linker can not link the lazaruspackageintf because it was generated by an older fpc.

The direct solution is going to rebuild lazarus and select the rebuild of lcl, package registration, ide interface and IDE. Usually the clean and build is not needed, so it should happend fast. You can try to only rebuild package registration.

Best regards, Jos?

Reply by email

David Emerson
to José Mejuto

Thanks very much for your reply!

I am using the debian installation packages in the testing repo, described here: http://wiki.lazarus.freepascal.org/Lazarus_release_version_for_Ubuntu#Long_version:_step_by_step (thanks, Vincent!!)

I notice that you mention LCL, and now that you mention it, it is ringing a bell. I think last night that things started working after I resolved an installation dependency conflict with two of the LCL installation packages. Might this have been the cause? If some LCL components were not installed properly, that could cause a problem with LazarusPackageIntf?

Cheers,
David

Jos? Mejuto wrote 6 lines
Hello Lazarus-List, Monday, January 3, 2011, 11:02:15 AM, you wrote: DE> Does anybody know what is behind this? DE> thanks -- sorry for being ranty -- hopefully it was at least a little bit

fun to

Show quoted text 29 lines
DE> read! If I'm not wrong this package is the code that glues the IDE and the components in a package so it is logical that is needed by a package as a requirement. The problem arises when you change something in the code that is being used by the lazaruspackageintf and meanwhile you change the code generator (fpc). So a typical example, you update your fpc and change something in your package, so it must be recompiled but the linker can not link the lazaruspackageintf because it was generated by an older fpc. The direct solution is going to rebuild lazarus and select the rebuild of lcl, package registration, ide interface and IDE. Usually the clean and build is not needed, so it should happend fast. You can try to only rebuild package registration. -- Best regards, Jos? -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

José Mejuto
to David Emerson

Hello Lazarus-List,

Monday, January 3, 2011, 9:58:46 PM, you wrote:

DE> I am using the debian installation packages in the testing repo, described here: DE> http://wiki.lazarus.freepascal.org/Lazarus_release_version_for_Ubuntu#Long_version:_step_by_step DE> (thanks, Vincent!!)
DE> I notice that you mention LCL, and now that you mention it, it is ringing a DE> bell. I think last night that things started working after I resolved an DE> installation dependency conflict with two of the LCL installation packages. DE> Might this have been the cause? If some LCL components were not installed DE> properly, that could cause a problem with LazarusPackageIntf?

Yes, specially if you mix different versions/revisions. Usually this kind of problems are resolved with a full rebuild, cleaning files. Instead searching for the exactly root of the problem, full rebuild and voil?!

Best regards, Jos?

Reply by email

David Emerson
to José Mejuto
Yes, specially if you mix different versions/revisions.

As noted, I'm using the debian packages... I'm quite hopeful that they would be close enough to the same version to work together...

Usually this kind of problems are resolved with a full rebuild, cleaning files. Instead searching for the exactly root of the problem, full rebuild and voil?!

You make it sound so easy, but I struggled for hours to get my fully-rebuilt lazarus-from-svn to work properly. I ultimately gave up and reverted to the debian packages, which work much more easily.

Cheers,
David

Reply by email