[lazarus] Unit not found objpas - but only sometimes

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Dec 24 04:19:21 EST 2003


On Wed, 24 Dec 2003 09:34:42 +0200  "A.J. Venter" <ajventer at direqlearn.org>
wrote:

> > > Any idea what is causing this or how to fix it ?
> > 
> > - Maybe the IDE didn't notice, that you updated your fpc. Try
> > Environment -> Rescan fpc source dir.
> Did that several times, I was thinking along the same lines.
> I also did make clean all && make
> Just in case.
> > - If this does not work, check if the IDE actually found the objpas
> > unit. There are quite a lot of fpc units, so the easiest way is to grep
> > in~/.lazarus/inputhistory.xml for objpas.
> > For fpc 1.9 there should be a line
> > 
> > objpas <your fpc src path>/rtl/objpas/objpas.pp
> > 
> > Is it there?
> Well I use 1.0.10
> ok cd ~/.lazarus
> cat inputhistory.xml | grep objpas
>     <FileDialog Width="441" Height="469"
> InitialDir="/usr/src/fpc/rtl/objpas/">
>         <Item1 Value="/usr/src/fpc/rtl/objpas/"/>
> objpas /usr/src/fpc/rtl/$(#TargetOS)/objpas.pp
> typinfo /usr/src/fpc/rtl/objpas/typinfo.pp
> math /usr/src/fpc/rtl/objpas/math.pp
> objpas /usr/src/fpc/rtl/$(#TargetOS)/objpas.pp
> typinfo /usr/src/fpc/rtl/objpas/typinfo.pp
> math /usr/src/fpc/rtl/objpas/math.pp
> 
> So several lines reference the name, some the directory and one the
> actual objpas.pp file
> 
> The /usr/src/fpc bit should be correct, it is actually a symlink to
> /usr/src/fpc-1.0.10 
> I led me do some more checking, TargetOS must obviously be linux

right

> so I checked /usr/src/fpc/rtl/linux
> There is no objpas.pp there !!

And there should not be. But once it was there.
So, either the rescan did not work (which I doubt, but to make sure, check
the file date), or the heuristic found something there. 
Can you give me a 
find /usr/src/fpc/ | grep objpas.p

 
> Yet /usr/src/fpc/rtl/objpas does exist.
> 
> This source directory exists as extracted from the "one big tarball"
> download's setup script.
> 
> I then proceeded to dig into the tarbal itself and can confirm that the
> file does not exist there either.
> 
> I did some further grepping in the .lazarus directory, found this
> refference in  environmentoptions.xml
> 
> <OpenFiles Max="10" Count="1">
>         <Item1 Value="/usr/src/fpc/rtl/objpas/objpas.pp"/>
> </OpenFiles>

This is the recent file list.

 
> No other reference in that file, and this one does have the right path.
> 
> Finally, not being able to figure out where the wrong path was set from,
> or how it got there, I tried a little hack - I symlinked all the files
> from /usr/src/fpc/rtl/objpas/ INTO /usr/src/fpc/rtl/linux

:(

 
> Everything seems to work now, but I am rather less than happy about it,
> somewhere something is still looking for the file in the wrong place, I
> now tricked it into finding it - but I would obviously prefer to just
> fix it.

No problem. As soon as I found out, what confused the search algorithm. 
The current 1.0.11 works fine. Do you know the date of your tarball?


Mattias






More information about the Lazarus mailing list