{"action":"created","issue":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/3487","repository_url":"https://api.github.com/repos/commercialhaskell/stack","labels_url":"https://api.github.com/repos/commercialhaskell/stack/issues/3487/labels{/name}","comments_url":"https://api.github.com/repos/commercialhaskell/stack/issues/3487/comments","events_url":"https://api.github.com/repos/commercialhaskell/stack/issues/3487/events","html_url":"https://github.com/commercialhaskell/stack/issues/3487","id":265397046,"node_id":"MDU6SXNzdWUyNjUzOTcwNDY=","number":3487,"title":"Stack build causing linker error on Mac OSX Sierra","user":{"login":"td-ideabox","id":10654424,"node_id":"MDQ6VXNlcjEwNjU0NDI0","avatar_url":"https://avatars1.githubusercontent.com/u/10654424?v=4","gravatar_id":"","url":"https://api.github.com/users/td-ideabox","html_url":"https://github.com/td-ideabox","followers_url":"https://api.github.com/users/td-ideabox/followers","following_url":"https://api.github.com/users/td-ideabox/following{/other_user}","gists_url":"https://api.github.com/users/td-ideabox/gists{/gist_id}","starred_url":"https://api.github.com/users/td-ideabox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/td-ideabox/subscriptions","organizations_url":"https://api.github.com/users/td-ideabox/orgs","repos_url":"https://api.github.com/users/td-ideabox/repos","events_url":"https://api.github.com/users/td-ideabox/events{/privacy}","received_events_url":"https://api.github.com/users/td-ideabox/received_events","type":"User","site_admin":false},"labels":[{"id":273325101,"node_id":"MDU6TGFiZWwyNzMzMjUxMDE=","url":"https://api.github.com/repos/commercialhaskell/stack/labels/component:%20os%20x","name":"component: os x","color":"bfdadc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2017-10-13T19:34:54Z","updated_at":"2018-10-31T11:51:09Z","closed_at":null,"author_association":"NONE","body":"macOS 10.12.6 (16G29) (Sierra)\r\nFresh uninstall/reinstall of XCode (accepted terms)\r\nbrew as package manager\r\n\r\nI blew away all stuff related to ghc, stack, and cabal and then installed this way\r\nhttps://haskell-lang.org/get-started\r\n\r\nWriting the little HelloWorld.hs script worked fine and showed `Hello, World`\r\n\r\nHowever, doing\r\n\r\n```\r\nstack new someproj\r\ncd someproj\r\nstack build\r\n```\r\n\r\nResulted in this:\r\n\r\n    ➜  someproj stack build\r\n    [1 of 2] Compiling Main             ( /Users/trevord2/.stack/setup-exe-src/setup-mPHDZzAJ.hs, /Users/trevord2/.stack/setup-exe-src/setup-mPHDZzAJ.o )\r\n    [2 of 2] Compiling StackSetupShim   ( /Users/trevord2/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /Users/trevord2/.stack/setup-exe-src/setup-shim-mPHDZzAJ.o )\r\n    Linking /Users/trevord2/.stack/setup-exe-cache/x86_64-osx/tmp-Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 ...\r\n    someproj-0.1.0.0: configure (lib + exe)\r\n    Configuring someproj-0.1.0.0...\r\n    someproj-0.1.0.0: build (lib + exe)\r\n    Preprocessing library someproj-0.1.0.0...\r\n    [1 of 1] Compiling Lib              ( src/Lib.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Lib.o )\r\n    Preprocessing executable 'someproj-exe' for someproj-0.1.0.0...\r\n    [1 of 1] Compiling Main             ( app/Main.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/someproj-exe/someproj-exe-tmp/Main.o )\r\n    Linking .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/someproj-exe/someproj-exe ...\r\n    ld: warning: ignoring file /Users/trevord2/someproj/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/libHSsomeproj-0.1.0.0-6corWoTDCA69pE1sqNF8Id.a, file was built for archive which is not the architecture being linked (x86_64): /Users/trevord2/someproj/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/libHSsomeproj-0.1.0.0-6corWoTDCA69pE1sqNF8Id.a\r\n    Undefined symbols for architecture x86_64:\r\n      \"_someprojzm0zi1zi0zi0zm6corWoTDCA69pE1sqNF8Id_Lib_someFunc1_closure\", referenced from:\r\n          _Main_main1_info in Main.o\r\n          _S39Z_srt in Main.o\r\n      \"_someprojzm0zi1zi0zi0zm6corWoTDCA69pE1sqNF8Id_Lib_someFunc1_info\", referenced from:\r\n          _Main_main_info in Main.o\r\n    ld: symbol(s) not found for architecture x86_64\r\n    clang: error: linker command failed with exit code 1 (use -v to see invocation)\r\n    `gcc' failed in phase `Linker'. (Exit code: 1)\r\n    \r\n    --  While building package someproj-0.1.0.0 using:\r\n          /Users/trevord2/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 build lib:someproj exe:someproj-exe --ghc-options \" -ddump-hi -ddump-to-file\"\r\n        Process exited with code: ExitFailure 1\r\n\r\n\r\n### Expected\r\n\r\nSuccessful `stack build`\r\n\r\n### Stack version\r\n\r\n```\r\nVersion 1.5.1, Git revision 600c1f01435a10d127938709556c1682ecfd694e (4861 commits) x86_64 hpack-0.17.1\r\n```\r\n\r\n### Method of installation\r\n\r\nhttps://haskell-lang.org/get-started\r\n"},"comment":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/comments/434658198","html_url":"https://github.com/commercialhaskell/stack/issues/3487#issuecomment-434658198","issue_url":"https://api.github.com/repos/commercialhaskell/stack/issues/3487","id":434658198,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDY1ODE5OA==","user":{"login":"dbaynard","id":870937,"node_id":"MDQ6VXNlcjg3MDkzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/870937?v=4","gravatar_id":"","url":"https://api.github.com/users/dbaynard","html_url":"https://github.com/dbaynard","followers_url":"https://api.github.com/users/dbaynard/followers","following_url":"https://api.github.com/users/dbaynard/following{/other_user}","gists_url":"https://api.github.com/users/dbaynard/gists{/gist_id}","starred_url":"https://api.github.com/users/dbaynard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbaynard/subscriptions","organizations_url":"https://api.github.com/users/dbaynard/orgs","repos_url":"https://api.github.com/users/dbaynard/repos","events_url":"https://api.github.com/users/dbaynard/events{/privacy}","received_events_url":"https://api.github.com/users/dbaynard/received_events","type":"User","site_admin":false},"created_at":"2018-10-31T11:51:09Z","updated_at":"2018-10-31T11:51:09Z","author_association":"CONTRIBUTOR","body":"I think #4366 resolves this (there's a workaround). @soulomoon would you confirm, please, and then close if it does?"}}
{"actor":{"display_login":"dbaynard"}}