[Lazarus] component installation failure

Mattias Gaertner nc-gaertnma at netcologne.de
Tue May 25 10:22:36 CEST 2010


On Tue, 25 May 2010 05:40:40 +0200
Marc Santhoff <M.Santhoff at web.de> wrote:

> Hi,
> 
> having not made any visual components since Delphi2 I have to ask:
> 
> 1.
> When I want to install a visual component to lazarus, does it need to
> have a package file (.lpk) or is the classic way of installing from the
> components source file(s) still available?

You need a lpk file.

 
> 2.
> When I make a package file for an ancient Delphi component to port to
> lazarus and it compiles and installs but doesnt show up in the IDE
> although it is found in the package list, what has gone wrong there?

Possible reasons: 
- The register procedure was not called, because you didn't check the
'Has Register procedure' for this unit in the package editor.
- You didn't start the new IDE, but the old. Start the IDE in the
  terminal. You will see where the new lazarus executable is created.

Hint: When you select the unit in the package editor you can see the
registered components of this unit.

 
> The long story for question 2:
> 
> I made a package for the component, converted the dfm to lfm, fixed some
> code and commented things for later until it compiles okay.  A resource
> file is included directly without converting to .lrs because I read in
> the wiki this is possible and I don't know how to extract what is in
> the .res-file.

Yes, you can use res files. I don't know if all formats work the same
as under Delphi.

 
> Then I klicked "install" at the package management window. When asked if
> I want lazarus to be built now I clicked yes and compilation ran through
> until lazarus ended.
> 
> When trying to start the freshly compiled ide his error happens:
> 
> $ lazarus
> Fatal error 'Spinlock called when not threaded.' at line 78 in
> file /usr/src7/src/lib/libthr/thread/thr_spinlock.c (errno = 2)
> Abbruch(core dumped)

Maybe your package needs threading support.
See here 
http://wiki.lazarus.freepascal.org/Multithreaded_Application_Tutorial#Multithreading_in_packages

 
> Aftwerwards I did a "gmake bigide" in lazarus source dir to get a
> working thingy again, which worked and ran fine.
> With one exception: the new package does not show up, it's state is
> still set to "install on next start", but nothing happens when started
> over.

make bigide compiles an IDE with a standard set of packages.
You can use the command line tool lazbuild to compile an IDE with your
packages:

http://wiki.lazarus.freepascal.org/lazbuild

 
> All that occured with:
> 
> Lazarus svn 25285 and 25631
> fpc 2.4.0
> FreeBSD 7.2
 

Mattias




More information about the Lazarus mailing list