Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

Infinite recursion while finding cl.exe #312

Open
@nyanpasu64

Description

I have quite a complex setup, with a "path" folder stored under %userprofile%/Dropbox/encrypted/dirlinks/path, and symlinked to %userprofile%/encrypted/dirlinks/path and %userprofile%/path. I also have ConEmu installed.

I only added %userprofile%/path to my PATH variable, while building in Visual Studio.

When I copy clcache.exe to cl.exe and execute it, it enters infinite recursion, unless:

  1. %CD% current directory does not contain cl.exe.
  2. %PATH% contains the normalized path to path folder, and not a path to that folder, but containing symlinks along the way.

If 2 is not true, findCompilerBinary() returns the wrong path since myExecutablePath() (sys.executable.upper()) differs from path.upper() (from %PATH%), even if cl.exe is the same file, accessed via different symlinks.

If 1 is not true, I don't know what's wrong since I don't know how to debug py2exe programs.


I could set CLCACHE_CL, but the default folder differs by host and EXE architecture, making me feel somewhat uncomfortable about setting it up (hard-coded to match one VS project and configuration).


Maybe you should use os.path.realpath(...) or Path.resolve() to normalize paths, to fix 2. I'm not sure if that will fix 1.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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