You are not logged in.

#1 2018-06-29 15:07:50

greatBigDot
Member
Registered: 2018-06-29
Posts: 2

How does one get Haskell working on Arch?

I've been trying for a while now to get Haskell and related tools completely working on my Arch Linux laptop. Following advice I've found elsewhere online, I've been partially successful various times, with bits and pieces working, but never the whole thing---whenever I, for example, try to get a new package from Hackage, I inevitably have to run through another gauntlet or two.

On the advice of folks at the #agda IRC channel, I tried removing all Haskell-related things installed by pacman, then downloaded the Haskell Platform (Core, 64-bit) directly: https://www.haskell.org/platform/linux. … ux-generic. Unfortunately, despite some promising early successes, this has failed as well. After extracting and installing the Platform (and dealing with some versioning issues that cropped up regarding "ncurses" and "libtinfo"), I tried running "cabal install idris". It didn't work. I was met with several hundred thousand lines of errors, all variations on:

    /usr/local/haskell/ghc-8.4.3-x86_64/lib/ghc-8.4.3/Cabal-2.2.0.1/libHSCabal-2.2.0.1.a(Simple.o):
    requires unsupported dynamic reloc 11; recompile with -fPIC

(Note that I'm not being hyperbolic; I wrote the standard error to a log file and ended up with a file 128,654 lines long. It appears to be almost entirely endless repetitions of the above, albeit with different words appearing in the parenthesized section.) After doing some more digging, the problems appear to stem from a couple of the dependencies of idris, namely:

    zlib-0.6.2
    system-filepath-0.4.14

The latter appears to be the source of the overzealous error messages. The former appears to have a different error entirely (which thankfully isn't repeated ad nauseam):

    /usr/bin/ld.gold: fatal error: -pie and -r are incompatible
    collect2: error: ld returned 1 exit status
    `gcc' failed in phase `Linker'. (Exit code: 1)
    cabal: Leaving directory '/tmp/cabal-tmp-3051/zlib-0.6.2'
    cabal: Error: some packages failed to install:
    zlib-0.6.2-5t89gesQUWsKgPz4IjNOwP failed during the building phase. The
    exception was:
    ExitFailure 1

________

I have no idea what is going on with the above errors; does anyone know what can be done from here? Or, better yet, does anyone know an error-free path that ends up with a completely working Haskell installation (ghc, cabal, stack, etc.) on an Arch system? Thanks.

Offline

#2 2018-06-29 15:12:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,657

Re: How does one get Haskell working on Arch?

There are several notes on how to deal with various forms of haskell in https://wiki.archlinux.org/index.php/Haskell what have you tried from there?

Offline

#3 2018-07-06 06:36:34

SargonX
Member
Registered: 2014-05-12
Posts: 11

Re: How does one get Haskell working on Arch?

Did you make any progress?

I've just started a day ago to try my very very first steps with Haskell and after reading https://wiki.archlinux.org/index.php/Haskell I was completely confused what to do. It has way too many options...
So I went to the Github page of Haskell Stack (https://github.com/commercialhaskell/stack/releases) and downloaded the latest release version (v 1.7.1). I then created a lil test project and even successfully added an external dependency w/o any problems.

Maybe that's also an option which works for you?

Offline

#4 2018-07-06 14:30:01

Steef435
Member
Registered: 2013-08-29
Posts: 577
Website

Re: How does one get Haskell working on Arch?

stack seems to be in [community], as described in the wiki.

Offline

#5 2018-07-06 15:08:48

SargonX
Member
Registered: 2014-05-12
Posts: 11

Re: How does one get Haskell working on Arch?

That's true. But since this also installs a ton of haskell-* packages, I'm pretty sure that will lead to other problems later. So I think that starting with a statically-linked (with respect to Haskell-dependencies) stack version is a good idea.

The statically-linked version of stack could be installed via stack-bin from AUR, but if all I need is a binary, I rather install it manually. But everyone is different. smile

Offline

Board footer

Powered by FluxBB