Skip to content

Pass short path names to configure scripts on Windows #3185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
23Skidoo opened this issue Feb 24, 2016 · 5 comments
Closed

Pass short path names to configure scripts on Windows #3185

23Skidoo opened this issue Feb 24, 2016 · 5 comments

Comments

@23Skidoo
Copy link
Member

In #2946 we changed Cabal to use the standard mechanism when passing the gcc path to configure scripts. Unfortunately, it looks like this feature is still broken (at least on Windows) when the path contains spaces (a bug in Autoconf). A workaround that is confirmed to work is to use short path names. We should change Cabal to do that automatically.

@gbaz
Copy link
Collaborator

gbaz commented Feb 24, 2016

Of the mechanisms to get short path names in windows, this looks fairly reliable for programmatic use: http://stackoverflow.com/a/21786312/371753

@23Skidoo
Copy link
Member Author

Is GetShortPathName unreliable?

@gbaz
Copy link
Collaborator

gbaz commented Feb 24, 2016

Calling the function directly should work fine too. I just tend to prefer to shell out rather than deal with more bindings...

@23Skidoo 23Skidoo modified the milestones: Cabal 1.24, Cabal 1.26 Feb 29, 2016
@Mistuke
Copy link
Collaborator

Mistuke commented Apr 4, 2016

8.3 short names can be disabled for performance reasons https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#short_vs._long_names
So I don't particularly like this as the default. Isn't there another possible fix?

@23Skidoo
Copy link
Member Author

23Skidoo commented Apr 4, 2016

@Mistuke

8.3 short names can be disabled for performance reasons

The documentation for GetShortPathName says:

If you call GetShortPathName on a path that doesn't have any short names on-disk, the call will succeed, but will return the long-name path instead. This outcome is also possible with NTFS volumes because there's no guarantee that a short name will exist for a given long name.

So it looks like using GetShortPathName will be no worse than status quo when 8.3 names are disabled.

23Skidoo added a commit to 23Skidoo/cabal that referenced this issue Apr 8, 2016
23Skidoo added a commit to 23Skidoo/cabal that referenced this issue Apr 8, 2016
23Skidoo added a commit to 23Skidoo/cabal that referenced this issue Apr 8, 2016
23Skidoo added a commit to 23Skidoo/cabal that referenced this issue Apr 8, 2016
@23Skidoo 23Skidoo self-assigned this Apr 8, 2016
23Skidoo added a commit that referenced this issue Apr 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants