Closed bburdette closed 9 years ago
elm 0.15.1 + ghc 7.10.2 results:
<... bunch more compile output above this ...> Writing a default package environment file to /home/bburdette/code/elm-platform/installers/Elm-Platform/0.15.1/elm-repl/cabal.sandbox.config Using an existing sandbox located at /home/bburdette/code/elm-platform/installers/Elm-Platform/0.15.1 Resolving dependencies... cabal: Could not resolve dependencies: trying: aeson-0.8.1.1/installed-050... (user goal) trying: elm-compiler-0.15.1/installed-8cb... (user goal) trying: elm-repl-0.4.2 (user goal) next goal: elm-package (dependency of elm-repl-0.4.2) rejecting: elm-package-0.5 (conflict: aeson => vector==0.11.0.0/installed-f3f..., elm-package => vector>=0.10 && <0.11) rejecting: elm-package-0.4 (conflict: elm-compiler==0.15.1/installed-8cb..., elm-package => elm-compiler>=0.14.1 && <0.15) rejecting: elm-package-0.2.2, 0.2.1, 0.2 (conflict: elm-compiler==0.15.1/installed-8cb..., elm-package => elm-compiler>=0.14 && <0.15) Backjump limit reached (change with --max-backjumps).
I recently created a build from source route referenced in #63. It specifies the exact dependencies you need to build 0.15.1 (at least on my machine) so it should not have the "can't solve" issues you saw. (Though you never know with cabal!)
If you get a chance, would you mind trying to follow the directions there? I am unsure if it will work with 7.10 or with Nix as I have not tested either yet, and I am constantly surprised by the way in which cabal dependencies can not solve. But if you get a chance, it would be extremely valuable to know how that route works with Nix+7.8 and Nix+7.10!
@evancz, I don't see in which sense you have specified "the exact dependencies" needed. Your new build script only says which versions of the Elm tools should be installed, not what the versions of their dependencies have to be.
This is visible from the build attempts by @garyLockyer and @mgold over at #63, who get different build goals aeson-0.7.0.6
and aeson-0.8.1.1
, which shouldn't happen if you had indeed successfully locked down dependencies.
Oh, you do have a cabal.config
in there, but it doesn't get respected. See #64.
Ok I ran it with 7.8.4, and got a 'use --force-reinstalls' message. ran fubar.sh, deleted the elm-compilers directory, did a 'cabal sandbox delete' and tried again, same thing.
[nix-shell:~/code/elm-platform/versions/0.15.1]$ bash build.sh Downloading the latest package list from hackage.haskell.org Skipping download: Local and remote files match. Writing a default package environment file to /home/bburdette/code/elm-platform/versions/0.15.1/cabal.sandbox.config Using an existing sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox Cloning into 'elm-compiler'... remote: Counting objects: 20457, done. remote: Total 20457 (delta 0), reused 0 (delta 0), pack-reused 20457 Receiving objects: 100% (20457/20457), 6.12 MiB | 1.11 MiB/s, done. Resolving deltas: 100% (11942/11942), done. Checking connectivity... done. Writing a default package environment file to /home/bburdette/code/elm-platform/versions/0.15.1/elm-compiler/cabal.sandbox.config Using an existing sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1 Resolving dependencies... In order, the following would be installed: Diff-0.3.2 (via: language-ecmascript-0.17.0.1) (new package) ansi-terminal-0.6.2.2 (via: elm-compiler-0.15.1) (new package) concatenative-1.0.1 (via: indents-0.3.3) (new package) data-default-class-0.0.1 (via: language-ecmascript-0.17.0.1) (new package) dlist-0.7.1.2 (via: aeson-0.8.1.1) (new package) edit-distance-0.2.2.1 (via: elm-compiler-0.15.1) (new package) prettyclass-1.0.0.0 (via: language-glsl-0.2.0) (new package) syb-0.5.1 (via: aeson-0.8.1.1 uniplate-1.6.12) (new package) text-1.2.1.3 -integer-simple (via: elm-compiler-0.15.1 aeson-pretty-0.7.2 aeson-0.8.1.1 parsec-3.1.9 attoparsec-0.13.0.1 scientific-0.3.3.8 hashable-1.2.3.3 blaze-html-0.7.1.0 blaze-markup-0.6.3.0 blaze-builder-0.3.3.4) (new package) blaze-builder-0.3.3.4 (latest: 0.4.0.1) (via: blaze-html-0.7.1.0 blaze-markup-0.6.3.0) (new package) blaze-markup-0.6.3.0 (latest: 0.7.0.2) (via: elm-compiler-0.15.1 blaze-html-0.7.1.0) (new package) blaze-html-0.7.1.0 (latest: 0.8.1.0) (via: elm-compiler-0.15.1) (new package) hashable-1.2.3.3 (via: aeson-0.8.1.1 uniplate-1.6.12 unordered-containers-0.2.5.1 scientific-0.3.3.8) (new package) scientific-0.3.3.8 (via: aeson-0.8.1.1 attoparsec-0.13.0.1) (new package) transformers-0.4.3.0 (via: elm-compiler-0.15.1 aeson-0.8.1.1 union-find-0.2 QuickCheck-2.8.1 primitive-0.6 mtl-2.2.1 cmdargs-0.10.13 attoparsec-0.13.0.1) (new version) attoparsec-0.13.0.1 (via: aeson-pretty-0.7.2 aeson-0.8.1.1) (new package) cmdargs-0.10.13 (via: elm-compiler-0.15.1 aeson-pretty-0.7.2) (new package) mtl-2.2.1 (via: elm-compiler-0.15.1 language-ecmascript-0.17.0.1 aeson-0.8.1.1 testing-feat-0.4.0.2 tagshare-0.0 indents-0.3.3 parsec-3.1.9) (new version) parsec-3.1.9 (via: elm-compiler-0.15.1 language-ecmascript-0.17.0.1 language-glsl-0.2.0 indents-0.3.3) (new package) indents-0.3.3 (via: elm-compiler-0.15.1) (new package) language-glsl-0.2.0 (via: elm-compiler-0.15.1) (new package) primitive-0.6 (via: vector-0.11.0.0 tf-random-0.5) (reinstall) (changes: transformers-0.3.0.0 -> 0.4.3.0) tagshare-0.0 (via: testing-feat-0.4.0.2) (new package) tf-random-0.5 (via: QuickCheck-2.8.1) (new package) QuickCheck-2.8.1 -base4point8 (via: language-ecmascript-0.17.0.1 testing-feat-0.4.0.2) (new package) testing-feat-0.4.0.2 (via: language-ecmascript-0.17.0.1) (new package) union-find-0.2 (via: elm-compiler-0.15.1) (new package) unordered-containers-0.2.5.1 (via: elm-compiler-0.15.1 aeson-pretty-0.7.2 aeson-0.8.1.1 uniplate-1.6.12) (new package) uniplate-1.6.12 (via: language-ecmascript-0.17.0.1) (new package) vector-0.11.0.0 (via: aeson-pretty-0.7.2 aeson-0.8.1.1) (reinstall) aeson-0.8.1.1 (latest: 0.9.0.1) +old-locale (via: elm-compiler-0.15.1 aeson-pretty-0.7.2) (new package) aeson-pretty-0.7.2 (via: elm-compiler-0.15.1) (new package) wl-pprint-1.2 (via: language-ecmascript-0.17.0.1) (new package) language-ecmascript-0.17.0.1 (via: elm-compiler-0.15.1) (new package) elm-compiler-0.15.1 (new package) cabal: The following packages are likely to be broken by the reinstalls: mwc-random-0.13.3.2 monad-par-0.3.4.7 Use --force-reinstalls if you want to install anyway.
Gave it a try with 7.10.2. did a cabal sandbox delete again, then it gave an error on the elm-compiler directory already existing so deleted that. result is below, TLDR it ends with a package conflict.
[nix-shell:~/code/elm-platform/versions/0.15.1]$ bash build.sh Downloading the latest package list from hackage.haskell.org Skipping download: Local and remote files match. Writing a default package environment file to /home/bburdette/code/elm-platform/versions/0.15.1/cabal.sandbox.config Using an existing sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox Cloning into 'elm-compiler'... remote: Counting objects: 20457, done. remote: Total 20457 (delta 0), reused 0 (delta 0), pack-reused 20457 Receiving objects: 100% (20457/20457), 6.12 MiB | 1.05 MiB/s, done. Resolving deltas: 100% (11942/11942), done. Checking connectivity... done. Writing a default package environment file to /home/bburdette/code/elm-platform/versions/0.15.1/elm-compiler/cabal.sandbox.config Using an existing sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1 Resolving dependencies... Notice: installing into a sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1 Configuring Diff-0.3.2... Configuring cmdargs-0.10.13... Configuring concatenative-1.0.1... Configuring ansi-terminal-0.6.2.2... Downloading dlist-0.7.1.2... Building Diff-0.3.2... Building concatenative-1.0.1... Building ansi-terminal-0.6.2.2... Building cmdargs-0.10.13... Installed concatenative-1.0.1 Configuring data-default-class-0.0.1... Building data-default-class-0.0.1... Configuring prettyclass-1.0.0.0... Installed Diff-0.3.2 Configuring edit-distance-0.2.2.1... Installed data-default-class-0.0.1 Building prettyclass-1.0.0.0... Configuring tagshare-0.0... Installed ansi-terminal-0.6.2.2 Building edit-distance-0.2.2.1... Configuring syb-0.5.1... Installed prettyclass-1.0.0.0 Building tagshare-0.0... Building syb-0.5.1... Configuring tf-random-0.5... Installed tagshare-0.0 Building tf-random-0.5... Configuring text-1.2.1.3... Installed edit-distance-0.2.2.1 Configuring union-find-0.2... Installed syb-0.5.1 Building text-1.2.1.3... Building union-find-0.2... Configuring wl-pprint-1.2... Installed tf-random-0.5 Building wl-pprint-1.2... Configuring dlist-0.7.1.2... Installed union-find-0.2 Configuring QuickCheck-2.8.1... Installed wl-pprint-1.2 Building dlist-0.7.1.2... Installed cmdargs-0.10.13 Building QuickCheck-2.8.1... Installed dlist-0.7.1.2 Installed QuickCheck-2.8.1 Configuring testing-feat-0.4.0.2... Building testing-feat-0.4.0.2... Installed testing-feat-0.4.0.2 Installed text-1.2.1.3 Configuring blaze-builder-0.3.3.4... Configuring parsec-3.1.9... Configuring hashable-1.2.3.3... Building parsec-3.1.9... Building hashable-1.2.3.3... Building blaze-builder-0.3.3.4... Installed hashable-1.2.3.3 Configuring unordered-containers-0.2.5.1... Configuring scientific-0.3.3.8... Building unordered-containers-0.2.5.1... Building scientific-0.3.3.8... Installed blaze-builder-0.3.3.4 Configuring blaze-markup-0.6.3.0... Building blaze-markup-0.6.3.0... Installed parsec-3.1.9 Configuring indents-0.3.3... Downloading language-glsl-0.2.0... Configuring language-glsl-0.2.0... Installed scientific-0.3.3.8 Building indents-0.3.3... Building language-glsl-0.2.0... Configuring attoparsec-0.13.0.1... Installed blaze-markup-0.6.3.0 Installed indents-0.3.3 Configuring blaze-html-0.7.1.0... Installed unordered-containers-0.2.5.1 Configuring uniplate-1.6.12... Building attoparsec-0.13.0.1... Building blaze-html-0.7.1.0... Building uniplate-1.6.12... Installed uniplate-1.6.12 Configuring language-ecmascript-0.17.0.1... Building language-ecmascript-0.17.0.1... Installed language-glsl-0.2.0 Installed blaze-html-0.7.1.0 ^[[23~Installed attoparsec-0.13.0.1 Configuring aeson-0.8.1.1... Building aeson-0.8.1.1... Installed aeson-0.8.1.1 Configuring aeson-pretty-0.7.2... Installed language-ecmascript-0.17.0.1 Building aeson-pretty-0.7.2... Installed aeson-pretty-0.7.2 Configuring elm-compiler-0.15.1... Building 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 | 787.00 KiB/s, done. Resolving deltas: 100% (1897/1897), done. Checking connectivity... done. Writing a default package environment file to /home/bburdette/code/elm-platform/versions/0.15.1/elm-package/cabal.sandbox.config Using an existing sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1 Resolving dependencies... cabal: Could not resolve dependencies: trying: aeson-0.8.1.1/installed-ce9... (user goal) next goal: elm-package (user goal) rejecting: elm-package-0.5.1 (conflict: aeson => vector==0.11.0.0/installed-f3f..., 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.
ok ran the fubar.sh and had more luck with 7.10.2. It gives an error that 'elm-package' exists. Not sure if it existed before this?
[nix-shell:~/code/elm-platform/versions/0.15.1]$ ../../installers/fubar.sh erasing all your user ghc and cabal packages - are you sure (y/n) ? yes
[nix-shell:~/code/elm-platform/versions/0.15.1]$ cabal sandbox delete Deleting the sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox
[nix-shell:~/code/elm-platform/versions/0.15.1]$ rm -rf elm-compiler/
[nix-shell:~/code/elm-platform/versions/0.15.1]$ bash build.sh Downloading the latest package list from hackage.haskell.org Writing a default package environment file to /home/bburdette/code/elm-platform/versions/0.15.1/cabal.sandbox.config Creating a new sandbox at /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox Cloning into 'elm-compiler'... remote: Counting objects: 20457, done. remote: Total 20457 (delta 0), reused 0 (delta 0), pack-reused 20457 Receiving objects: 100% (20457/20457), 6.12 MiB | 1.31 MiB/s, done. Resolving deltas: 100% (11942/11942), done. Checking connectivity... done. Writing a default package environment file to /home/bburdette/code/elm-platform/versions/0.15.1/elm-compiler/cabal.sandbox.config Using an existing sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1 Resolving dependencies... In order, the following will be installed: elm-compiler-0.15.1 (reinstall) Warning: Note that reinstalls are always dangerous. Continuing anyway... Notice: installing into a sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1 Configuring elm-compiler-0.15.1... Building elm-compiler-0.15.1... Installed elm-compiler-0.15.1 fatal: destination path 'elm-package' already exists and is not an empty directory.
Tried again, removing elm-compiler and elm-package directories first. Package conflict.
[nix-shell:~/code/elm-platform/versions/0.15.1]$ rm -rf elm-compiler/ elm-package/
[nix-shell:~/code/elm-platform/versions/0.15.1]$ ls add-source-timestamps build.sh cabal.sandbox.config logs README.md x86_64-linux-ghc-7.10.2-packages.conf.d bin cabal.config lib packages share x86_64-linux-ghc-7.8.4-packages.conf.d
[nix-shell:~/code/elm-platform/versions/0.15.1]$ bash build.sh Downloading the latest package list from hackage.haskell.org Skipping download: Local and remote files match. Writing a default package environment file to /home/bburdette/code/elm-platform/versions/0.15.1/cabal.sandbox.config Using an existing sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox Cloning into 'elm-compiler'... remote: Counting objects: 20457, done. remote: Total 20457 (delta 0), reused 0 (delta 0), pack-reused 20457 Receiving objects: 100% (20457/20457), 6.12 MiB | 1023.00 KiB/s, done. Resolving deltas: 100% (11942/11942), done. Checking connectivity... done. Writing a default package environment file to /home/bburdette/code/elm-platform/versions/0.15.1/elm-compiler/cabal.sandbox.config Using an existing sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1 Resolving dependencies... In order, the following will be installed: elm-compiler-0.15.1 (reinstall) Warning: Note that reinstalls are always dangerous. Continuing anyway... Notice: installing into a sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1 Configuring elm-compiler-0.15.1... Building 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 | 670.00 KiB/s, done. Resolving deltas: 100% (1897/1897), done. Checking connectivity... done. Writing a default package environment file to /home/bburdette/code/elm-platform/versions/0.15.1/elm-package/cabal.sandbox.config Using an existing sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1 Resolving dependencies... cabal: Could not resolve dependencies: trying: aeson-0.8.1.1/installed-ce9... (user goal) next goal: elm-package (user goal) rejecting: elm-package-0.5.1 (conflict: aeson => vector==0.11.0.0/installed-f3f..., 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 crucial thing you haven't cleaned up in/before all your build attempts is /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox
!
I always see Using an existing sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox
in your logs above, I never see a Creating sandbox
message. You say you deleted the sandboxes in between, but it looks like you didn't do so successfully. I assume this is the cause of most of your distress here. Just hard-delete the .cabal-sandbox
directory before any new attempt.
Also, some other log messages above indicate you haven't used the version of build.sh
including my fixes from #65 (mentioned/referred to in #64). I made those fixes for a reason. :smile:
Okay, so actually there are some Creating sandbox
messages in your logs, but the problem is that you suffer from the mistake I point out in #64. There are two sandboxes created, but you only delete one of them. You can see this in your logs, that sometimes there is reference to sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1
and sometimes to sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox
. So I can only reiterate: try with my fixes from #65. Without them, attempts don't make much sense.
Ok below I deleted my sandbox, ran fubar.sh, deleted elm-compiler (elm-package didn't exist) and then bash build.sh. To get build.sh I did a 'raw' view from your branch on github and pasted it into a file. Did I miss a step?
[nix-shell:~/code/elm-platform/versions/0.15.1]$ cabal sandbox delete Deleting the sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox
[nix-shell:~/code/elm-platform/versions/0.15.1]$ ../../installers/fubar.sh erasing all your user ghc and cabal packages - are you sure (y/n) ? y erasing directories under ~/.ghc find: `/home/bburdette/.ghc': No such file or directory erasing ~/.cabal/lib
[nix-shell:~/code/elm-platform/versions/0.15.1]$ rm -rf elm-compiler/
[nix-shell:~/code/elm-platform/versions/0.15.1]$ ls add-source-timestamps build_prev.sh cabal.config logs README.md x86_64-linux-ghc-7.10.2-packages.conf.d bin build.sh lib packages share x86_64-linux-ghc-7.8.4-packages.conf.d
[nix-shell:~/code/elm-platform/versions/0.15.1]$ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.10.2
[nix-shell:~/code/elm-platform/versions/0.15.1]$ bash build.sh Downloading the latest package list from hackage.haskell.org Skipping download: Local and remote files match. Writing a default package environment file to /home/bburdette/code/elm-platform/versions/0.15.1/cabal.sandbox.config Creating a new sandbox at /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox Cloning into 'elm-compiler'... remote: Counting objects: 20457, done. remote: Total 20457 (delta 0), reused 0 (delta 0), pack-reused 20457 Receiving objects: 100% (20457/20457), 6.12 MiB | 1.07 MiB/s, done. Resolving deltas: 100% (11942/11942), done. Checking connectivity... done. Writing a default package environment file to /home/bburdette/code/elm-platform/versions/0.15.1/elm-compiler/cabal.sandbox.config Using an existing sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox Resolving dependencies... cabal: Could not resolve dependencies: trying: elm-compiler-0.15.1 (user goal) next goal: base (dependency of elm-compiler-0.15.1) rejecting: base-4.8.1.0/installed-4f7..., 4.8.1.0, 4.8.0.0, 4.7.0.2 (global constraint requires ==4.7.0.1) rejecting: base-4.7.0.1 (global constraint requires installed instance) rejecting: base-4.7.0.0, 4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0, 3.0.3.2, 3.0.3.1 (global constraint requires ==4.7.0.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.
[nix-shell:~/code/elm-platform/versions/0.15.1]$
Ok tried again, I did a cabal sandbox delete, and there was for sure not .cabal-sandbox dir, so there couldn't have been another sandbox inside the .cabal-sandbox dir.
[nix-shell:~/code/elm-platform/versions/0.15.1]$ ls -a . add-source-timestamps build_prev.sh cabal.config cabal.sandbox.config lib packages share x86_64-linux-ghc-7.8.4-packages.conf.d .. bin build.sh .cabal-sandbox elm-compiler logs README.md x86_64-linux-ghc-7.10.2-packages.conf.d
[nix-shell:~/code/elm-platform/versions/0.15.1]$ cabal sandbox delete Deleting the sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox
[nix-shell:~/code/elm-platform/versions/0.15.1]$ ls -a . add-source-timestamps build_prev.sh cabal.config lib packages share x86_64-linux-ghc-7.8.4-packages.conf.d .. bin build.sh elm-compiler logs README.md x86_64-linux-ghc-7.10.2-packages.conf.d
[nix-shell:~/code/elm-platform/versions/0.15.1]$ rm -rf elm-compiler/
[nix-shell:~/code/elm-platform/versions/0.15.1]$ ../../installers/fubar.sh erasing all your user ghc and cabal packages - are you sure (y/n) ? y erasing directories under ~/.ghc find: `/home/bburdette/.ghc': No such file or directory erasing ~/.cabal/lib
[nix-shell:~/code/elm-platform/versions/0.15.1]$ bash build.sh Downloading the latest package list from hackage.haskell.org Writing a default package environment file to /home/bburdette/code/elm-platform/versions/0.15.1/cabal.sandbox.config Creating a new sandbox at /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox Cloning into 'elm-compiler'... remote: Counting objects: 20457, done. remote: Total 20457 (delta 0), reused 0 (delta 0), pack-reused 20457 Receiving objects: 100% (20457/20457), 6.12 MiB | 992.00 KiB/s, done. Resolving deltas: 100% (11942/11942), done. Checking connectivity... done. Writing a default package environment file to /home/bburdette/code/elm-platform/versions/0.15.1/elm-compiler/cabal.sandbox.config Using an existing sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox Resolving dependencies... cabal: Could not resolve dependencies: trying: elm-compiler-0.15.1 (user goal) next goal: base (dependency of elm-compiler-0.15.1) rejecting: base-4.8.1.0/installed-4f7..., 4.8.1.0, 4.8.0.0, 4.7.0.2 (global constraint requires ==4.7.0.1) rejecting: base-4.7.0.1 (global constraint requires installed instance) rejecting: base-4.7.0.0, 4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0, 3.0.3.2, 3.0.3.1 (global constraint requires ==4.7.0.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.
[nix-shell:~/code/elm-platform/versions/0.15.1]$
First of all, this:
[nix-shell:~/code/elm-platform/versions/0.15.1]$ ls
add-source-timestamps build_prev.sh cabal.config logs README.md x86_64-linux-ghc-7.10.2-packages.conf.d
bin build.sh lib packages share x86_64-linux-ghc-7.8.4-packages.conf.d
means there is still leftover stuff from the "second" of the two sandboxes I mentioned earlier. Various of those directories are leftovers from the sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1
(rather than the sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox
). But those are not now the problem here, since they will simply be ignored by the new build.sh
. You might still want to clean them up. Like, simply creating the versions/0.15.1
directory completely fresh.
Anyway ... Why is your build still failing? I guess all your new attempts were with GHC 7.10.2? The freezed cabal versions Evan has put into his cabal.config
file (the one you downloaded from elm-platform
and which the build.sh
script is copying into all subdirectories) work only with something from the GHC 7.8 branch. He has said somewhere in another GitHub issue that he is for the moment willing to tell all people that they have to use that version of GHC.
If you want to use a newer GHC, you can replace the cabal.config
from https://github.com/elm-lang/elm-platform/blob/master/versions/0.15.1/cabal.config by this one: https://www.stackage.org/lts-3.2/cabal.config. With that file (put into your directory versions/0.15.1
before you call build.sh
) building everything with GHC 7.10.2 should work. (It does on my machine.)
actually I'm not too concerned about the ghc version... just trying this stuff out to give you guys some input on your build process. I'll give it a go with 7.8 and let you know how it works out.
You probably should be concerned about the GHC version. As it currently is, Evan's cabal.config
does not only tie you to GHC 7.8, but to a specific compiler version within the GHC 7.8 branch. See here: https://github.com/elm-lang/elm-platform/pull/65#issuecomment-135076196.
welp, this is what I get with 7.8.4. I deleted the 'packages' dir, and the dirs that start with x86.., also sandbox delete and fubar and delete the elm-compiler dir.
[nix-shell:~/code/elm-platform/versions/0.15.1]$ ls add-source-timestamps bin build_prev.sh build.sh cabal.config cabal.sandbox.config elm-compiler lib logs packages README.md share
[nix-shell:~/code/elm-platform/versions/0.15.1]$ ls packages/ 00-index.cache 00-index.tar
[nix-shell:~/code/elm-platform/versions/0.15.1]$ rm -r packages/
[nix-shell:~/code/elm-platform/versions/0.15.1]$ rm -rf elm-compiler/
[nix-shell:~/code/elm-platform/versions/0.15.1]$ cabal sandbox delete Deleting the sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox
[nix-shell:~/code/elm-platform/versions/0.15.1]$ ls -a . .. add-source-timestamps bin build_prev.sh build.sh cabal.config lib logs README.md share
[nix-shell:~/code/elm-platform/versions/0.15.1]$ ../../installers/fubar.sh erasing all your user ghc and cabal packages - are you sure (y/n) ? y erasing directories under ~/.ghc find: `/home/bburdette/.ghc': No such file or directory erasing ~/.cabal/lib
[nix-shell:~/code/elm-platform/versions/0.15.1]$ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.8.4
[nix-shell:~/code/elm-platform/versions/0.15.1]$ cabal --version cabal-install version 1.22.6.0 using version 1.22.4.0 of the Cabal library
[nix-shell:~/code/elm-platform/versions/0.15.1]$ bash build.sh Downloading the latest package list from hackage.haskell.org Skipping download: Local and remote files match. Writing a default package environment file to /home/bburdette/code/elm-platform/versions/0.15.1/cabal.sandbox.config Creating a new sandbox at /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox Cloning into 'elm-compiler'... remote: Counting objects: 20457, done. remote: Total 20457 (delta 0), reused 0 (delta 0), pack-reused 20457 Receiving objects: 100% (20457/20457), 6.12 MiB | 628.00 KiB/s, done. Resolving deltas: 100% (11942/11942), done. Checking connectivity... done. Writing a default package environment file to /home/bburdette/code/elm-platform/versions/0.15.1/elm-compiler/cabal.sandbox.config Using an existing sandbox located at /home/bburdette/code/elm-platform/versions/0.15.1/.cabal-sandbox Resolving dependencies... cabal: Could not resolve dependencies: trying: elm-compiler-0.15.1 (user goal) next goal: base (dependency of elm-compiler-0.15.1) rejecting: base-4.7.0.2/installed-cb2..., 4.8.1.0, 4.8.0.0, 4.7.0.2 (global constraint requires ==4.7.0.1) rejecting: base-4.7.0.1 (global constraint requires installed instance) rejecting: base-4.7.0.0, 4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0, 3.0.3.2, 3.0.3.1 (global constraint requires ==4.7.0.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.
[nix-shell:~/code/elm-platform/versions/0.15.1]$
The instructions over there say:
If you end up having dependency troubles, you want to delete the whole cloned repository
It's hard to say what is happening in your case because things are overlapping with each other. It seems that the cabal.config
approach will only work for 7.8.3 or less right now. So this whole approach may be messed up. Such a disappointment. It seems like every new cabal thing is a massive waste of time that still is broken.
Anyway, thanks for sharing info so far.
@bburdette, in my comment I linked you to in my last comment above, https://github.com/elm-lang/elm-platform/pull/65#issuecomment-135076196, I explain that if you use GHC 7.8.4, you should replace the cabal.config
that comes with this repo here by this one: https://www.stackage.org/lts-2.22/cabal.config. You haven't done that?
@evancz, I don't agree that the cabal.config
approach only works for 7.8.3 or less. It's just that you can't impose one cabal.config
file on each compiler (user). But if you had a table saying something like:
... then it should work.
ah it wasn't clear to me that I needed that. Good news though, with the cabal.config you linked it appears to have compiled successfully, with 7.8.4. At least, the compile process ran to completion. I'm not sure where all the executables went though, the only thing in my 'bin' dir is this:
[nix-shell:~/code/elm-platform/versions/0.15.1]$ ls bin/ aeson-pretty elm glsl-pprint
I was expecting elm-repl and etc. I can't see the whole build log, and there's no elm-repl.log in the logs directory.
@jvoigtlaender
@bburdette, it should all be in .cabal-sandbox/bin
not in /bin
@evancz, about checking this works with different compilers: For 7.8.4 we seem to know it does. For 7.8.3 you could try on your machine. For 7.10.2 I tried on my machine yesterday that it works for the master branch of all the various Elm repos. It does not work with 7.10.2 on the 0.15.1 branches. That's because this pull request was opened and merged after the 0.15.1 release. Maybe without the changes from that pull request 0.15.1 cannot be compiled with GHC 7.10.2 at all (so it would be irrelevant whether it can be compiled with GHC 7.10.2 under the specific approach discussed here). In any case, for 0.16 we know (by current state) that the approach would work (because it works for current master).
About figuring out which version to use in a specific setup, I guess one could hardcode into the build.sh
something like a call to ghc --version
, parsing the result, based on that looking up in a table which version of the cabal.config
file should be used, and wget
it from the appropriate location on https://www.stackage.org/.
I definitely built 0.15.1 with GHC 7.10 because folks were asking for this. There should be a few changes before the release to add type annotations and fiddle with imports. Nonetheless, now we know the stackage thing doesn't work with that.
There's a person I met on IRC who is trying to use stack
for this. He says it can download whatever version of GHC you need. I am somewhat skeptical that this will work out, but maybe that's nice.
I feel like if we had directed the last day or two of energy at the npm issues, we'd have had much better results.
@bburdette just to see if perhaps this will help - Elm has a new derivation https://github.com/NixOS/nixpkgs/pull/9233 that just made it into nixpkgs on github (you would need to clone nixpkgs in order to use it). I use:
{ pkgs
, ...
}:
let devpkgs = import <devpkgs> {};
in
{
nixpkgs.config = {
packageOverrides = pkgs: with pkgs; {
elmPackages = devpkgs.elmPackages;
};
};
environment.systemPackages = {
elmPackages.elm-compiler
elmPackages.elm-make
elmPackages.elm-package
};
}
I have devpkgs
set to my cloned nixpkgs in my NIX_PATH
:
export NIX_PATH=$NIX_PATH:devpkgs=/home/me/projects/config/nixpkgs
@evancz, about working on the npm route instead: Yes, that's important also. But I personally don't have anything to contribute there. Plus, npm "only" solves the problem for end users of Elm, not for people trying to help developing Elm tools. They still need a somewhat reliable way to build from source.
Anyway, one lesson from all this, I think, is that upper bounds should be avoided in the .cabal
files of the Elm tools as much as possible (i.e., unless you know in a specific case that an API you use has changed incompatibly in an already existing later version of a Haskell library you use). We are building executables, so we'll notice right away when there is a breakage because of a too liberal (actually, none) upper bound. It's not like a transitive incompatibility with other packages could be noticed only much later like in the case of making a library.
Come to think of it, the "build.sh with cabal.config
" approach can probably be salvaged, even for the combination of 0.15.1 with GHC 7.10.2, by simply adding --allow-newer
to all the cabal install -j
lines in there (which will make it so that upper bounds are ignored).
Added the --allow-newer
flag in https://github.com/elm-lang/elm-platform/pull/67.
Actually I retract my comment suggesting to avoid upper bounds in .cabal files of the Elm tool repos. The --allow-newer flag allows to do that on demand, so having upper bounds by default does no harm, but can salvage the possibility to build older versions of the tools in the future.
@evancz my .cabal-sandbox doens't have a bin directory...
[nix-shell:~/code/elm-platform/versions/0.15.1]$ cd .cabal-sandbox/
[nix-shell:~/code/elm-platform/versions/0.15.1/.cabal-sandbox]$ ls add-source-timestamps packages x86_64-linux-ghc-7.8.4-packages.conf.d
@bburdette, it's impossible to debug this from here, without seeing the state of your directories before and after you do all this, and possibly even in between (i.e., running the build.sh
"manually" one command after the other). The fact alone that you still have a directory .../versions/0.15.1/bin
is highly suspicious. Starting from a fresh git clone
of elm-platform
and then just executing the build.sh
file, there is no explanation for why that directory could exist. So I guess you didn't start fresh.
Anyway, at this point it may be wiser to simply try the install route that is likely to live longer than the build.sh
experiment (and which has been adapted as well in the last few days, so might work for you even if it didn't in the past): What is described in the README at https://github.com/elm-lang/elm-platform, except that the part about adding to the PATH
should actually be done before running runhaskell BuildFromSource.hs 0.15.1
, not afterwards.
Alright, this thread got pretty crazy, so I'm gonna close it and ask to have it split in two.
@bburdette, blow up everything you have created. If you still have troubles, it makes sense to open another issue here if (1) you think there are particular improvements we can make or (2) you just want to report Nix X.Y.Z with GHC A.B.C and cabal L.M.N does not work. I don't think it is super plausible to give "installation support" that will not be transferable to other users, and my main priority is getting things nicer for Debian variants and "hat" variants.
@jvoigtlaender, that sounds intriguing. I have decided I'd like to be a tester of changes like this though, not a developer. If you make something cool, I'll try it out with other folks, but I need to shift away from focusing on this right now.
ok sounds like a plan. I still have my successful 0.15 build to use when I get back around to playing with elm, although I will probably give 0.15.1 another try. best of luck with creating repeatable, deterministic builds!
@evancz, actually I think the build.sh
approach can be scratched now. That is, deleting the whole versions
directory from this repository. That experiment was valuable in learning more about the build problems, but now what insights we got have been taken over into BuildFromSource.hs
, which is what should move forward.
In case you want to keep around the versions/0.15.1/build.sh
stuff, I'll add to it the --constraint=fsnotify<0.2
stuff needed for compiling the relevant version of elm-reactor
in some scenarios. But as I said, in my view this stuff can go now.
Okay, sounds good to me!
I recently installed elm on nixos. Currently on nixos there are a couple of elm related packages available (which I don't quite remember), but not elm-repl or the other stuff that comes with the elm-platform.
A while back I tried the npm install method on nixos, but I had trouble. One issue there, perhaps, is that global npm installation is not possible on nixos, only local. At any rate I don't remember what the problem was, exactly.
This time, I decided to install from source. I initially built version 0.15. However, I had problems with the elm-architecture tutorial project. On the email list it was suggested that elm-architecture requires 0.15.1.
Installing 0.15.1 resulted in package conflicts with ghc 7.8.4 and with 7.10.2, I tried both compiler versions. this was with the "runhaskell BuildFromSource.hs 0.15.1" method. I blew away my ~/.ghc and ~/.cabal directories several times during these attempts, as well as the "0.15.1" directory.
Going back to 7.8.4, I was again able to compile elm 0.15 again. Now my approach will be to find a version of the elm-architecture project that works with 0.15, and just try working with 0.15 for a while.