{"action":"created","issue":{"url":"https://api.github.com/repos/haskell/cabal/issues/3487","repository_url":"https://api.github.com/repos/haskell/cabal","labels_url":"https://api.github.com/repos/haskell/cabal/issues/3487/labels{/name}","comments_url":"https://api.github.com/repos/haskell/cabal/issues/3487/comments","events_url":"https://api.github.com/repos/haskell/cabal/issues/3487/events","html_url":"https://github.com/haskell/cabal/issues/3487","id":159309263,"number":3487,"title":"Detect when sh cannot handle Windows short paths","user":{"login":"acfoltzer","id":205266,"avatar_url":"https://avatars.githubusercontent.com/u/205266?v=3","gravatar_id":"","url":"https://api.github.com/users/acfoltzer","html_url":"https://github.com/acfoltzer","followers_url":"https://api.github.com/users/acfoltzer/followers","following_url":"https://api.github.com/users/acfoltzer/following{/other_user}","gists_url":"https://api.github.com/users/acfoltzer/gists{/gist_id}","starred_url":"https://api.github.com/users/acfoltzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acfoltzer/subscriptions","organizations_url":"https://api.github.com/users/acfoltzer/orgs","repos_url":"https://api.github.com/users/acfoltzer/repos","events_url":"https://api.github.com/users/acfoltzer/events{/privacy}","received_events_url":"https://api.github.com/users/acfoltzer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/haskell/cabal/labels/platform:%20windows","name":"platform: windows","color":"f9d0c4"},{"url":"https://api.github.com/repos/haskell/cabal/labels/type:%20bug","name":"type: bug","color":"e99695"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/haskell/cabal/milestones/33","html_url":"https://github.com/haskell/cabal/milestones/cabal-install%201.24.0.1","labels_url":"https://api.github.com/repos/haskell/cabal/milestones/33/labels","id":1595071,"number":33,"title":"cabal-install 1.24.0.1","description":"","creator":{"login":"23Skidoo","id":47439,"avatar_url":"https://avatars.githubusercontent.com/u/47439?v=3","gravatar_id":"","url":"https://api.github.com/users/23Skidoo","html_url":"https://github.com/23Skidoo","followers_url":"https://api.github.com/users/23Skidoo/followers","following_url":"https://api.github.com/users/23Skidoo/following{/other_user}","gists_url":"https://api.github.com/users/23Skidoo/gists{/gist_id}","starred_url":"https://api.github.com/users/23Skidoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/23Skidoo/subscriptions","organizations_url":"https://api.github.com/users/23Skidoo/orgs","repos_url":"https://api.github.com/users/23Skidoo/repos","events_url":"https://api.github.com/users/23Skidoo/events{/privacy}","received_events_url":"https://api.github.com/users/23Skidoo/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":16,"state":"open","created_at":"2016-02-20T22:03:11Z","updated_at":"2016-08-01T22:11:18Z","due_on":"2016-08-30T22:00:00Z","closed_at":null},"comments":16,"created_at":"2016-06-09T01:04:02Z","updated_at":"2016-08-01T22:11:18Z","closed_at":"2016-08-01T22:11:18Z","body":"**Summary by @ezyang:** In a misconfigured msys installation, the default sh in the path may come from cygwin which cannot handle Windows short paths. Unfortunately, Cabal 1.24 switched to using short paths, so using an sh which can handle this is important.\r\n\r\n`./Setup configure` should verify that `sh` can handle short paths. It's not currently clear what the best way to do this is. It's also possible that cabal-install needs a check too.\r\n\r\nBelow is the original bug report.\r\n\r\n----\r\n\r\nI was having trouble with the configure step for `old-time`, and decided to compare the behavior of 1.22 and 1.24. 1.22 works fine, but it appears that while 1.24 successfully finds the correct path to gcc, it mangles it when setting `CC` and invoking the `configure` script.\r\n\r\n```\r\n...\r\nUsing gcc version 5.2.0 found on system at:\r\nC:\\Users\\hudson\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-8.0.1\\mingw\\bin\\gcc.exe\r\n...\r\n\"C:\\cygwin\\bin\\sh.exe\" \"./configure\" \"--with-compiler=ghc\" \"--prefix=C:\\cygwin\\tmp\\old-time-1.1.0.3\\.cabal-sandbox\" \"--bindir=$prefix\\bin\" \"--libdir=$prefix\" \"--libexecdir=$prefix\\$libname\" \"--datadir=$prefix\" \"--sysconfdir=$prefix\\etc\" \"CC=C:\\Users\\hudson\\AppData\\Local\\Programs\\stack\\X86_64~1\\GHC-80~1.1\\mingw\\bin\\gcc.exe\"\r\n```\r\n\r\n(full log at https://gist.github.com/acfoltzer/01fc8238acaafbb99e557f7320fcc318)\r\n\r\nIt seems that `x86_64-windows` is getting mangled into `X86_64~1`, and `ghc-8.0.1` into `GHC-80~1.1`. I'm honestly baffled; any thoughts?"},"comment":{"url":"https://api.github.com/repos/haskell/cabal/issues/comments/236723677","html_url":"https://github.com/haskell/cabal/issues/3487#issuecomment-236723677","issue_url":"https://api.github.com/repos/haskell/cabal/issues/3487","id":236723677,"user":{"login":"ezyang","id":13564,"avatar_url":"https://avatars.githubusercontent.com/u/13564?v=3","gravatar_id":"","url":"https://api.github.com/users/ezyang","html_url":"https://github.com/ezyang","followers_url":"https://api.github.com/users/ezyang/followers","following_url":"https://api.github.com/users/ezyang/following{/other_user}","gists_url":"https://api.github.com/users/ezyang/gists{/gist_id}","starred_url":"https://api.github.com/users/ezyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezyang/subscriptions","organizations_url":"https://api.github.com/users/ezyang/orgs","repos_url":"https://api.github.com/users/ezyang/repos","events_url":"https://api.github.com/users/ezyang/events{/privacy}","received_events_url":"https://api.github.com/users/ezyang/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T22:11:18Z","updated_at":"2016-08-01T22:11:18Z","body":"We've realized that actually there was an unrelated bug in short path compilation, reported at #3649. @FPtje I think this was precisely your bug."}}
{"actor":{"display_login":"ezyang"}}