{"action":"created","issue":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/1189","repository_url":"https://api.github.com/repos/commercialhaskell/stack","labels_url":"https://api.github.com/repos/commercialhaskell/stack/issues/1189/labels{/name}","comments_url":"https://api.github.com/repos/commercialhaskell/stack/issues/1189/comments","events_url":"https://api.github.com/repos/commercialhaskell/stack/issues/1189/events","html_url":"https://github.com/commercialhaskell/stack/issues/1189","id":111998428,"number":1189,"title":"stack fails to install `old-time` on Windows if ghc is specified in PATH","user":{"login":"foreverbell","id":3240173,"avatar_url":"https://avatars.githubusercontent.com/u/3240173?v=3","gravatar_id":"","url":"https://api.github.com/users/foreverbell","html_url":"https://github.com/foreverbell","followers_url":"https://api.github.com/users/foreverbell/followers","following_url":"https://api.github.com/users/foreverbell/following{/other_user}","gists_url":"https://api.github.com/users/foreverbell/gists{/gist_id}","starred_url":"https://api.github.com/users/foreverbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foreverbell/subscriptions","organizations_url":"https://api.github.com/users/foreverbell/orgs","repos_url":"https://api.github.com/users/foreverbell/repos","events_url":"https://api.github.com/users/foreverbell/events{/privacy}","received_events_url":"https://api.github.com/users/foreverbell/received_events","type":"User","site_admin":false},"labels":[{"id":245002380,"url":"https://api.github.com/repos/commercialhaskell/stack/labels/component:%20windows","name":"component: windows","color":"bfdadc","default":false},{"id":222272034,"url":"https://api.github.com/repos/commercialhaskell/stack/labels/type:%20discuss","name":"type: discuss","color":"fad8c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2015-10-18T03:17:42Z","updated_at":"2016-11-08T00:26:18Z","closed_at":null,"body":"Hello. \n\nI am using stack 0.1.6.0(`e22271f5ce9afa2cb5be3bad9cafa392c623f85c (2313 commits) x86_64`) on Windows 8.1, and was installing `old-time` by `stack install old-time`.\n\nFor some convenience reason, I put ghc binary path provided by stack in my PATH environment variable, i.e. `STACK_PATH\\x86_64-windows\\ghc-7.10.2\\bin` (where `STACK_PATH=D:\\Dev\\stack` in this case). However, `old-time` fails to install, with the following output  \n\n```\nC:\\Users\\foreverbell>stack install old-time\nRun from outside a project, using implicit global project config\nUsing resolver: lts-3.9 from implicit global project's config file: C:\\Users\\foreverbell\\AppData\\Roaming\\stack\\global-project\\stack.yaml\nSetting codepage to UTF-8 (65001) to ensure correct output from GHC\nold-locale-1.0.0.7: configure\nold-locale-1.0.0.7: build\nold-locale-1.0.0.7: install\nold-time-1.1.0.3: configure\nold-time-1.1.0.3: build\nCompleted\n--  While building package old-time-1.1.0.3 using:\n      C:\\Users\\FOREVE~1\\AppData\\Local\\Temp\\stack2056\\old-time-1.1.0.3\\.stack-work\\dist\\d96ab9d9\\setup\\setup --builddir=.stack-work\\dist\\d96ab9d9\\ build --ghc-options \" -ddump-hi -ddump-to-file\"\n    Process exited with code: ExitFailure 1\n    Logs have been written to: C:\\Users\\foreverbell\\AppData\\Roaming\\stack\\global-project\\.stack-work\\logs\\old-time-1.1.0.3.log\n\n    [1 of 1] Compiling Main             ( C:\\Users\\FOREVE~1\\AppData\\Local\\Temp\\stack2056\\old-time-1.1.0.3\\Setup.hs, C:\\Users\\FOREVE~1\\AppData\\Local\\Temp\\stack2056\\old-time-1.1.0.3\\.stack-work\\dist\\d96ab9d9\\setup\\Main.o )\n    Linking C:\\Users\\FOREVE~1\\AppData\\Local\\Temp\\stack2056\\old-time-1.1.0.3\\.stack-work\\dist\\d96ab9d9\\setup\\setup.exe ...\n    Configuring old-time-1.1.0.3...\n    configure: WARNING: unrecognized options: --with-compiler, --with-gcc\n    checking for gcc... gcc\n    checking whether the C compiler works... yes\n    checking for C compiler default output file name... a.exe\n    checking for suffix of executables... .exe\n    checking whether we are cross compiling... no\n    checking for suffix of object files... o\n    checking whether we are using the GNU C compiler... yes\n    checking whether gcc accepts -g... yes\n    checking for gcc option to accept ISO C89... none needed\n    checking how to run the C preprocessor... gcc -E\n    checking for grep that handles long lines and -e... /usr/bin/grep\n    checking for egrep... /usr/bin/grep -E\n    checking for ANSI C header files... yes\n    checking for sys/types.h... yes\n    checking for sys/stat.h... yes\n    checking for stdlib.h... yes\n    checking for string.h... yes\n    checking for memory.h... yes\n    checking for strings.h... yes\n    checking for inttypes.h... yes\n    checking for stdint.h... yes\n    checking for unistd.h... yes\n    checking sys/time.h usability... yes\n    checking sys/time.h presence... yes\n    checking for sys/time.h... yes\n    checking sys/timeb.h usability... yes\n    checking sys/timeb.h presence... yes\n    checking for sys/timeb.h... yes\n    checking time.h usability... yes\n    checking time.h presence... yes\n    checking for time.h... yes\n    checking for ftime... yes\n    checking for gmtime_r... yes\n    checking for localtime_r... yes\n    checking for gettimeofday... yes\n    checking whether struct tm is in sys/time.h or time.h... time.h\n    checking for struct tm.tm_zone... yes\n    checking whether time.h and sys/time.h may both be included... yes\n    checking for sys/time.h... (cached) yes\n    checking whether altzone is declared... no\n    configure: creating ./config.status\n    config.status: creating include/HsTimeConfig.h\n    configure: WARNING: unrecognized options: --with-compiler, --with-gcc\n    Building old-time-1.1.0.3...\n    Preprocessing library old-time-1.1.0.3...\n    Time.hsc: In function 'main':\n    Time.hsc:361:5: error: 'struct tm' has no member named 'tm_zone'\n    Time.hsc:362:5: error: 'struct tm' has no member named 'tm_gmtoff'\n    compiling .stack-work\\dist\\d96ab9d9\\build\\System\\Time_hsc_make.c failed (exit code 1)\n    command was: D:\\Dev\\stack\\x86_64-windows\\ghc-7.10.2\\mingw\\bin\\gcc.exe -c .stack-work\\dist\\d96ab9d9\\build\\System\\Time_hsc_make.c -o .stack-work\\dist\\d96ab9d9\\build\\System\\Time_hsc_make.o -D__GLASGOW_HASKELL__=710 -Dmingw32_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Dmingw32_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -Iinclude -I.stack-work\\dist\\d96ab9d9\\build\\autogen -include .stack-work\\dist\\d96ab9d9\\build\\autogen\\cabal_macros.h -ID:\\Dev\\stack\\x86_64-windows\\ghc-7.10.2\\lib\\base_GDytRqRVSUX7zckgKqJjgw\\include -ID:\\Dev\\stack\\x86_64-windows\\ghc-7.10.2\\lib\\integ_2aU3IZNMF9a7mQ0OzsZ0dS\\include -ID:\\Dev\\stack\\x86_64-windows\\ghc-7.10.2\\lib/include -ID:\\Dev\\stack\\x86_64-windows\\ghc-7.10.2/lib/include/\n```\n\nIf the PATH is clean without ghc, everything works okay. \n\nIt is a bug?\n"},"comment":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/comments/259007809","html_url":"https://github.com/commercialhaskell/stack/issues/1189#issuecomment-259007809","issue_url":"https://api.github.com/repos/commercialhaskell/stack/issues/1189","id":259007809,"user":{"login":"mgsloan","id":22570,"avatar_url":"https://avatars.githubusercontent.com/u/22570?v=3","gravatar_id":"","url":"https://api.github.com/users/mgsloan","html_url":"https://github.com/mgsloan","followers_url":"https://api.github.com/users/mgsloan/followers","following_url":"https://api.github.com/users/mgsloan/following{/other_user}","gists_url":"https://api.github.com/users/mgsloan/gists{/gist_id}","starred_url":"https://api.github.com/users/mgsloan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgsloan/subscriptions","organizations_url":"https://api.github.com/users/mgsloan/orgs","repos_url":"https://api.github.com/users/mgsloan/repos","events_url":"https://api.github.com/users/mgsloan/events{/privacy}","received_events_url":"https://api.github.com/users/mgsloan/received_events","type":"User","site_admin":false},"created_at":"2016-11-08T00:26:18Z","updated_at":"2016-11-08T00:26:18Z","body":"@normenmueller Not sure what could cause that.  Could try doing the install again.  This'd look like deleting the `C:\\Users\\NORMEN~1.MUE\\AppData\\Local\\Programs\\stack\\X86_64~1\\GHC-80~1.1` folder and files with the name `GHC-*.installed`?  Then try running setup again."}}
{"actor":{"display_login":"mgsloan"}}