Skip to content

Path problems on Linux (and on any other OSes with case-sensitive file systems). #215

@pbakota

Description

@pbakota
  1. The first issue is with the lib path names:
    I am invoking the compiler with the command: $(MP) main.pas -t c4p -ipath:$(HOME)/Sources/Mad-Pascal/base/../lib. The last working commit for me was 9cb1839 ("Use TIdentIndex", 2025-04-28) after that, from the commit 9118bce ("Normalize file paths in SIMULATED_FILE_IO", 2025-04-28) I was not able to build my project on Linux anymore. Because of Error: E33 - FileNotFound: Cannot find unit 'system' used by program 'Program' in unit path '/home/user/sources/mad-pascal/base/../lib/'. The issue is with the line src/FileIO.pas:715 Result := LowerCase(Result); which coverts the full path to lower-case and since I use mixed case for my files and paths, this does not work for me. The change to remove the problematic line worked for me. I saw other person is complaining about similar issue Problem locating units on OSes with case sensitive file names #153. But the mentioned solution in that issue was, every filename (including directory names as well) we have to convert to lower-case. But that is not always possible, in fact (see the next issue) is not working at all in the case of units.

  2. The second issue is with the unit names, at least how they are converted to uppercase unconditionally.
    In my case I am using lower-case for all my unit filenames. The issue in this case is more or less solvable by converting all the unit filenames to <UNITNAME>.pas format. Where the UNITNAME must be all uppercase and the file extension .pas must be all lower-case which is a bit inconsistent. It would be nice if I can keep my filenames as-is and not to have the hard precondition from the compiler side.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions