haskell / haskell/cabal

cabal should tell hsc2hs where to find gcc

Open
#1,858 1 comment 0 reactions 0 assignees View on GitHub
meta: easy type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

I'm not sure where things break down, but you can see that hsc2hs gets `gcc` from the PATH by doing something roughly like this:

```
touch ~/.cabal/bin/gcc; chmod a+x ~/.cabal/bin/gcc; hash -r
mkdir hsctest; cd hsctest
cabal init # make a library, but it doesn't matter
touch LICENSE
cat > Bar.hs < Foo.hsc <

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the hsctest.cabal project, Bar.hs, and Foo.hsc using the two cabal install commands. Start by tracing how hsc2hs locates gcc during the Foo.hsc build and compare that with ghc's behavior; done means a PATH entry named gcc cannot silently control hsc2hs when the compiler already identifies the toolchain.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.