FS#55909 - [ghc] ghci does not start when "ghc-static" is not explicitely installed

Attached to Project: Community Packages
Opened by Philipp Claßen (PhCl) - Sunday, 08 October 2017, 01:55 GMT
Last edited by Ivy Foster (escondida) - Friday, 11 October 2019, 19:48 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

After installing "ghc", the REPL ghci does not start, as its dependence "ghc-static" is missing.
The package "ghc" has a dependence to "ghc-libs", but it should also depend on "ghc-static".

Additional info:
* ghc 8.2.1-2

Steps to reproduce:

On a fresh system, install "ghc" via pacman. It will install "ghc" and "ghc-libs", but not "ghc-static".

If you run "ghci", you should see this output:

phil@amd8-arch:~$ ghci
GHCi, version 8.2.1: http://www.haskell.org/ghc/ :? for help

<interactive>:1:19: error:
Not in scope: ‘System.IO.hSetBuffering’
No module named ‘System.IO’ is imported.

<interactive>:1:43: error:
Not in scope: ‘System.IO.stdin’
No module named ‘System.IO’ is imported.

<interactive>:1:60: error:
Not in scope: data constructor ‘System.IO.NoBuffering’
No module named ‘System.IO’ is imported.

<interactive>:1:81: error:
Not in scope: ‘GHC.Base.thenIO’
No module named ‘GHC.Base’ is imported.

<interactive>:1:99: error:
Not in scope: ‘System.IO.hSetBuffering’
No module named ‘System.IO’ is imported.

<interactive>:1:123: error:
Not in scope: ‘System.IO.stdout’
No module named ‘System.IO’ is imported.

<interactive>:1:140: error:
Not in scope: data constructor ‘System.IO.NoBuffering’
No module named ‘System.IO’ is imported.

<interactive>:1:161: error:
Not in scope: ‘GHC.Base.thenIO’
No module named ‘GHC.Base’ is imported.

<interactive>:1:179: error:
Not in scope: ‘System.IO.hSetBuffering’
No module named ‘System.IO’ is imported.

<interactive>:1:203: error:
Not in scope: ‘System.IO.stderr’
No module named ‘System.IO’ is imported.

<interactive>:1:220: error:
Not in scope: data constructor ‘System.IO.NoBuffering’
No module named ‘System.IO’ is imported.


After installing "ghc-static", it starts normally:

phil@amd8-arch:~$ ghci
GHCi, version 8.2.1: http://www.haskell.org/ghc/ :? for help
Prelude> 3 + 3
6
This task depends upon

Closed by  Ivy Foster (escondida)
Friday, 11 October 2019, 19:48 GMT
Reason for closing:  Fixed
Comment by Doug Newgard (Scimmia) - Sunday, 08 October 2017, 16:50 GMT
I know you have to specifically tell ghc to use dynamic linking. Is there is similar option or CLI switch for ghci?
Comment by Levente Polyak (anthraxx) - Sunday, 08 October 2017, 16:57 GMT
Something else may be going on, I can't reproduce over here:

> pacman -Qi ghc-static |grep Version
error: package 'ghc-static' was not found

> pacman -Qi ghc |grep Version
Version : 8.2.1-2

> ghci
GHCi, version 8.2.1: http://www.haskell.org/ghc/ :? for help
Prelude> 3 + 3
6
Prelude>
Leaving GHCi.
Comment by Philipp Claßen (PhCl) - Monday, 09 October 2017, 17:13 GMT
Not sure if it makes a difference, but I want to add that I don't have Cabal installed.

Also I have the same problem on my system when I downgrade to ghc-8.0.2-3. Version 8.0.1-1 is not affected, though.
Comment by Felix Yan (felixonmars) - Monday, 09 October 2017, 17:18 GMT
I cannot reproduce either. Is it still the case if you rename ~/.ghc?
Comment by Philipp Claßen (PhCl) - Monday, 09 October 2017, 17:24 GMT
Yes, same error after moving away "~/.ghc".

Strange. Well, if I'm the only one with the problem, I can install ghc-static and it works for me. Let's see if there are more with the problem. Otherwise, we could also close it if no one can reproduce it.
Comment by Levente Polyak (anthraxx) - Monday, 09 October 2017, 17:52 GMT
which version of ghc-libs do you have installed. and just to be sure: there are no custom repositories activated like haskell repo or such?
Comment by Philipp Claßen (PhCl) - Monday, 09 October 2017, 18:33 GMT
$ pacman -Q | grep ghc
ghc 8.2.1-2
ghc-libs 8.2.1-2

I have not enabled haskell-core on that machine.
Comment by Ivy Foster (escondida) - Friday, 11 October 2019, 00:09 GMT
PhCI, do you still experience the issue? I couldn't reproduce it, either, installing just ghc.
Comment by Philipp Claßen (PhCl) - Friday, 11 October 2019, 19:42 GMT
No, I can no longer reproduce. I removed ghc-static but ghci (8.6.5) still starts normally. I'm not aware that I changed anything relevant in my system.

Looks good now. Feel free it close it, and thanks for investigating!
Comment by Ivy Foster (escondida) - Friday, 11 October 2019, 19:48 GMT
Thanks for following up, PhCI. Much appreciated!

Loading...