Skip to content
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.

Trying to fix issues with build script #65

Merged
merged 1 commit into from
Aug 27, 2015
Merged

Trying to fix issues with build script #65

merged 1 commit into from
Aug 27, 2015

Conversation

jvoigtlaender
Copy link
Contributor

Addresses #64.

Corresponding changes would apply to BuildFromSource.hs.

@mgold
Copy link

mgold commented Aug 26, 2015

I tried this and it didn't work for me (same system as in #63), with the much shorter error,

Downloading the latest package list from hackage.haskell.org
Skipping download: Local and remote files match.
Writing a default package environment file to
/opt/elm-platform/versions/0.15.1/cabal.sandbox.config
Using an existing sandbox located at
/opt/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 | 0 bytes/s, done.
Resolving deltas: 100% (11942/11942), done.
Checking connectivity... done.
Writing a default package environment file to
/opt/elm-platform/versions/0.15.1/elm-compiler/cabal.sandbox.config
Using an existing sandbox located at
/opt/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-5ef..., 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.

The "existing sandbox" at /opt/elm-platform/versions/0.15.1/.cabal-sandbox did not exist prior to running build.sh, and yes, that's the patched version from the PR.

@jvoigtlaender
Copy link
Contributor Author

I can copy over the last part of this comment: #61 (comment):

"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.)"

@mgold
Copy link

mgold commented Aug 26, 2015

Thanks, but I'm on GHC 7.8.4.

@jvoigtlaender
Copy link
Contributor Author

Well, same problem. GHC 7.8.4 uses base-4.7.0.2, but Evan's cabal.config says that base has to be exactly 4.7.0.1. Evan is fixing a specific compiler from the GHC 7.8 branch.

So, to apply my suggestion above, replace cabal.config not by https://www.stackage.org/lts-3.2/cabal.config, but by something compatible with GHC 7.8.4. Possibly https://www.stackage.org/lts-2.22/cabal.config.

@evancz
Copy link
Contributor

evancz commented Aug 26, 2015

This is such a nightmare. So each version of GHC corresponds to a specific "double patch" version of base? Is this documented anywhere?

Has anyone in Haskell ever made a binary that can be built with 7.6 and 7.8 and 7.10 reliably?

It seems like cabal freeze and whatever stackage stuff (which again, probably does not work with 0.15.1 because @jvoigtlaender needed to make changes for the master branch) don't actually solve this problem. Maybe we have to freeze for all possible compilers and then || the results together?

@evancz
Copy link
Contributor

evancz commented Aug 26, 2015

Based on the fact that cabal.config cannot be used across different versions of GHC, I think this whole enterprise is doomed. If it's possible, cool, but I can't lead the way anymore. I'm going to get rid of the experiment as a failure.

Thanks for taking a look at this everyone.

@evancz evancz closed this Aug 26, 2015
@evancz evancz reopened this Aug 27, 2015
evancz pushed a commit that referenced this pull request Aug 27, 2015
Trying to fix issues with build script
@evancz evancz merged commit 1671275 into elm-lang:master Aug 27, 2015
@evancz
Copy link
Contributor

evancz commented Aug 27, 2015

Sorry, I just got pretty upset at everything not working every time and wanted to give up on it. I'm in year 3+ of "cabal does not work, I can't build elm-*" so I don't have much hope left. I guess I need to get over that, and I think this is an improvement and maybe can get us to a thing that "just works".

@jvoigtlaender jvoigtlaender deleted the patch-1 branch August 27, 2015 05:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants