Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Haskell Stack on Amazon Web Service, EC2 environment #4155

Closed
KalikaKay opened this issue Jul 16, 2018 · 3 comments
Closed

Haskell Stack on Amazon Web Service, EC2 environment #4155

KalikaKay opened this issue Jul 16, 2018 · 3 comments
Labels

Comments

@KalikaKay
Copy link

KalikaKay commented Jul 16, 2018

I'm working to get Haskell stack installed on AWS using the Cloud9 environment.

I've attempted various installation techniques including implementing the Fedora 22 stack and generic linux guidelines as provided on the website.

with the fedora 22 stack installation, I receive the following when running the stack path commands:

Using resolver: lts-12.0 from implicit global project's config file: /home/ec2-user/.stack/global-project/stack.yaml
Downloaded lts-12.0 build plan.    
AesonException "Invalid flag name: \"bytestring--lt-0_10_4\""

Running stack upgrade provides similar results.
My environmental variables contain the recommended $HOME/.local/bin variable, but that's no guarantee that my installation is referencing or expecting that variable.

The generic linux installation command provides the following information:

Detected Linux distribution: amzn

This installer doesn't support your Linux distribution, trying generic
bindist...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   621    0   621    0     0   2256      0 --:--:-- --:--:-- --:--:--  2250
100 13.3M  100 13.3M    0     0  7741k      0  0:00:01  0:00:01 --:--:-- 11.8M
Installing Stack to: /usr/bin/stack...

-------------------------------------------------------------------------------

Stack has been installed to: /usr/bin/stack

Since this installer doesn't support your Linux distribution,
there is no guarantee that 'stack' will work at all!  You may
need to manually install some system info dependencies for GHC:
  gcc, make, libffi, zlib, libgmp and libtinfo
Please see http://docs.haskellstack.org/en/stable/install_and_upgrade/
Pull requests to add support for this distro would be welcome!

Using the CentOs/Amazon Linux/Red Hat version, I'm getting the following after calling stack upgrade.

 stack upgrade
Current Stack version: 1.5.1, available download version: 1.7.1
Newer version detected, downloading
Querying for archive location for platform: linux-x86_64-static
Querying for archive location for platform: linux-x86_64
Downloading from: https://github.com/commercialhaskell/stack/releases/download/v1.7.1/stack-1.7.1-linux-x86_64.tar.gz
Download complete, testing executable
Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2

WARNING: The "stack" executable found on the PATH environment variable is /usr/bin/stack, and not the version that was just installed.
This means that "stack" calls on the command line will not use this version.
New stack executable available at /home/ec2-user/.local/bin/stack

running stack path should give me a list of available stack commands, but now I'm getting this, instead:

Downloaded lts-12.0 build plan.    
AesonException "Error in $.packages.cassava.constraints.flags['bytestring--lt-0_10_4']: Invalid flag name: \"bytestring--lt-0_10_4\""

I'll go and figure out what's wrong, eventually; since there was a request for input, I thought I'd go ahead and submit this one.

Thanks!

ETA:
My eyes are going cross on this one, I could've sworn that there wasn't an Amazon Linux on there.
Lol.

@dbaynard
Copy link
Contributor

Hello @KalikaKay, what's the output of stack --version, on each platform you're using?

I think this relates to commercialhaskell/stackage#2759. The fix for the cassava issue is in stack 1.6.1, so the upgrade should help.

There has been an issue recently with lts-12.0 and fedora (see #4144 — that's fedora 27 not 22, but the issue is likely the same.) That should now be fixed — but you'll need a more recent version of stack than 1.5.1

@KalikaKay
Copy link
Author

KalikaKay commented Jul 18, 2018

After a bit of a break, I deleted everything and am starting from scratch using the generic Linux version wget -qO- https://get.haskellstack.org/ | sh as recommended in the documentation for Amazon Linux installations.

stack --version reveals:

Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2

That's cool.

Now I'm troubleshooting this error

stack install hakyll
Writing implicit global project config file to: /home/ec2-user/.stack/global-project/stack.yaml
Note: You can change the snapshot via the resolver field there.
Using latest snapshot resolver: lts-12.1
Downloaded lts-12.1 build plan.    
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Downloaded ghc-8.4.3.                                      
Installing GHC ...                                                                
Received ExitFailure 2 when running
Raw command: /usr/bin/gmake install
Run from: /home/ec2-user/.stack/programs/x86_64-linux/ghc-8.4.3.temp/ghc-8.4.3/

So I ran stack path, just to check that everything's cool.

Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Already downloaded.                
Installing GHC ...                                                                
Received ExitFailure 2 when running
Raw command: /usr/bin/gmake install
Run from: /home/ec2-user/.stack/programs/x86_64-linux/ghc-8.4.3.temp/ghc-8.4.3/

So I ran the raw command to do the gmake install from the folder it directed and now I'm filtering through a ton of information. . . .

Looks like, I need more space. I'm working with 8 gigs, how much space do I need?

Sigh. I'll figure out how to get more space on this one - at any rate, I got the base of what I needed.

Thank you, so much @dbaynard! I appreciate the help.

ETA: AWS Cloud9 says that the free tier includes 8GB, but after an initial quick-setup; I'm only left with two!

I'm reaching out to Amazon - in the interim, I think we can close this one. There's not much else that can be done on the Haskell side, is there?

@dbaynard
Copy link
Contributor

Unless a stack setup -v shows anything useful in the logs, no. I'll close, for now. Do reopen if needed. And it would be good to see how you resolve the broader issue, anyway — it might be something we need to document.

@dbaynard dbaynard added component: releases Platform support, automation and removed further investigation required labels Jul 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants