[lazarus] Unit not found objpas - but only sometimes

A.J. Venter ajventer at direqlearn.org
Wed Dec 24 02:23:37 EST 2003


> > 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 so I
checked /usr/src/fpc/rtl/linux
There is no objpas.pp there !!

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>

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.

Ciao
A.J.



How many people can read HEX if only you and 
dead people can read HEX ? 

Answer: 57006
A.J. Venter
DireqLearn Tech Guru
www.direqlearn.org
www.silentcoder.cjb.net (personal site)






More information about the Lazarus mailing list