Using Cabal to install terminfo-0.4.0.0 breaks GHC on Debian x86_64

2014-04-13 Thread Ramin Honary
I am posting this to the mailing list, but it is a copy of a post I
originally made on Haskell Reddit.

http://www.reddit.com/r/haskell/comments/22wu92/problems_installing_ghc_782_on_debian_ubuntu_x86/


My GHC is working fine now. But there seem to be some changes in either GHC
7.8.2 or Cabal-1.18.1.3 that have broken some of the older packages in
Hackage.

*TL;DR* I discovered the Crypto-4.2.5.1 package is broken, and trying to
install terminfo-0.4.0.0 breaks GHC by over-writing the terminfo library
that came with the GHC tarball because isn't in the GHC package registry.

I downloaded the binary distribution from here:

https://www.haskell.org/ghc/dist/7.8.2/ghc-7.8.2-x86_64-unknown-linux-deb7.tar.bz2

and then immediately began re-building all of the packages in my
.cabal/packages/hackage.haskell.org/ direcotry.

I admit, all of my problems may be due to my Cabal config, but I haven't
had any problems with it before this, as far as I know it is the default
setup the option to build profiling libraries set to True.

The first problem I had was that Crypto-2.5.4.1 was not building files
correctly. *Some* of shared object files *.dyn_o were being built
*without* their accompanying *.dyn_hi files, although some of the
*.dyn_hi files did exist). When cabal tried to copy these *.dyn_hi
files to the global package registry during installation it would fail with
something about (for example) could not find RSA.dyn_hi. To solve this, I
rebuilt every *.dyn_o file that did not have an accompanying *.dyn_hi
by hand using the command

ghc -dynamic --make Codec.Binary.RSA

The resulting Codec/Binary/RSA.hi file was actually a dynamic interface
file but it's file extension was just .hi for some reason, (I double
checked by using ghc --show-iface) so I just copied it it the
dist/build/Codec/Binary/ directory. I did this for every *.hi file that
was supposed to be named *.dyn_hi. This included about 10 files. Again,
some *.dyn_o did build correctly with an accompanying *.dyn_hi, about
10 of the modules were built incorrectly, all the rest were OK.

The second problem I had was with installing Yi which relies on the
terminfo-0.4.0.0 package. The terminfo library that came with the GHC
7.8.2 binary distribution does not show up in the output of ghc-pkg list,
so Cabal tries to build it thinking it doesn't exist, and it overwrites the
existing terminfo-0.4.0.0 package with a library that contains missing
symbols. This causes GHC to completely stop working. The ghc program
immediately fails with an error:

symbol lookup error:
/usr/local/lib/ghc-7.8.2/bin/../haskeline-0.7.1.2/libHShaskeline-0.7.1.2-ghc7.8.2.so:
\
undefined symbol:
terminfozm0zi4zi0zi0_SystemziConsoleziTerminfoziCursor_moveDown5_info

I was able to solve this problem by simply copying the contents of:

ghc-7.8.2/libraries/terminfo/dist-install/build/*

from the source distribution tarball to the GHC installation directory:

/usr/local/lib/ghc-7.8.2/terminfo-0.4.0.0/

and that solved the problem. But any program depending on terminfo simply
will not install properly. The terminfo-0.4.0.0 package does not show up in
the output of ghc-pkg list, even though it comes with the GHC 7.8.2 tarball
and GHC relies on it. Attempting to install Terminfo will build a .so
file that GHC cannot use. *So don't install terminfo-0.4.0.0 from Hackage.*

Fortunately, Yi is not something that is absolutely necessary. I was able
to install every other package I needed (lens, diagrams, yesod, xmonad,
gtk) without incident.

But whatever changes have been made in ghc-7.8.2 and the accompanying
Cabal-1.18.1.3 seem to have broken some of the older Hackage packages.
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Using Cabal to install terminfo-0.4.0.0 breaks GHC on Debian x86_64

2014-04-13 Thread George Colpitts
I was able to do cabal install of  terminfo, crypto and Yi on my mac with
ghc 7.8.2 and cabal 1.18.1.3
yi seems to work although I did very little with it


On Sun, Apr 13, 2014 at 12:08 PM, Ramin Honary ramin.hon...@gmail.comwrote:

 I am posting this to the mailing list, but it is a copy of a post I
 originally made on Haskell Reddit.


 http://www.reddit.com/r/haskell/comments/22wu92/problems_installing_ghc_782_on_debian_ubuntu_x86/


 My GHC is working fine now. But there seem to be some changes in either
 GHC 7.8.2 or Cabal-1.18.1.3 that have broken some of the older packages in
 Hackage.

 *TL;DR* I discovered the Crypto-4.2.5.1 package is broken, and trying to
 install terminfo-0.4.0.0 breaks GHC by over-writing the terminfo library
 that came with the GHC tarball because isn't in the GHC package registry.

 I downloaded the binary distribution from here:


 https://www.haskell.org/ghc/dist/7.8.2/ghc-7.8.2-x86_64-unknown-linux-deb7.tar.bz2

 and then immediately began re-building all of the packages in my
 .cabal/packages/hackage.haskell.org/ direcotry.

 I admit, all of my problems may be due to my Cabal config, but I haven't
 had any problems with it before this, as far as I know it is the default
 setup the option to build profiling libraries set to True.

 The first problem I had was that Crypto-2.5.4.1 was not building files
 correctly. *Some* of shared object files *.dyn_o were being built
 *without* their accompanying *.dyn_hi files, although some of the
 *.dyn_hi files did exist). When cabal tried to copy these *.dyn_hi
 files to the global package registry during installation it would fail with
 something about (for example) could not find RSA.dyn_hi. To solve this, I
 rebuilt every *.dyn_o file that did not have an accompanying *.dyn_hi
 by hand using the command

 ghc -dynamic --make Codec.Binary.RSA

 The resulting Codec/Binary/RSA.hi file was actually a dynamic interface
 file but it's file extension was just .hi for some reason, (I double
 checked by using ghc --show-iface) so I just copied it it the
 dist/build/Codec/Binary/ directory. I did this for every *.hi file that
 was supposed to be named *.dyn_hi. This included about 10 files. Again,
 some *.dyn_o did build correctly with an accompanying *.dyn_hi, about
 10 of the modules were built incorrectly, all the rest were OK.

 The second problem I had was with installing Yi which relies on the
 terminfo-0.4.0.0 package. The terminfo library that came with the GHC
 7.8.2 binary distribution does not show up in the output of ghc-pkg list,
 so Cabal tries to build it thinking it doesn't exist, and it overwrites the
 existing terminfo-0.4.0.0 package with a library that contains missing
 symbols. This causes GHC to completely stop working. The ghc program
 immediately fails with an error:

 symbol lookup error: 
 /usr/local/lib/ghc-7.8.2/bin/../haskeline-0.7.1.2/libHShaskeline-0.7.1.2-ghc7.8.2.so:
  \
 undefined symbol: 
 terminfozm0zi4zi0zi0_SystemziConsoleziTerminfoziCursor_moveDown5_info

 I was able to solve this problem by simply copying the contents of:

 ghc-7.8.2/libraries/terminfo/dist-install/build/*

 from the source distribution tarball to the GHC installation directory:

 /usr/local/lib/ghc-7.8.2/terminfo-0.4.0.0/

 and that solved the problem. But any program depending on terminfo
 simply will not install properly. The terminfo-0.4.0.0 package does not
 show up in the output of ghc-pkg list, even though it comes with the GHC
 7.8.2 tarball and GHC relies on it. Attempting to install Terminfo will
 build a .so file that GHC cannot use. *So don't install
 terminfo-0.4.0.0 from Hackage.*

 Fortunately, Yi is not something that is absolutely necessary. I was able
 to install every other package I needed (lens, diagrams, yesod, xmonad,
 gtk) without incident.

 But whatever changes have been made in ghc-7.8.2 and the accompanying
 Cabal-1.18.1.3 seem to have broken some of the older Hackage packages.

 ___
 Glasgow-haskell-users mailing list
 Glasgow-haskell-users@haskell.org
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: ANNOUNCE: GHC version 7.8.2

2014-04-13 Thread Jens Petersen
On 12 April 2014 22:30, Austin Seipp aus...@well-typed.com wrote:


 https://www.haskell.org/ghc/docs/7.8.2/html/users_guide/release-7-8-2.html


Thank you very much!

I have built it for Fedora 20 in my Copr repo: 
https://copr.fedoraproject.org/coprs/petersen/ghc-7.8/.

(You can also install cabal-install-1.18 from 
https://copr.fedoraproject.org/coprs/petersen/cabal-install/)

We plan to add ghc-7.8 officially to Fedora 21: 
https://fedoraproject.org/wiki/Changes/GHC_7.8 (wip).

Jens
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Help with coercion roles?

2014-04-13 Thread Conal Elliott
I’m working on a GHC plugin (as part of my Haskell-to-hardware work) and
running into trouble with coercions  roles. Error message from Core Lint:

Warning: In the expression:

  LambdaCCC.Lambda.lamvP#
@ (GHC.Types.Bool → GHC.Types.Bool → GHC.Types.Bool → GHC.Types.Bool)
@ (Simple.HasIf GHC.Types.Bool)
tpl#
((LambdaCCC.Lambda.varP#
@ (GHC.Types.Bool → GHC.Types.Bool → GHC.Types.Bool → GHC.Types.Bool)
tpl#)
 `cast` (LambdaCCC.Lambda.EP_N (Sym (Simple.NTCo:HasIf[0]
GHC.Types.Bool_N))
 ∷ LambdaCCC.Lambda.EP
  (GHC.Types.Bool
   → GHC.Types.Bool → GHC.Types.Bool → GHC.Types.Bool)
  ~#
LambdaCCC.Lambda.EP (Simple.HasIf GHC.Types.Bool)))
 Role incompatibility: expected nominal, got representationalin
LambdaCCC.Lambda.EP_N (Sym (Simple.NTCo:HasIf[0]
GHC.Types.Bool_N))

Do you see anything inconsistent/incompatible in the coercions or roles
above? I constructed the nominal EP Refl coercion, and applied it (AppCo)
an existing coercion of a simpler type.

Thanks,
-- Conal
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users