broken on build encoding

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

broken on build encoding

Gang Yu
Hi, cafe,

   I always get the following build failure when I try to install encoding:

 Configuring encoding-0.6.4...
Warning: This package indirectly depends on multiple versions of the same
package. This is highly likely to cause a compile failure.
package haskell98-1.0.1.1 requires random-1.0.0.2
package HaXml-1.20.2 requires random-1.0.0.2
package random-1.0.0.2 requires time-1.1.4
package random-1.0.0.2 requires time-1.2.0.4
Preprocessing library encoding-0.6.4...
Building encoding-0.6.4...

Data/Encoding/ByteSource.hs:124:0:
     warning: extra tokens at end of #ifndef directive

Data/Encoding/ByteSink.hs:104:0:
     warning: extra tokens at end of #ifndef directive
[ 1 of 65] Compiling Data.Static      ( Data/Static.hs, dist/build/Data/Static.o )
[ 2 of 65] Compiling Data.Array.Static ( Data/Array/Static.hs, dist/build/Data/Array/Static.o )

Data/Array/Static.hs:14:35:
    Warning: Bindings containing unlifted types must use an outermost bang pattern:
                 { (I# ri) = index (s, e) i }
             *** This will be an error in GHC 6.14! Fix your code now!
    In the expression: let (I# ri) = index (s, e) i in extract addr ri
    In the definition of `!':
        ! (StaticArray s e addr) i
            = let (I# ri) = index ... i in extract addr ri
[ 3 of 65] Compiling Data.Map.Static  ( Data/Map/Static.hs, dist/build/Data/Map/Static.o )
[ 4 of 65] Compiling Control.Throws   ( Control/Throws.hs, dist/build/Control/Throws.o )
[ 5 of 65] Compiling Data.Encoding.Exception ( Data/Encoding/Exception.hs, dist/build/Data/Encoding/Exception.o )
[ 6 of 65] Compiling Data.Encoding.ByteSource ( Data/Encoding/ByteSource.hs, dist/build/Data/Encoding/ByteSource.o )

Data/Encoding/ByteSource.hs:151:17:
    Not in scope: data constructor `State'
cabal: Error: some packages failed to install:
encoding-0.6.4 failed during the building phase. The exception was:
ExitFailure 1https://mail.google.com/mail/?shva=1#compose

I manually installed a ghc-6.12.3, a ubuntu ghc-6.12.1, all the same?

anybody can provide helps? thanks

Gang

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: broken on build encoding

Daniel Fischer
On Monday 04 April 2011 16:19:46, Gang Yu wrote:

> Hi, cafe,
>
>    I always get the following build failure when I try to install
> encoding:
>
>  Configuring encoding-0.6.4...
> Warning: This package indirectly depends on multiple versions of the
> same package. This is highly likely to cause a compile failure.
> package haskell98-1.0.1.1 requires random-1.0.0.2
> package HaXml-1.20.2 requires random-1.0.0.2
> package random-1.0.0.2 requires time-1.1.4
> package random-1.0.0.2 requires time-1.2.0.4

That looks as though you have two random-1.0.0.2 packages (and two time
packages), probably one in the global package-db and one in the user-db.
haskell98 depends on the one in the global db and probably HaXml depends on
the one in the user-db.

For some package you installed (or did you perchance run cabal upgrade?),
cabal seems to have reinstalled random and time (possibly more), that's not
good.

Ask ghc-pkg about broken packages,
$ ghc-pkg check

You might need to remove packages from the user-db

> [ 6 of 65] Compiling Data.Encoding.ByteSource (
> Data/Encoding/ByteSource.hs, dist/build/Data/Encoding/ByteSource.o )
>
> Data/Encoding/ByteSource.hs:151:17:
>     Not in scope: data constructor `State'

You have mtl-2.*, but encoding would need mtl-1.* it seems, but it hasn't
put an upper bound on that dependency. Notify author/maintainer.

>
> I manually installed a ghc-6.12.3, a ubuntu ghc-6.12.1, all the same?
>
> anybody can provide helps? thanks

To circumvent the build failure, have an mtl-1.*, but no mtl-2.* available,
then it should build (or you could edit the source to replace all
occurrences of the data constructor State with the function state to make
it build with mtl-2.*).


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: broken on build encoding

Gang Yu
Hi Daniel,
To circumvent the build failure, have an mtl-1.*, but no mtl-2.* available,
then it should build (or you could edit the source to replace all
occurrences of the data constructor State with the function state to make
it build with mtl-2.*).

  It does not work, I cleaned up my ghc and unregistered the mtl-2.0.1.0, then reinstall encoding, it gets the following failure:

[ 6 of 65] Compiling Data.Encoding.ByteSource ( Data/Encoding/ByteSource.hs, dist/build/Data/Encoding/ByteSource.o )

Data/Encoding/ByteSource.hs:131:9:
    No instance for (Monad (Either DecodingException))
      arising from the superclasses of an instance declaration
                   at Data/Encoding/ByteSource.hs:131:9-61
    Possible fix:
      add an instance declaration for (Monad (Either DecodingException))
    In the instance declaration for `ByteSource
                                       (StateT [Char] (Either DecodingException))'

Data/Encoding/ByteSource.hs:141:13:
    No instance for (Monad (Either DecodingException))
      arising from a use of `get'
                   at Data/Encoding/ByteSource.hs:141:13-15
    Possible fix:
      add an instance declaration for (Monad (Either DecodingException))
    In a stmt of a 'do' expression: chs <- get
    In the expression:
        do { chs <- get;
             res <- act;
             put chs;
             return res }
    In the definition of `fetchAhead':
        fetchAhead act
                     = do { chs <- get;
                            res <- act;
                            put chs;
                            .... }

Data/Encoding/ByteSource.hs:160:9:
    No instance for (Monad (Either DecodingException))
      arising from the superclasses of an instance declaration
                   at Data/Encoding/ByteSource.hs:160:9-68
    Possible fix:
      add an instance declaration for (Monad (Either DecodingException))
    In the instance declaration for `ByteSource
                                       (StateT BS.ByteString (Either DecodingException))'

Data/Encoding/ByteSource.hs:171:9:
    No instance for (Monad (Either DecodingException))
      arising from the superclasses of an instance declaration
                   at Data/Encoding/ByteSource.hs:171:9-69
    Possible fix:
      add an instance declaration for (Monad (Either DecodingException))
    In the instance declaration for `ByteSource
                                       (StateT LBS.ByteString (Either DecodingException))'
cabal: Error: some packages failed to install:
encoding-0.6.4 failed during the building phase. The exception was:
ExitFailure 1
gang@gang-laptop:~$ ghc-pkg list
/var/lib/ghc-6.12.1/package.conf.d
   Cabal-1.8.0.2
   array-0.3.0.0
   base-3.0.3.2
   base-4.2.0.0
   bin-package-db-0.0.0.0
   bytestring-0.9.1.5
   containers-0.3.0.0
   directory-1.0.1.0
   dph-base-0.4.0
   dph-par-0.4.0
   dph-prim-interface-0.4.0
   dph-prim-par-0.4.0
   dph-prim-seq-0.4.0
   dph-seq-0.4.0
   extensible-exceptions-0.1.1.1
   filepath-1.1.0.3
   ghc-6.12.1
   ghc-binary-0.5.0.2
   ghc-prim-0.2.0.0
   haskell98-1.0.1.1
   hpc-0.5.0.4
   integer-gmp-0.2.0.0
   old-locale-1.0.0.2
   old-time-1.0.0.3
   pretty-1.0.1.1
   process-1.0.1.2
   random-1.0.0.2
   rts-1.0
   syb-0.1.0.2
   template-haskell-2.4.0.0
   time-1.1.4
   unix-2.4.0.0
   utf8-string-0.3.4
/home/gang/.ghc/i386-linux-6.12.1/package.conf.d
   HaXml-1.20.2
   binary-0.5.0.2
   directory-1.1.0.0
   mtl-1.1.0.2
   polyparse-1.5
   regex-base-0.93.2
   regex-compat-0.93.1
   regex-posix-0.94.4
   transformers-0.2.2.0

Thanks
Gang

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: broken on build encoding

Daniel Fischer
On Tuesday 05 April 2011 03:07:31, Gang Yu wrote:

> Hi Daniel,
>
> > To circumvent the build failure, have an mtl-1.*, but no mtl-2.*
> > available, then it should build (or you could edit the source to
> > replace all occurrences of the data constructor State with the
> > function state to make it build with mtl-2.*).
> >
>   It does not work, I cleaned up my ghc and unregistered the
>   mtl-2.0.1.0,
>
> then reinstall encoding, it gets the following failure:
>
> [ 6 of 65] Compiling Data.Encoding.ByteSource (
> Data/Encoding/ByteSource.hs, dist/build/Data/Encoding/ByteSource.o )
>
> Data/Encoding/ByteSource.hs:131:9:
>     No instance for (Monad (Either DecodingException))
<snip>
> cabal: Error: some packages failed to install:
> encoding-0.6.4 failed during the building phase. The exception was:
> ExitFailure 1

That seems to be related to a change in Monad instances, formerly, there
was an

instance (Error e) => Monad (Either e) where ...

defined in Control.Monad.Error, now there's an

instance Monad (Either e) where ...

defined in Control.Monad.Instances. So in Data.Encoding.ByteSource, there's
an

instance Monad (Either DecodingException) where ...

but that wouldn't work with the new instance, so it's conditionally
included per


#ifndef MIN_VERSION_mtl(2,0,0,0)
instance Monad (Either DecodingException) where
...
#endif

Apparently that doesn't work as expected, probably should be

#if !MIN_VERSION_mtl(2,0,0)

Short of changing the code, try installing encoding-0.6.3; that built with
ghc-6.12 on hackage, so it should work for you.

> gang@gang-laptop:~$ ghc-pkg list
> /var/lib/ghc-6.12.1/package.conf.d

>    directory-1.0.1.0

> /home/gang/.ghc/i386-linux-6.12.1/package.conf.d

>    directory-1.1.0.0

Unrelated, but that looks like trouble waiting for an opportunity to bite
you.

>
> Thanks
> Gang

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: broken on build encoding

Gang Yu

On Tue, Apr 5, 2011 at 5:10 PM, Daniel Fischer <[hidden email]> wrote:

Short of changing the code, try installing encoding-0.6.3; that built with
ghc-6.12 on hackage, so it should work for you.


Thanks, Daniel, it does work. I summarize as bundle of

ghc-6.12
mtl-1.1(no mtl-2)
encoding-0.6.3
 
works

Gang

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Problems with haskell98 package in GHC

Julian Porter
Hello,

I recently tried upgrading the package haskell98 to version 1.1.0.1.  Two things went wrong:

(1) Some of the time the build failed because it said it couldn't build time-1.2.0.4 (which I already had installed)
(2) Even when I finally managed to get it to build and install, compiling code led to this error message:

 Bad interface file: /usr/local/lib/haskell98-1.1.0.1/ghc-6.12.3/IO.hi
        Something is amiss; requested module  haskell98:IO differs from name found in the interface file haskell98-1.1.0.1:IO

I'm running GHC version 6.12.3.  Any help much appreciated.
 

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Problems with haskell98 package in GHC

Daniel Fischer
On Tuesday 05 April 2011 14:20:52, Julian Porter wrote:
> Hello,
>
> I recently tried upgrading the package haskell98 to version 1.1.0.1.

Don't. Basically, don't upgrade any libraries that come with GHC itself
(afaik, Cabal can be upgraded without causing havoc, everything(?) else
should only be upgraded when you know exactly what you're doing).

> Two things went wrong:
>
> (1) Some of the time the build failed because it said it couldn't build
> time-1.2.0.4 (which I already had installed)

time is one of GHC's bootlibs, it shouldn't be upgraded either. You'll get
some stuff depending on the original time and other stuff depending on the
new one, it won't work together, so things will break - unless you know
exactly what you're doing.

> (2) Even when I finally
> managed to get it to build and install, compiling code led to this
> error message:
>
>  Bad interface file: /usr/local/lib/haskell98-1.1.0.1/ghc-6.12.3/IO.hi
>         Something is amiss; requested module  haskell98:IO differs from
> name found in the interface file haskell98-1.1.0.1:IO

Something expected the haskell98 package that came with GHC and found the
newly installed, it seems.

Looks like you've done a global install and thus have overwritten the
original. I'm afraid that means you have to reinstall GHC, I know of no way
to fix it.

>
> I'm running GHC version 6.12.3.  Any help much appreciated.
>
> Julian Porter

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Problems with haskell98 package in GHC

Julian Porter
>
> Looks like you've done a global install and thus have overwritten the
> original. I'm afraid that means you have to reinstall GHC, I know of no way
> to fix it.

Thank you for the explanation.  Fortunately, the old version was still there in its own folder, so was able to unregister the new one and re-expose the old.
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe