Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems with Haskell and GHC
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
d135-1r43
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2005
Posts: 129

PostPosted: Thu Nov 20, 2008 2:06 pm    Post subject: Problems with Haskell and GHC Reply with quote

Running ghc-updater results in tons of errors. Neither cabal nor the other needed packages succeed to emerge.

All errors look like this:
Code:

[..]
[1 of 6] Compiling Codec.Binary.UTF8.String ( Codec/Binary/UTF8/String.hs, dist/build/Codec/Binary/UTF8/String.o )
[2 of 6] Compiling Codec.Binary.UTF8.Generic ( Codec/Binary/UTF8/Generic.hs, dist/build/Codec/Binary/UTF8/Generic.o )

Codec/Binary/UTF8/Generic.hs:48:18: Not in scope: `B.uncons'

Codec/Binary/UTF8/Generic.hs:58:18: Not in scope: `L.uncons'
 *
 * ERROR: dev-haskell/utf8-string-0.3.3 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 1399:  Called haskell-cabal_src_compile
 *             environment, line 1185:  Called cabal_src_compile
 *             environment, line  358:  Called cabal-build
 *             environment, line  271:  Called die
 * The specific snippet of code:
 *       ./setup build || die "setup build failed"
 *  The die message:
 *   setup build failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/dev-haskell:utf8-string-0.3.3:20081120-150318.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-haskell/utf8-string-0.3.3/temp/environment'.
 * This ebuild used the following eclasses from overlays:
 *   /usr/portage/local/layman/haskell/eclass/ghc-package.eclass
 *


Any ideas?
Back to top
View user's profile Send private message
Paczesiowa
Guru
Guru


Joined: 06 Mar 2006
Posts: 593
Location: Oborniki Śląskie, Poland

PostPosted: Thu Nov 20, 2008 2:56 pm    Post subject: Reply with quote

what versions of ghc and bytestring?
Back to top
View user's profile Send private message
d135-1r43
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2005
Posts: 129

PostPosted: Thu Nov 20, 2008 2:59 pm    Post subject: Reply with quote

Code:
# eix -e bytestring
[I] dev-haskell/bytestring [1]
     Available versions:  (~)0.8 (~)0.9.0.1 (~)0.9.0.1.1 (~)0.9.0.3 (~)0.9.0.4 (~)0.9.1.0 (~)0.9.1.3 (~)0.9.1.4 {doc profile}
     Installed versions:  0.9.1.4(16:10:41 11/20/08)(-doc -profile)
     Homepage:            http://www.cse.unsw.edu.au/~dons/fps.html
     Description:         Fast, packed, strict and lazy byte arrays with a list interface

[1] "gentoo-haskell" /usr/portage/local/layman/haskell


Code:

# eix -e ghc
[U] dev-lang/ghc
     Available versions:  6.2.2 6.2.2[1] 6.4.2 6.4.2[1] ~6.6 ~6.6[1] 6.6.1 6.6.1[1] 6.8.2 ~6.8.2[1] ~6.8.3[1] ~6.10.1[1] {X bash-completion binary doc ghcbootstrap ghcquickbuild openal opengl test}
     Installed versions:  6.6.1[1](13:32:30 11/20/08)(bash-completion -binary -doc -ghcbootstrap)
     Homepage:            http://www.haskell.org/ghc/
     Description:         The Glasgow Haskell Compiler

[1] "gentoo-haskell" /usr/portage/local/layman/haskell
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Thu Nov 20, 2008 4:33 pm    Post subject: Reply with quote

Rebuilding ghc stuff is often a pain, even with ghc-updater, since it doesn't do it's job properly really. Most times it involves guessing the involved packages and recompiling them in the correct order until the last one can be compiled. I use ghc 6.10.1, however I doubt that that will make a difference. A proper dependency system for haskell stuff would help I guess. But I don't know much about haskell so... :p
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
d135-1r43
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2005
Posts: 129

PostPosted: Thu Nov 20, 2008 6:29 pm    Post subject: Reply with quote

Okay, so let's begin with one obvious error of. I assume that all the other ones depend on that broken stm:

Code:
>>> Emerging (1 of 1) dev-haskell/stm-2.1.1.2 to /
 * stm-2.1.1.2.tar.gz RMD160 SHA1 SHA256 size ;-) ...                         [ ok ]
 * checking ebuild checksums ;-) ...                                          [ ok ]
 * checking auxfile checksums ;-) ...                                         [ ok ]
 * checking miscfile checksums ;-) ...                                        [ ok ]
 * checking stm-2.1.1.2.tar.gz ;-) ...                                        [ ok ]
>>> Unpacking source...
>>> Unpacking stm-2.1.1.2.tar.gz to /var/tmp/portage/dev-haskell/stm-2.1.1.2/work
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/dev-haskell/stm-2.1.1.2/work/stm-2.1.1.2 ...
 * Using cabal-1.2.3.0.
[1 of 1] Compiling Main             ( /var/tmp/portage/dev-haskell/stm-2.1.1.2/work/stm-2.1.1.2/Setup.hs, /var/tmp/portage/dev-haskell/stm-2.1.1.2/work/stm-2.1.1.2/Setup.o )
Linking setup ...
Configuring stm-2.1.1.2...
[b]setup: At least the following dependencies are missing:
    array -any[/b]
 *
 * ERROR: dev-haskell/stm-2.1.1.2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 1399:  Called haskell-cabal_src_compile
 *             environment, line 1185:  Called cabal_src_compile
 *             environment, line  357:  Called cabal-configure
 *             environment, line  288:  Called die
 * The specific snippet of code:
 *       ./setup configure --ghc --prefix=/usr --with-compiler="$(ghc-getghc)" --with-hc-pkg="$(ghc-getghcpkg)" --prefix=/usr --libdir=/usr/$(get_libdir) --libsubdir=${P}/ghc-$(ghc-version) --datadir=/usr/share/ --datasubdir=${P}/ghc-$(ghc-version) ${cabalconf} ${CABAL_CONFIGURE_FLAGS} "$@" || die "setup configure failed"
 *  The die message:
 *   setup configure failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/dev-haskell:stm-2.1.1.2:20081120-182753.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-haskell/stm-2.1.1.2/temp/environment'.
 * This ebuild used the following eclasses from overlays:
 *   /usr/portage/local/layman/haskell/eclass/ghc-package.eclass
 *


Any ideas what "array" refers to? I assume that the basic libs are shipped with ghc, so why is this dependency missing?
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Thu Nov 20, 2008 7:22 pm    Post subject: Reply with quote

I know that there's an Array lib that's shipped with ghc, but I don't know if that's what it's complaining about (it seems so, but again I have no idea about haskell).

I know that you probably tried that, but just in case: did you try recompiling ghc?
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
d135-1r43
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2005
Posts: 129

PostPosted: Thu Nov 20, 2008 7:24 pm    Post subject: Reply with quote

i92guboj wrote:
did you try recompiling ghc?


More than once.

Is that okay? That message appears every time I run emerge. The Haskell overlay obviously pulls in its own eclasses.

Code:
* Overlay eclass overrides eclass from PORTDIR:
 *
 *   '/usr/portage/local/layman/haskell/eclass/ghc-package.eclass'
 *
 * It is best to avoid overridding eclasses from PORTDIR because it will
 * trigger invalidation of cached ebuild metadata that is distributed with
 * the portage tree. If you must override eclasses from PORTDIR then you
 * are advised to run `emerge --regen` after each time that you run `emerge
 * --sync`. Set PORTAGE_ECLASS_WARNING_ENABLE="0" in /etc/make.conf if you
 * would like to disable this warning.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Thu Nov 20, 2008 7:35 pm    Post subject: Reply with quote

d135-1r43 wrote:
i92guboj wrote:
did you try recompiling ghc?


More than once.


I feared that would be the answer.

Quote:

Is that okay? That message appears every time I run emerge. The Haskell overlay obviously pulls in its own eclasses.


I am using that same overlay, because the stuff in portage was even worse the last time I checked. And it works for me. Of course, I always need to spend some time guessing here and there each time I want to upgrade xmonad. The key is "what's the package that we need to recompile now?". Sometimes it's frustrating.

Ops! I am looking at the stm ebuild, and it says

Code:
DEPEND=">=dev-lang/ghc-6.8"


Your eix above report that you have 6.6 installed. So maybe that's your problem. Make sure you update your layman overlays from time to time just in case.
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
d135-1r43
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2005
Posts: 129

PostPosted: Thu Nov 20, 2008 7:40 pm    Post subject: Reply with quote

If I use an unstable ghc then my depencies are screwed up because different packages need different versions of ghc. That is why I want to use an unstable stm that appears to run with ghc-6.8:

Code:

# cat stm-2.1.1.2.ebuild
[..]
DEPEND=">=dev-lang/ghc-6.6.1
                >=dev-haskell/cabal-1.2"


Is that a bug? Should it be >=dev-lang/ghc-6.10?
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Thu Nov 20, 2008 7:48 pm    Post subject: Reply with quote

I have no idea. I run ~arch for all of these and they work ok.

However, if stm has been configured not to use ghc-6.6.x there might be a reason why it is so. You seem to be running ghc-6.6.1 from overlay [1], as seen in your eix output.

Quote:

Installed versions: 6.6.1[1]


I would try to upgrade, to at least 6.8.x, I use ghc from portage (though it's 6.8.10), .10 was introduced a few days ago, previously I was using .8, and it worked just fine... It's the only guidance that I can give you.
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
Paczesiowa
Guru
Guru


Joined: 06 Mar 2006
Posts: 593
Location: Oborniki Śląskie, Poland

PostPosted: Thu Nov 20, 2008 7:55 pm    Post subject: Reply with quote

why do you use such old version of ghc? try 6.8 or 6.10
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Thu Nov 20, 2008 7:59 pm    Post subject: Reply with quote

By the way, I have a warning for you if you decide to upgrade. For me it was impossible to upgrade until I did it this way:

Code:
LC_ALL=C emerge -1 ghc


With my Spanish locale, the compilation crashed. I warn you just to prevent you from wasting your time (since the ghc compile time is long enough already as it is). Setting the locale to C just for the emerge command allowed me to compile it without problems. There's some stuff about this on bugzilla. I forgot about this and a few days ago I had the same problem while updating to .10, I then remembered the old trick and starting again with LC_ALL=C allowed me to update without any other problem.
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
d135-1r43
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2005
Posts: 129

PostPosted: Thu Nov 20, 2008 9:38 pm    Post subject: Reply with quote

I've solved some dependencies and upgraded ghc to 6.10.1. But some packages still fail, mainly because of that:

Code:
emerge -av network
>>> Emerging (1 of 1) dev-haskell/network-2.1.0.0 to /
 * network-2.1.0.0.tar.gz RMD160 SHA1 SHA256 size ;-) ...                     [ ok ]
 * checking ebuild checksums ;-) ...                                          [ ok ]
 * checking auxfile checksums ;-) ...                                         [ ok ]
 * checking miscfile checksums ;-) ...                                        [ ok ]
 * checking network-2.1.0.0.tar.gz ;-) ...                                    [ ok ]
>>> Unpacking source...
>>> Unpacking network-2.1.0.0.tar.gz to /var/tmp/portage/dev-haskell/network-2.1.0.0
/work
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/dev-haskell/network-2.1.0.0/work/network-2.
1.0.0 ...
 * Using cabal-1.6.0.1.
[1 of 1] Compiling Main             ( /var/tmp/portage/dev-haskell/network-2.1.0.0/w
ork/network-2.1.0.0/Setup.hs, /var/tmp/portage/dev-haskell/network-2.1.0.0/work/netw
ork-2.1.0.0/Setup.o )

/var/tmp/portage/dev-haskell/network-2.1.0.0/work/network-2.1.0.0/Setup.hs:3:0:
    Warning: In the use of `defaultUserHooks'
             (imported from Distribution.Simple):
             Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless you need
Cabal-1.2
             compatibility in which case you must stick with defaultUserHooks"
Linking setup ...
[..]
configure: creating ./config.status
config.status: creating network.buildinfo
config.status: creating include/HsNetworkConfig.h
config.status: include/HsNetworkConfig.h is unchanged
Preprocessing library network-2.1.0.0...
Building network-2.1.0.0...

Network/URI.hs:128:7:
    Could not find module `Data.Generics':
      it is a member of package base-3.0.3.0, which is hidden
 *
 * ERROR: dev-haskell/network-2.1.0.0 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 1399:  Called haskell-cabal_src_compile
 *             environment, line 1185:  Called cabal_src_compile
 *             environment, line  358:  Called cabal-build
 *             environment, line  271:  Called die
 * The specific snippet of code:
 *       ./setup build || die "setup build failed"
 *  The die message:
 *   setup build failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant
.
 * A complete build log is located at '/var/log/portage/dev-haskell:network-2.1.0.0:
20081120-211851.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-haskell/network-2
.1.0.0/temp/environment'.
 * This ebuild used the following eclasses from overlays:
 *   /usr/portage/local/layman/haskell/eclass/ghc-package.eclass
 *


Where does Data.Generics belong to and why the hell is "base" hidden?

I don't have any locale set, so i92guboj's tip is not applicable.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Thu Nov 20, 2008 10:04 pm    Post subject: Reply with quote

I'm not sure it's related, but try to recompile dev-haskell/regex-base. I have to recompile it for almost anything. I guess you already tried ghc-updater after installing the new ghc.
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
d135-1r43
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2005
Posts: 129

PostPosted: Thu Nov 20, 2008 10:22 pm    Post subject: Reply with quote

i92guboj wrote:
I'm not sure it's related, but try to recompile dev-haskell/regex-base. I have to recompile it for almost anything. I guess you already tried ghc-updater after installing the new ghc.


Jep, I did ghc-update and no, recompiling regex-base doesn't solve the problem.
Back to top
View user's profile Send private message
ttuegel
Apprentice
Apprentice


Joined: 18 Jan 2005
Posts: 176
Location: Illinois, USA

PostPosted: Fri Nov 21, 2008 11:13 am    Post subject: Reply with quote

d135-1r43 wrote:
I've solved some dependencies and upgraded ghc to 6.10.1.

Where does Data.Generics belong to and why the hell is "base" hidden?

I don't have any locale set, so i92guboj's tip is not applicable.


Did you reinstall Cabal after you upgraded GHC?

As for your earlier error compiling stm with GHC 6.6, when GHC 6.8 came out, the standard library was split from a single, monolithic package (base) into a monolithic package (base) and some associated packages (array, etc.). So, that's why you weren't able to compile a new package with an old GHC: the libraries are there, but all with different package names.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum