Skip to content

hsc2hs broken due to incorrect argument passing to the hsc2hs executable

Currently packages with .hsc files can't be built with GHC HEAD on some systems becuase of a problem in hsc2hs wrapper script. I don't understand the problem good enough, but we did some debugging with hvr today and he asked me to file a ticket. Here's how to reproduce:

regex-posix-0.95.2 $ cabal new-build --with-ghc=/home/omer/haskell/ghc/inplace/bin/ghc-stage2
Warning: Unknown/unsupported 'ghc' version detected (Cabal 2.4.0.1 supports
'ghc' version < 8.7): /home/omer/haskell/ghc/inplace/bin/ghc-stage2 is version
8.7.20181017
Warning: The package list for 'hackage.haskell.org' is 22 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...
Build profile: -w ghc-8.7.20181017 -O1
In order, the following will be built (use -v for more details):
 - regex-posix-0.95.2 (lib:regex-posix) (first run)
Warning: regex-posix.cabal:6:1: The field "build-type" is specified more than
once at positions 6:1, 19:1
Configuring regex-posix-0.95.2...
Preprocessing library for regex-posix-0.95.2..
hsc2hs: @/home/omer/haskell/regex-posix-0.95.2/dist-newstyle/build/x86_64-linux/ghc-8.7.20181017/regex-posix-0.95.2/build/Text/Regex/Posix/hsc2hs-response17101-2.txt: openBinaryFile: does not exist (No such file or directory)

As far as I understand, the problem is that the script runs hsc2hs -- @foo instead of hsc2hs @foo. Hopefully hvr will correct if I misunderstood.

Trac metadata
Trac field Value
Version
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information