Sign in Join

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

Mailing lists / lazarus / 2013-07

IDE can't find various LCL unit

11 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

David Copeland

Recently, the IDE has been having trouble finding various units within the LCL. I tried searching the bug tracker but could not find this issue.

I use fpc 2.6.2, and use Lazarus from svn. I updated this morning to revision 41964. The OS is Suse 12.2 / x86_64.

What happens is ... Whenever I try to navigate to an event handler of a control I get an error ...
/home/david.copeland/projects/lazarus/lcl/controls.pp(38,36) Error: unit not found: types
The controls.pp source file is opened and the unit clause is highlighted. Sometimes it is the gettext in the Forms unit that is not found. Also, I am not sure, but I think this started when I upgraded fpc from 2.6.0 to 2.6.2.

For example, and more specifically say I click on a Button in some Form. Then in the Object Inspector I click on the Event tab, then click on the "On Click" line to get the ... to show. It is at this point the "error" occurs. However, the ... are shown and I can click on them to navigate to the handler. I can build my application and it runs. As long as the project remains open the "error" does not reoccur. But if I open another project I get this "error" on the first attempt to navigate to an event handler.

When the handler already exists this is an annoyance. But if I try creating a handler for a new control the behavior is different. When I click on the ... in the Object Inspector I get a message dialog with the the message "Unable to find method. Please fix the error shown in the message window, which in normally below the source editor." That error is "Error: Unit not found: Classes". Also the file LCLClasses is opened in the editor. This happens every time I try to create the handler in this way. I can manually add the handler and the application builds normally. However, the manually added handler is not visible in the object inspector, even if I restart the IDE.

I hope this is enough info. I can file a bug report if needed.

Thanks,
Dave Copeland.

Reply by email

Mattias Gaertner
to David Copeland
Show quoted text 14 lines
Recently, the IDE has been having trouble finding various units within the LCL. I tried searching the bug tracker but could not find this issue. I use fpc 2.6.2, and use Lazarus from svn. I updated this morning to revision 41964. The OS is Suse 12.2 / x86_64. What happens is ... Whenever I try to navigate to an event handler of a control I get an error ... /home/david.copeland/projects/lazarus/lcl/controls.pp(38,36) Error: unit not found: types The controls.pp source file is opened and the unit clause is highlighted. Sometimes it is the gettext in the Forms unit that is not found. Also, I am not sure, but I think this started when I upgraded fpc from 2.6.0 to 2.6.2.

The unit types is part of fpc.
In that case the IDE can not use search paths to find the source, but instead uses its scan results of the fpc sources (Tools / Rescan FPC source directory).

Have you tried Tools / Rescan FPC source directory?

Check View / IDE Internals / About FPC.
It should list the full filename of types.ppu.

Show quoted text 8 lines
For example, and more specifically say I click on a Button in some Form. Then in the Object Inspector I click on the Event tab, then click on the "On Click" line to get the ... to show. It is at this point the "error" occurs. However, the ... are shown and I can click on them to navigate to the handler. I can build my application and it runs. As long as the project remains open the "error" does not reoccur. But if I open another project I get this "error" on the first attempt to navigate to an event handler.

Maybe the project has some strange defines. For instance targetos=win32.

Show quoted text 12 lines
When the handler already exists this is an annoyance. But if I try creating a handler for a new control the behavior is different. When I click on the ... in the Object Inspector I get a message dialog with the the message "Unable to find method. Please fix the error shown in the message window, which in normally below the source editor." That error is "Error: Unit not found: Classes". Also the file LCLClasses is opened in the editor. This happens every time I try to create the handler in this way. I can manually add the handler and the application builds normally. However, the manually added handler is not visible in the object inspector, even if I restart the IDE. I hope this is enough info. I can file a bug report if needed.

Mattias

Reply by email

David Copeland
to Mattias Gaertner
Mattias Gaertner wrote 23 lines
On Tue, 02 Jul 2013 10:38:13 -0400 David Copeland wrote: > Recently, the IDE has been having trouble finding various units within > the LCL. I tried searching the bug tracker but could not find this issue. > > I use fpc 2.6.2, and use Lazarus from svn. I updated this morning to > revision 41964. The OS is Suse 12.2 / x86_64. > > What happens is ... Whenever I try to navigate to an event handler of a > control I get an error ... > /home/david.copeland/projects/lazarus/lcl/controls.pp(38,36) Error: unit > not found: types > The controls.pp source file is opened and the unit clause is > highlighted. Sometimes it is the gettext in the Forms unit that is not > found. Also, I am not sure, but I think this started when I upgraded fpc > from 2.6.0 to 2.6.2. The unit types is part of fpc. In that case the IDE can not use search paths to find the source, but instead uses its scan results of the fpc sources (Tools / Rescan FPC source directory). Have you tried Tools / Rescan FPC source directory?

I tried this. The "problem" is now that the include file sysutilsh.inc in sysutils cannot be found, or sometimes other include files, or even TComponent.

Check View / IDE Internals / About FPC. It should list the full filename of types.ppu.

It does. It is: types=/usr/lib64/fpc/2.6.2/units/x86_64-linux/rtl/types.ppu

Show quoted text 12 lines
> For example, and more specifically say I click on a Button in some Form. > Then in the Object Inspector I click on the Event tab, then click on the > "On Click" line to get the ... to show. It is at this point the "error" > occurs. However, the ... are shown and I can click on them to navigate > to the handler. I can build my application and it runs. As long as the > project remains open the "error" does not reoccur. But if I open another > project I get this "error" on the first attempt to navigate to an event > handler. Maybe the project has some strange defines. For instance targetos=win32.

Not that I can see. I develop exclusively on/for Linux.

Show quoted text 18 lines
> When the handler already exists this is an annoyance. But if I try > creating a handler for a new control the behavior is different. When I > click on the ... in the Object Inspector I get a message dialog with the > the message "Unable to find method. Please fix the error shown in the > message window, which in normally below the source editor." That error > is "Error: Unit not found: Classes". Also the file LCLClasses is opened > in the editor. This happens every time I try to create the handler in > this way. I can manually add the handler and the application builds > normally. However, the manually added handler is not visible in the > object inspector, even if I restart the IDE. > > I hope this is enough info. I can file a bug report if needed. Mattias --

Reply by email

Mattias Gaertner
to David Copeland
Show quoted text 5 lines
[...] > Have you tried Tools / Rescan FPC source directory? I tried this. The "problem" is now that the include file sysutilsh.inc in sysutils cannot be found, or sometimes other include files, or even TComponent.

ok, that's one step further. It can find the .pas files of the .ppu files. Now to the include files.

Open sysutils.pp.
Check
Source / Unit Information / Include Paths
You should see a list of 11 paths.

> Check View / IDE Internals / About FPC. > It should list the full filename of types.ppu. It does. It is: types=/usr/lib64/fpc/2.6.2/units/x86_64-linux/rtl/types.ppu

Good.

Mattias

Reply by email

David Copeland
to Mattias Gaertner
Mattias Gaertner wrote 15 lines
On Tue, 02 Jul 2013 11:53:56 -0400 David Copeland wrote: > [...] >> Have you tried Tools / Rescan FPC source directory? > I tried this. The "problem" is now that the include file sysutilsh.inc > in sysutils cannot be found, or sometimes other include files, or even > TComponent. ok, that's one step further. It can find the .pas files of the .ppu files. Now to the include files. Open sysutils.pp. Check Source / Unit Information / Include Paths You should see a list of 11 paths.

The Include Paths is empty, as is Unit Paths.
Source Path is /usr/share/fpcsrc/2.6.2/rtl/unix

Show quoted text 12 lines
>> Check View / IDE Internals / About FPC. >> It should list the full filename of types.ppu. > It does. It is: types=/usr/lib64/fpc/2.6.2/units/x86_64-linux/rtl/types.ppu Good. Mattias --

Thanks,
Dave.

Reply by email

Mattias Gaertner
to David Copeland
Show quoted text 18 lines
On 07/02/2013 12:22 PM, Mattias Gaertner wrote: > On Tue, 02 Jul 2013 11:53:56 -0400 > David Copeland wrote: > >> [...] >>> Have you tried Tools / Rescan FPC source directory? >> I tried this. The "problem" is now that the include file sysutilsh.inc >> in sysutils cannot be found, or sometimes other include files, or even >> TComponent. > ok, that's one step further. It can find the .pas files of the .ppu > files. Now to the include files. > > Open sysutils.pp. > Check > Source / Unit Information / Include Paths > You should see a list of 11 paths. The Include Paths is empty, as is Unit Paths. Source Path is /usr/share/fpcsrc/2.6.2/rtl/unix

Is the path in Tools / Options / FPC Source directory '/usr/share/fpcsrc/2.6.2'?

Mattias

Reply by email

David Copeland
to Mattias Gaertner

On 07/02/2013 01:28 PM, Mattias Gaertner wrote:

[...]

Is the path in Tools / Options / FPC Source directory '/usr/share/fpcsrc/2.6.2'?

No. It was /usr/share/fpcsrc. After changing it to the above the problems do not occur.

Mattias

Thanks very much for your help!

Dave.

Reply by email

Mattias Gaertner
to David Copeland
Show quoted text 8 lines
On 07/02/2013 01:28 PM, Mattias Gaertner wrote: [...] > Is the path in Tools / Options / FPC Source directory > '/usr/share/fpcsrc/2.6.2'? No. It was /usr/share/fpcsrc. After changing it to the above the problems do not occur.

That's strange. You should have seen a window at IDE start warning that the fpc source directory looks wrong.

Mattias

Reply by email

David Copeland
to Mattias Gaertner
Mattias Gaertner wrote 12 lines
On Tue, 02 Jul 2013 13:45:13 -0400 David Copeland wrote: > On 07/02/2013 01:28 PM, Mattias Gaertner wrote: > > [...] >> Is the path in Tools / Options / FPC Source directory >> '/usr/share/fpcsrc/2.6.2'? > No. It was /usr/share/fpcsrc. After changing it to the above the > problems do not occur. That's strange. You should have seen a window at IDE start warning that the fpc source directory looks wrong.

Would the warning appear at each and every startup? Perhaps I missed it after I first upgraded fpc to 2.6.2. That was maybe two months ago.

Mattias -

Reply by email

Antonio Fortuny
to Mattias Gaertner: On Tue, 02 Jul 2013 13:45:13 -0400 That's strange. You should have seen a window at IDE…

Le 02/07/2013 20:20, Mattias Gaertner a ?crit :

Show quoted text 12 lines
On Tue, 02 Jul 2013 13:45:13 -0400 David Copeland wrote: > On 07/02/2013 01:28 PM, Mattias Gaertner wrote: > > [...] >> Is the path in Tools / Options / FPC Source directory >> '/usr/share/fpcsrc/2.6.2'? > No. It was /usr/share/fpcsrc. After changing it to the above the > problems do not occur. That's strange. You should have seen a window at IDE start warning that the fpc source directory looks wrong.

Hi.

Maybe not so strange. You probably do not remember but I've had the same problem some months ago with the same Linux distro. But when changing from 1.1 to official 1.0 the problem was solved. Running with 1.0.8 the problems regarding files paths didn't arise anymore. Running rpm's for FPC, FPC sources and Lazaruns, all install like a charm.

Antonio.

Show quoted text 8 lines
Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Sita Software *Antonio Fortuny* Senior Software engineer 220, avenue de la Libert? L-4602 Niederkorn Tel.: +352 58 00 93 - 93 www.sitasoftware.lu <http://www.sitasoftware.lu> Your IT Partner -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130703/f1d9e2e7/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: hdjaeghc.jpg Type: image/jpeg Size: 2306 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130703/f1d9e2e7/attachment.jpg> -------------- next part -------------- A non-text attachment was scrubbed... Name: acjjggbb.jpg Type: image/jpeg Size: 921 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130703/f1d9e2e7/attachment-0001.jpg>

Reply by email

Mattias Gaertner
to Antonio Fortuny
Show quoted text 21 lines
Le 02/07/2013 20:20, Mattias Gaertner a ?crit : > On Tue, 02 Jul 2013 13:45:13 -0400 > David Copeland wrote: > >> On 07/02/2013 01:28 PM, Mattias Gaertner wrote: >> >> [...] >>> Is the path in Tools / Options / FPC Source directory >>> '/usr/share/fpcsrc/2.6.2'? >> No. It was /usr/share/fpcsrc. After changing it to the above the >> problems do not occur. > That's strange. You should have seen a window at IDE start warning that > the fpc source directory looks wrong. Hi. Maybe not so strange. You probably do not remember but I've had the same problem some months ago with the same Linux distro. But when changing from 1.1 to official 1.0 the problem was solved. Running with 1.0.8 the problems regarding files paths didn't arise anymore. Running rpm's for FPC, FPC sources and Lazaruns, all install like a charm.

I improved a few things. The setup dialog should now appear every time on start if the fpc source directory misses the rtl or packages directory.

Mattias

Reply by email