[fpc-pascal] fpc in symlinked directory

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Mar 26 14:21:50 CET 2014


On Wed, 26 Mar 2014 13:37:32 +0100 (CET)
Michael Van Canneyt <michael at freepascal.org> wrote:

>[...]
> But I am arguing that when passing filenames/paths to other tools 
> (including the compiler), you should always specify full filenames.

The IDE passes all search paths as full file paths, especially no
'..'. No problem here. Symlinks don't need to be resolved for this.


>[...]
> >> That is why FPC resolves everything.
> >
> > Not true.
> > For example when I leave out the 'cd /tmp/link' and my cwd
> > is /home/mattias, then fpc creates the debugging info
> > "../../tmp/link/unit1.pas".

No comment here?


> >> /proc/self/cwd does the same: it resolves the directory.
> >
> > This is the physical cwd.
> 
> Yes. It is the only one that makes sense.

It makes sense for the kernel, because that works on the lower level.

Michael, why do use symlinks? Why don't you always specify
the fully resolved paths? You must see some sense in logical paths.


>[...]
> >> And likewise, I think that Lazarus is still wrong using relative paths.
> >
> > AFAIK the only issue with symlinks are the '..', as this works on the
> > physical parent. There is no problem with a relative path like
> > 'foo/bar'.
> 
> Exactly. Lazarus specifies ALL links to required packages as relative paths.

Not here.
Please create a bug report with an example where Lazarus passes '..' to
a tool.

 
>[...]

Mattias



More information about the fpc-pascal mailing list