Comments (23)
The first time I tried this, it failed and told me I needed to update cabal. I manually ran cabal update
. After this, everything installs fine.
Cabal:
$ cabal --version
cabal-install version 1.20.0.3
using version 1.20.0.2 of the Cabal library
GHC:
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
OS:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
from elm-platform.
Awesome, thank you @jcollard! I added cabal update
to the build.sh
script so it should be in there for everyone now.
from elm-platform.
Fails.
OS:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 15.04
Release: 15.04
Codename: vivid
GHC: The Glorious Glasgow Haskell Compilation System, version 7.6.3
Cabal: cabal-install version 1.20.0.3
using version 1.20.0.2 of the Cabal library
GHC and cabal installed with:
sudo apt-get install ghc cabal-install
after first failure deleted elm-platform and ran fubar script, same error.
Cloning into 'elm-package'...
remote: Counting objects: 3198, done.
remote: Total 3198 (delta 0), reused 0 (delta 0), pack-reused 3198
Receiving objects: 100% (3198/3198), 587.35 KiB | 383.00 KiB/s, done.
Resolving deltas: 100% (1897/1897), done.
Checking connectivity... done.
Writing a default package environment file to
/home/gary/elm-platform/versions/0.15.1/elm-package/cabal.sandbox.config
Using an existing sandbox located at /home/gary/elm-platform/versions/0.15.1
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: aeson-0.7.0.6/installed-6b1... (user goal)
next goal: elm-package (user goal)
rejecting: elm-package-0.5.1 (conflict: aeson =>
vector==0.11.0.0/installed-512..., elm-package => vector>=0.10 && <0.11)
rejecting: elm-package-0.5, 0.4, 0.2.2, 0.2.1, 0.2 (global constraint requires
==0.5.1)
Dependency tree exhaustively searched.
Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
from elm-platform.
Responding to the mailing list, I got a failed build. Looks to be the same as Gary's but for completeness' sake...
- Debian 8.1 "Jessie"
- GHC version 7.8.4
- "cabal-install version 1.20.0.3, using version 1.20.0.2 of the Cabal library"
- Followed the README exactly. Did not run the fubar script.
- Error dump:
max@hostname:/opt/elm-platform/versions/0.15.1$ ./build.sh
<SNIP>
[71 of 72] Compiling Compile ( src/Compile.hs, dist/dist-sandbox-9a05b902/build/Compile.o )
[72 of 72] Compiling Elm.Compiler ( src/Elm/Compiler.hs, dist/dist-sandbox-9a05b902/build/Elm/Compiler.o )
In-place registering elm-compiler-0.15.1...
Preprocessing executable 'elm' for elm-compiler-0.15.1...
[1 of 3] Compiling Paths_elm_compiler ( dist/dist-sandbox-9a05b902/build/autogen/Paths_elm_compiler.hs, dist/dist-sandbox-9a05b902/build/elm/elm-tmp/Paths_elm_compiler.o )
[2 of 3] Compiling Elm.Compiler.Version ( src/Elm/Compiler/Version.hs, dist/dist-sandbox-9a05b902/build/elm/elm-tmp/Elm/Compiler/Version.o )
[3 of 3] Compiling Main ( src/CommandLineRouter.hs, dist/dist-sandbox-9a05b902/build/elm/elm-tmp/Main.o )
Linking dist/dist-sandbox-9a05b902/build/elm/elm ...
Creating package registration file: /tmp/pkgConf-elm-compiler-0.1531380.1
Installing library in
/opt/elm-platform/versions/0.15.1/lib/x86_64-linux-ghc-7.8.4/elm-compiler-0.15.1
Installing executable(s) in /opt/elm-platform/versions/0.15.1/bin
Registering elm-compiler-0.15.1...
Installed elm-compiler-0.15.1
Cloning into 'elm-package'...
remote: Counting objects: 3198, done.
remote: Total 3198 (delta 0), reused 0 (delta 0), pack-reused 3198
Receiving objects: 100% (3198/3198), 587.35 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1897/1897), done.
Checking connectivity... done.
Writing a default package environment file to
/opt/elm-platform/versions/0.15.1/elm-package/cabal.sandbox.config
Using an existing sandbox located at /opt/elm-platform/versions/0.15.1
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: aeson-0.8.1.1/installed-aa6... (user goal)
next goal: elm-package (user goal)
rejecting: elm-package-0.5.1 (conflict: aeson =>
vector==0.11.0.0/installed-8ca..., elm-package => vector>=0.10 && <0.11)
rejecting: elm-package-0.5, 0.4, 0.2.2, 0.2.1, 0.2 (global constraint requires
==0.5.1)
Backjump limit reached (change with --max-backjumps).
Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
The "good" news is, this looks like a cabal dependency problem, not an OS or Haskell problem.
from elm-platform.
#65 hopefully fixes the above failing cases.
from elm-platform.
Gonna call this experiment a failure. At this time, it seems that a single cabal.config
file can only work for some subset of GHC, so folks are still going to get failures no matter what.
The answer is to fix npm
. That will have way more impact and actually be reliable.
from elm-platform.
@evancz fwiw, I've never had any issues installing via npm
. Is there a thread discussing the issues?
from elm-platform.
It is kind of logged in #60. The main problems are:
- The latest version does not set
ELM_HOME
properly. So many new people try to useelm-reactor
and it fails. I think they forgot to do theelm-reactor-wrapped
trick that the Mac installer does or something. #60 links to an issue where I try to find out what's going wrong there. - The Debian one was built on a 64-bit machine so it can't be used on any 32-bit OS, which people have.
It seemed like I was getting lots of complaints about this, but now that I've gone through this mess, it seems like that's a far better set of problems to have.
I think it's possible to fix both of those things, but I have not been able to figure it out. (time + unfamiliarity) If you can look, I think that'd be a far better fix than any of the things I have been trying.
from elm-platform.
cabal.config
only seems to do anything if it's copied into the directory where cabal
is run. What happens on my machine is that vector-0.11
is installed into the sandbox when building elm-compiler
and then when elm-package
is configured, it fails because it needs an older version of vector
.
(If I copy cabal.config into the directory then nothing works because I have GHC 7.10.)
For the resolver to work everything needs to be built together, though I don't think cabal
can do this.
from elm-platform.
@jvoigtlaender just fixed the first thing you mention in #65 but it is true that different versions of GHC cannot work with the same cabal.config
file. I did not know that. It's not clear to me how to add that in. I think that's the missing ingredient though.
Once that's added, maybe this route can actually work.
from elm-platform.
Dear All
Perhaps I've done something wrong but I've had no problems installing from source just now on FreeBSD. Fresh installs of GHC and cabal:
$ ghci --version
The Glorious Glasgow Haskell Compilation System, version 7.10.2
~$ cabal --version
cabal-install version 1.22.6.0
using version 1.22.4.0 of the Cabal library
Then run your BuildFromSource.hs script for 0.15.1. Put the bin dir on my PATH, and:
$ elm repl
Elm REPL 0.4.2 (Elm Platform 0.15.1)
See usage examples at https://github.com/elm-lang/elm-repl
Type :help for help, :exit to exit
Thanks
Ivan
from elm-platform.
Thanks for letting us know @llaisdy! This thread actually led to a bunch of improvements from @jvoigtlaender and @rehno-lindeque getting merged into the main BuildFromSource.hs script that improved reliability quite a bit!
from elm-platform.
In case it's relevant, after encountering issue #411 on Ubuntu 14.04,
I wrote a tutorial explaining what worked for me.
from elm-platform.
@jvoigtlaender here is my reply from our conversation at kevva/elm-bin#21. I followed the @alphydan 's tutorial, but first I had to update my glibc library to version >= 2.15 by following the instructions here: http://stackoverflow.com/questions/10863613/how-to-upgrade-glibc-from-version-2-13-to-2-15-on-debian. Then I got the ghc and cabal running:
~ % ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.1
~ % cabal --version
cabal-install version 1.22.6.0
using version 1.22.4.0 of the Cabal library
I added everything to my PATH variables, got the script and ran runhaskell BuildFromSource.hs 0.15.1 . Everything looked fine, but these were the last 10 lines I got after more than one hour of compiling on my older machine:
backend/Main.hs:6:1: Warning:
The import of `<$>' from module `Control.Applicative' is redundant
Linking dist/dist-sandbox-f099a7d3/build/elm-reactor/elm-reactor ...
Custom build step: creating and collecting all static resources
Installing executable(s) in
/home/dusky/dev/Elm-Platform/0.15.1/.cabal-sandbox/bin
Installed elm-reactor-0.3.2
cabal: Error: some packages failed to install:
elm-package-0.5.1 failed during the building phase. The exception was:
ExitFailure 1
There were few warnings about redundancy during the installation, but if I got it right everything except elm-package-0.5.1 was installed. But I can not run elm-make or elm-reactor even from the folder where they are installed:
elm-make HEAD % ls
elm-make elm-make-tmp
elm-make HEAD % elm-make --help
zsh: command not found: elm-make
or from .cabal-sandbox/bin directory:
bin % ls
aeson-pretty elm elm-make elm-package elm-reactor glsl-pprint
bin % elm-make --help
zsh: command not found: elm-make
bin % elm-reactor --help
zsh: command not found: elm-reactor
I hope this helps somehow. As a reminder I have 32bit Crunchbang Waldorf linux (Debian Wheezy).
from elm-platform.
I'm not a Linux person, but about the last points, where you are in a directory in which you have an executable like elm-make (I assume it's an executable, though an "ls -la" would be a safer way to be sure), but cannot run it: Maybe you need to call it as "./elm-make" due to some safety settings in your shell?
About the actual problem with building the Elm tools: It indeed looks like something failed during the elm-package install specifically. Unfortunately the messages for that will be hidden much further above in your log. So, if you still have the Elm-Platform/0.15.1 directory lying around (with the partially successful build) could you run there just "cabal install elm-package" and post the complete output?
from elm-platform.
Hi @jvoigtlaender, you were right, ./elm-make is the right way to run it:
bin % ls -la
total 52440
drwxr-xr-x 2 dusky dusky 4096 Oct 5 22:24 .
drwxr-xr-x 8 dusky dusky 4096 Oct 5 22:20 ..
-rwxr-xr-x 1 dusky dusky 6264196 Oct 5 22:09 aeson-pretty
-rwxr-xr-x 1 dusky dusky 822896 Oct 5 22:22 elm
-rwxr-xr-x 1 dusky dusky 16462152 Oct 5 22:19 elm-make
-rwxr-xr-x 1 dusky dusky 14261512 Oct 5 22:19 elm-package
-rwxr-xr-x 1 dusky dusky 13857872 Oct 5 22:24 elm-reactor
-rwxr-xr-x 1 dusky dusky 2002276 Oct 5 21:53 glsl-pprint
bin % ./elm-make --help
elm-make 0.2 (Elm Platform 0.15.1)
Usage: elm-make [FILES...] [--output FILE] [--yes] [--report FORMAT] [--warn]
[--docs FILE]
build Elm projects
Available options:
-h,--help Show this help text
--output FILE Write output to FILE.
--yes Reply 'yes' to all automated prompts.
--report FORMAT Format of error and warning reports (e.g.
--report=json)
--warn Report warnings to improve code quality.
--docs FILE Write documentation to FILE as JSON.
To learn more about a particular command run:
elm-make COMMAND --help
bin % ./elm-reactor
Elm Reactor 0.3.2 (Elm Platform 0.15.1)
Listening on http://0.0.0.0:8000/
Below is the dump of the "cabal install elm-package":
0.15.1 % cabal install elm-package
Some add-source dependencies have been modified. They will be reinstalled...
Resolving dependencies...
In order, the following will be installed:
elm-compiler-0.15.1 (via: elm-package-0.5.1) (reinstall)
elm-package-0.5.1 (reinstall) (changes: ansi-wl-pprint-0.6.7.3 added, optparse-applicative-0.11.0.2 added, pretty-1.1.2.0 added)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
Configuring elm-compiler-0.15.1...
Building elm-compiler-0.15.1...
Preprocessing library elm-compiler-0.15.1...
In-place registering elm-compiler-0.15.1...
Preprocessing executable 'elm' for elm-compiler-0.15.1...
Creating package registration file:
/tmp/pkgConf-elm-compiler-0.153040891721303455736.1
Installing library in
/home/dusky/dev/Elm-Platform/0.15.1/.cabal-sandbox/lib/i386-linux-ghc-7.10.1/elm-compiler-0.15.1-8kVGzCqQsGp9WSnOaubtTa
Installing executable(s) in
/home/dusky/dev/Elm-Platform/0.15.1/.cabal-sandbox/bin
Registering elm-compiler-0.15.1...
Installed elm-compiler-0.15.1
Configuring elm-package-0.5.1...
Building elm-package-0.5.1...
Preprocessing library elm-package-0.5.1...
In-place registering elm-package-0.5.1...
Preprocessing executable 'elm-package' for elm-package-0.5.1...
[18 of 25] Compiling Docs ( src/Docs.hs, dist/dist-sandbox-f099a7d3/build/elm-package/elm-package-tmp/Docs.o ) [flags changed]
src/Docs.hs:21:5:
Non type-variable argument
in the constraint: Control.Monad.Error.Class.MonadError [Char] m
(Use FlexibleContexts to permit this)
When checking that `badJson' has the inferred type
badJson :: forall (m :: * -> *) a.
Control.Monad.Error.Class.MonadError [Char] m =>
[Char] -> m a
In an equation for `generate':
generate
= do { Cmd.run "elm-make" ["--docs=" ++ Path.documentation];
json <- liftIO (BS.readFile Path.documentation);
either badJson return (Json.eitherDecode json) }
where
badJson msg
= throwError $ "Problem with generated documentation:\n" ++ msg
Failed to install elm-package-0.5.1
cabal: Error: some packages failed to install:
elm-package-0.5.1 failed during the building phase. The exception was:
ExitFailure 1
I would like to thank you for taking time to help me.
from elm-platform.
Ah, sorry, I should have asked you to run "cabal install --ghc-options=-XFlexibleContexts elm-package". The build script passes this option automatically.
from elm-platform.
Thank you @jvoigtlaender for solving my problem, it installed fine and if I run it I get:
bin % ./elm-package --help
Elm Package Manager 0.5.1 (Elm Platform 0.15.1)
Usage: elm-package COMMAND
install and publish elm libraries
Available options:
-h,--help Show this help text
Available commands:
install Install packages to use locally
publish Publish your package to the central catalog
bump Bump version numbers based on API changes
diff Get differences between two APIs
To learn more about a particular command run:
elm-package COMMAND --help
from elm-platform.
Cool that it worked now. I'm a bit puzzled, because the build script should have issued an equivalent command. But unfortunately one sometimes does see such "non-deterministic" behavior with cabal builds. It could depend on some specific combination of versions of other packages being pulled in, that differed depending on whether the build script tried to build everything in one go or whether the last package was built independently.
So probably we won't be able to reproduce what exactly happened here originally. But let's be content that the day you can use Elm on your machine arrived sooner rather than later. 😄
And thanks for staying through this!
from elm-platform.
@jvoigtlaender I was playing with elm (following http://elm-by-example.org) and found out that elm-repl was not installed. I tried to install it, but I got this error:
0.15.1 % cabal install elm-repl
Resolving dependencies...
Configuring elm-repl-0.4.2...
Building elm-repl-0.4.2...
Preprocessing executable 'elm-repl' for elm-repl-0.4.2...
[ 1 of 10] Compiling Paths_elm_repl ( dist/dist-sandbox-f099a7d3/build/autogen/Paths_elm_repl.hs, dist/dist-sandbox-f099a7d3/build/elm-repl/elm-repl-tmp/Paths_elm_repl.o ) [flags changed]
[ 2 of 10] Compiling Flags ( src/Flags.hs, dist/dist-sandbox-f099a7d3/build/elm-repl/elm-repl-tmp/Flags.o ) [flags changed]
[ 3 of 10] Compiling Environment ( src/Environment.hs, dist/dist-sandbox-f099a7d3/build/elm-repl/elm-repl-tmp/Environment.o ) [flags changed]
[ 4 of 10] Compiling Read ( src/Read.hs, dist/dist-sandbox-f099a7d3/build/elm-repl/elm-repl-tmp/Read.o ) [flags changed]
src/Read.hs:4:1: Warning:
The import of ‘Data.Functor’ is redundant
except perhaps to import instances from ‘Data.Functor’
To import instances alone, use: import Data.Functor()
[ 5 of 10] Compiling Eval.Code ( src/Eval/Code.hs, dist/dist-sandbox-f099a7d3/build/elm-repl/elm-repl-tmp/Eval/Code.o ) [flags changed]
[ 7 of 10] Compiling Eval ( src/Eval.hs, dist/dist-sandbox-f099a7d3/build/elm-repl/elm-repl-tmp/Eval.o ) [flags changed]
[ 8 of 10] Compiling Loop ( src/Loop.hs, dist/dist-sandbox-f099a7d3/build/elm-repl/elm-repl-tmp/Loop.o ) [flags changed]
[ 9 of 10] Compiling Completion ( src/Completion.hs, dist/dist-sandbox-f099a7d3/build/elm-repl/elm-repl-tmp/Completion.o ) [flags changed]
[10 of 10] Compiling Main ( src/Main.hs, dist/dist-sandbox-f099a7d3/build/elm-repl/elm-repl-tmp/Main.o ) [flags changed]
src/Main.hs:3:1: Warning:
The import of ‘<*>, <$>’
from module ‘Control.Applicative’ is redundant
Linking dist/dist-sandbox-f099a7d3/build/elm-repl/elm-repl ...
/usr/bin/ld: cannot find -ltinfo
collect2: error: ld returned 1 exit status
Failed to install elm-repl-0.4.2
cabal: Error: some packages failed to install:
elm-repl-0.4.2 failed during the building phase. The exception was:
ExitFailure 1
I also tried with the --ghc-options=-XFlexibleContexts flag, but the result was the same. You can also see it was not installed by looking at my ls dumps above. Sorry, I didn't realize it that time.
Elm make, reactor and package work fine.
from elm-platform.
Not being on Linux myself, I can only guess it is related to this: elm-lang/elm-repl#46.
If it is, that is if you find out that this solves your problem with elm-repl, can you please open an issue or pull request here in the elm-platform repo, so that this information is preserved for others (probably in the README somehow)?
from elm-platform.
After building hopefully works, maybe also look out for this: elm-lang/elm-repl#57.
from elm-platform.
I can only thank you again @jvoigtlaender. After installing libtinfo-dev, I was able to install the elm-repl. It works without --interpreter flag on Debian, I think that issue is only Ubuntu specific or was fixed already. I am just to make a pull request (I will add note to README).
from elm-platform.
Related Issues (20)
- install.elm-lang.org SSL certificate problem. HOT 2
- Corporate users cannot access dl.bintray.com HOT 1
- Switch from Bintray to GitHub releases for hosting npm binaries HOT 2
- Meta: npm installer improvements HOT 1
- Help users fix npm permissions issues HOT 2
- add `elm new` for improved onboarding experience HOT 3
- npm installer fails on proxy and certificates HOT 5
- elm command not found HOT 2
- Can dependencies of the npm installer be smaller? HOT 1
- Global Elm install on Ubuntu 16.04 LTS failing HOT 2
- Fail of npm install -g elm on linux systems. HOT 7
- can version 1.4.1 be deprecated? HOT 1
- npm installer index.js root variable is hard-coded
- Dependency on Hoek 2.6.3 (Vulnerable) HOT 4
- npm install fails with "read ECONNRESET" with configured corporate proxy HOT 1
- 'elm --help' output could be improved HOT 1
- npm install fails on Ubuntu 16.04 HOT 1
- GHC 7.10 does not work anymore HOT 1
- Build fails on basement-0.0.8 HOT 1
- Cabal needs more backjumps in BuildFromSource.hs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elm-platform.