Lazbuild fails when Lazarus is installed inside a mount point.
Original Reporter info from Mantis: Alguien @MA2G1
-
Reporter name:
Original Reporter info from Mantis: Alguien @MA2G1
- Reporter name:
Description:
When the Lazarus IDE is installed inside a mount point on Windows, rebuilding the IDE fails with error 'Cannot create directory "C:\Applications"' (see attachment "cannot-find-directory.png"). It does not matter if the IDE has additional custom packages or the default package set.
I had an older Lazarus version with FPC 3.0.4 and the problem started to happen after upgrading the installation (using the installer at SourceForge) to the latest version 2.0.12 with FPC 3.2.2.
Steps to reproduce:
- You need a mount point. For that, you can follow the Microsoft documentation: https://docs.microsoft.com/en-us/windows-server/storage/disk-management/assign-a-mount-point-folder-path-to-a-drive
- Set up a recent Lazarus version (with FPC 3.2.2) on a path inside the mount point
- Launch Lazarus and try to rebuild it from "Tools -> Build IDE". It should fail with the error "Cannot create directory...".
Additional information:
I have also tested Lazarus trunk (r65328) with FPCUP to set up Lazarus inside the mount point with FPC 3.2.2 and it also fails. You can see the FPCUP log attached as "fpcup-lazarus-build.log" (in the log, FPC options are not the default, but I have also tested with the default "-XX -O2" and the problem is the same).
If I set up Lazarus to use FPC 3.0.4 the problem is gone (both with Lazarus 2.0.12 and Lazarus trunk), so it may be some change in FPC which causes this problem. I have been thinking about the possibility of the change in behavior of the function "DirectoryExists()" in SysUtils since this function returns "True" on FPC 3.0.4 and "False" on FPC 3.2.2 when applied to the mount point. See the attached program "ExistenceDemo.pas".
Tested combinations:
Lazarus 2.0.12 + FPC 3.0.4: OK
Lazarus 2.0.12 + FPC 3.2.2 (bundled): fail
Lazarus 2.0.12 + FPC 3.2.2 (FPCUP): fail
Lazarus trunk + FPC 3.0.4: OK
Lazarus trunk + FPC 3.2.2 (bundled): fail
Lazarus trunk + FPC 3.2.2 (FPCUP): fail