{"action":"created","issue":{"url":"https://api.github.com/repos/haskell/cabal/issues/2339","labels_url":"https://api.github.com/repos/haskell/cabal/issues/2339/labels{/name}","comments_url":"https://api.github.com/repos/haskell/cabal/issues/2339/comments","events_url":"https://api.github.com/repos/haskell/cabal/issues/2339/events","html_url":"https://github.com/haskell/cabal/issues/2339","id":53933311,"number":2339,"title":"Linker problem when installing alex on CentOS 5 with newer cabal-install","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":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-01-10T00:13:14Z","updated_at":"2015-01-12T20:30:49Z","closed_at":null,"body":"Okay, yikes, esoteric issue title, I know.\r\n\r\nOn a 32-bit CentOS 5 machine, I've got three installations of `cabal-install` and `Cabal`:\r\n\r\n```\r\n$ /opt/ghc-7.6.3/bin/cabal --version\r\ncabal-install version 1.18.0.3\r\nusing version 1.18.1.3 of the Cabal library\r\n$ /opt/ghc-7.8.3/bin/cabal --version\r\ncabal-install version 1.20.0.3\r\nusing version 1.20.0.1 of the Cabal library\r\n$ cabal --version\r\ncabal-install version 1.22.0.0\r\nusing version 1.22.0.0 of the Cabal library\r\n```\r\n\r\nKeeping GHC versions the same at 7.8.3, just switching `cabal`s, I try installing `alex` into a fresh sandbox. The 1.18.0.3 install goes swimmingly. The 1.20.0.3 and 1.22.0.0 installs however fail to link the `alex` executable at the end of the build:\r\n\r\n```\r\n...\r\nLinking dist/dist-sandbox-79015d48/build/alex/alex ...\r\n/tmp/tmp.ISEzb16554/.cabal-sandbox/lib/i386-linux-ghc-7.8.3/tf-random-0.5/libHStf-random-0.5.a(Gen.o):(.text+0x3bb): undefined reference to `Threefish_256_Process_Block'\r\n/tmp/tmp.ISEzb16554/.cabal-sandbox/lib/i386-linux-ghc-7.8.3/tf-random-0.5/libHStf-random-0.5.a(Gen.o):(.text+0x543): undefined reference to `Threefish_256_Process_Block'\r\n/tmp/tmp.ISEzb16554/.cabal-sandbox/lib/i386-linux-ghc-7.8.3/tf-random-0.5/libHStf-random-0.5.a(Gen.o):(.text+0x883): undefined reference to `Threefish_256_Process_Block'\r\n/tmp/tmp.ISEzb16554/.cabal-sandbox/lib/i386-linux-ghc-7.8.3/tf-random-0.5/libHStf-random-0.5.a(Gen.o):(.text+0xb9f): undefined reference to `Threefish_256_Process_Block'\r\n/tmp/tmp.ISEzb16554/.cabal-sandbox/lib/i386-linux-ghc-7.8.3/tf-random-0.5/libHStf-random-0.5.a(Gen.o):(.text+0xd5b): undefined reference to `Threefish_256_Process_Block'\r\n/tmp/tmp.ISEzb16554/.cabal-sandbox/lib/i386-linux-ghc-7.8.3/tf-random-0.5/libHStf-random-0.5.a(Gen.o):(.text+0xee3): more undefined references to `Threefish_256_Process_Block' follow\r\ncollect2: ld returned 1 exit status\r\nFailed to install alex-3.1.4\r\nUpdating world file...\r\ncabal: Error: some packages failed to install:\r\nalex-3.1.4 failed during the building phase. The exception was:\r\nExitFailure 1\r\n```\r\n\r\nI notice that the final invocation of `ghc` to build the executable has more linker flags in the newer versions. Maybe something is causing the linker to miss the symbol from `tf-random`'s cbits?\r\n\r\nI've posted full logs here: https://gist.github.com/acfoltzer/c46274098956d03e6f79\r\n\r\nIt's worth noting that this does not occur on a similarly-configured 64-bit machine, nor any of our newer CentOS machines.\r\n\r\nThanks for any ideas you might have."},"comment":{"url":"https://api.github.com/repos/haskell/cabal/issues/comments/69640126","html_url":"https://github.com/haskell/cabal/issues/2339#issuecomment-69640126","issue_url":"https://api.github.com/repos/haskell/cabal/issues/2339","id":69640126,"user":{"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},"created_at":"2015-01-12T20:30:49Z","updated_at":"2015-01-12T20:30:49Z","body":">  I don't mind adding this check, but am wondering if cabal has a pattern for checking tool versions like that (I've never messed with the source before)\r\n\r\nYes, look at [`tarProgram`](https://github.com/haskell/cabal/blob/master/Cabal/Distribution/Simple/Program/Builtin.hs#L323) for an example, where we check whether it supports `--format`."}}