[fpc-pascal] fpc in symlinked directory

Tomas Hajny XHajT03 at hajny.biz
Wed Mar 26 15:30:31 CET 2014


On Wed, March 26, 2014 15:19, Michael Van Canneyt wrote:
>
>
> On Wed, 26 Mar 2014, Mattias Gaertner wrote:
>
>> 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.
>
> Euh ? Last time I checked, the paths were full of ../ ?
> (admittedly, that was some time ago, I stopped opening files through
> symlinks...)
>
>>> [...]
>>>>> 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?
>
> I tested, and indeed:
>
> # include_directories
>          .ascii  "../../tmp/link\000"
>
> I think this is an error in FPC, because the linker file contains full
> paths:
>
> INPUT(
> /usr/local/lib/fpc/2.7.1/units/x86_64-linux/rtl/prt0.o
> /tmp/link/p.o
> /usr/local/lib/fpc/2.7.1/units/x86_64-linux/rtl/system.o
> ...
>
> The two should at least match; and you will not be surprised to hear that
> I think the linker file is correct :)
 .
 .

It makes no sense to use absolute paths in debug information, because it
would make distribution of units compiled with debug information to other
machines impossible (or more precisely - it would be possible to
distribute them, but debugging would not work :/ ).

Tomas





More information about the fpc-pascal mailing list