Windows compiler doesn't see simlink as an executable
Original Reporter info from Mantis: Sergey Bychkow @sergey.bychkow
-
Reporter name: Sergey Bychkow
Original Reporter info from Mantis: Sergey Bychkow @sergey.bychkow
- Reporter name: Sergey Bychkow
Description:
FPC can use external executable, for example, C:\lazarus\fpc\3.3.1\bin\i386-darwin\i386-darwin-ld.exe for cross-compilation only if this file is hard-linked or copied. It doesn't find it if this is NTFS simlink.
If file is copied or hard-linked then fpcdebuf.txt contains:
==
00008000:Searching file C:\lazarus\fpc\3.3.1\bin\i386-darwin\i386-darwin-ld.exe... found
00008000:(9017) Using util C:\lazarus\fpc\3.3.1\bin\i386-darwin\i386-darwin-ld.exe
==
However, if symlink was created instead, then
==
00008000:Searching file C:\lazarus\fpc\3.3.1\bin\i386-darwin\i386-darwin-ld.exe... not found
00008000:Searching file C:\lazarus\fpc\3.3.1\bin\x86_64-win64\i386-darwin-ld.exe... not found
...
10000002:Error: (9016) Util i386-darwin-ld.exe not found, switching to external linking
00008000:(9017) Using util i386-darwin-ld.exe
10000001:Fatal: (10026) There were 1 errors compiling module, stopping
10000001:Fatal: (1018) Compilation aborted
==
Steps to reproduce:
Make sure that you have enough privileges for symlinks (run command prompt as Administrator), then:
cd \lazarus\fpc\3.3.1\bin\i386-darwin
mklink i386-darwin-ld.exe "C:\Program Files\LLVM\bin\ld64.lld.exe"
symbolic link created for i386-darwin-ld.exe <<===>> C:\Program Files\LLVM\bin\ld64.lld.exe
Additional information:
This is an issue only for trunk/3.3.1.
Stable/3.0.4 doesn't have this issue.
May be it's also worth to accept *.bat and/or *.cmd files as external utility. They require different processing on Windows unlike *nixes where any script can be executable.
Mantis conversion info:
- Mantis ID: 35744
- Version: 3.3.1
- Fixed in version: 3.3.1
- Fixed in revision: 42456 (#48d0ab1a)
- Monitored by: » AntonK (Anton Kavalenka)