Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 537500 - dev-util/shellcheck: test suite hangs when Setup.hs compiled without -threaded
Summary: dev-util/shellcheck: test suite hangs when Setup.hs compiled without -threaded
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL: https://github.com/haskell/cabal/issu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-24 04:25 UTC by Michael Orlitzky
Modified: 2015-07-20 15:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Orlitzky gentoo-dev 2015-01-24 04:25:34 UTC
While working on bug #537468, I noticed something very strange. Running the shellcheck test suite "by hand" works:

  $ runghc Setup.hs test
  Running 1 test suites...
  Test suite test-shellcheck: RUNNING...
  Test suite test-shellcheck: PASS
  Test suite logged to: dist/test/ShellCheck-0.3.5-test-shellcheck.log
  1 of 1 test suites (1 of 1 test cases) passed.

But running it from a compiled ./setup does not:

  $ ghc Setup.hs -o setup
  [1 of 1] Compiling Main             ( Setup.hs, Setup.o )
  Linking setup ...
  $ ./setup test
  Running 1 test suites...
  Test suite test-shellcheck: RUNNING...
  ^C^C

The test suite spawns some other processes, I think. So I was playing around, and I noticed that I can make it work by compiling ./setup with -threaded:

  $ ghc -threaded Setup.hs -o setup
  Linking setup ...
  $ ./setup test
  Running 1 test suites...
  Test suite test-shellcheck: RUNNING...
  Test suite test-shellcheck: PASS
  Test suite logged to: dist/test/ShellCheck-0.3.5-test-shellcheck.log
  1 of 1 test suites (1 of 1 test cases) passed.

I have no idea what's going on here. Should we be compiling the ./setup binary with -threaded? Why doesn't it work without it?
Comment 1 Michael Orlitzky gentoo-dev 2015-01-30 01:04:48 UTC
This may be a Cabal bug, see the URL.
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2015-07-20 15:09:20 UTC
Pushed workaround as:

>  20 Jul 2015; Sergei Trofimovich <slyfox@gentoo.org> haskell-cabal.eclass:
>  Workaround upstream cabal tests hangup bug #537500 by Michael Orlitzky; use
>  ghc's haddock for doc generation.

https://github.com/gentoo-haskell/gentoo-haskell/commit/d7e07b594ef6ed0d78241cfaa369cafbff59f1f1