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

Can't install #29

Closed
Eoksni opened this issue Jan 26, 2018 · 7 comments
Closed

Can't install #29

Eoksni opened this issue Jan 26, 2018 · 7 comments

Comments

@Eoksni
Copy link

Eoksni commented Jan 26, 2018

stack install halive results in this

    Configuring halive-0.1.3...
    Preprocessing library for halive-0.1.3..
    Building library for halive-0.1.3..
    [1 of 6] Compiling Halive.Concurrent ( src\Halive\Concurrent.hs, .stack-work\dist\5c8418a7\build\Halive\Concurrent.o )
    [2 of 6] Compiling Halive.FileListener ( src\Halive\FileListener.hs, .stack-work\dist\5c8418a7\build\Halive\FileListener.o )
    [3 of 6] Compiling Halive.FindPackageDBs ( src\Halive\FindPackageDBs.hs, .stack-work\dist\5c8418a7\build\Halive\FindPackageDBs.o )

    src\Halive\FindPackageDBs.hs:33:7: error:
        Not in scope: `extraPkgConfs'
       |
    33 |     { extraPkgConfs =
       |       ^^^^^^^^^^^^^

    src\Halive\FindPackageDBs.hs:56:29: error:
        Not in scope: `extraPkgConfs'
       |
    56 |             return dflags { extraPkgConfs = (pkgs ++) . extraPkgConfs dflags }
       |                             ^^^^^^^^^^^^^

    src\Halive\FindPackageDBs.hs:78:29: error:
        Not in scope: `extraPkgConfs'
       |
    78 |             return dflags { extraPkgConfs = (pkgs ++) . extraPkgConfs dflags }
       |                             ^^^^^^^^^^^^^

    src\Halive\FindPackageDBs.hs:85:38: error:
        Not in scope: `extraPkgConfs'
       |
    85 |         [pkgconf] -> return dflags { extraPkgConfs = (PkgConfFile pkgconf :) . extraPkgConfs dflags }
       |                                      ^^^^^^^^^^^^^

OS Windows 10

@schell
Copy link
Contributor

schell commented Jan 26, 2018

@Eoksni which version of GHC are you using?

@schell
Copy link
Contributor

schell commented Jan 26, 2018

Wait - I think I can tell from the nice underlining there. It looks like you're using 8.2. I have a PR up for GHC 8.2 here. In the meantime you can configure stack to pull from my commit and see if that works. Please let me know how it goes!

@Eoksni
Copy link
Author

Eoksni commented Jan 27, 2018

@schell Hey, I'm new to the Haskell world and not sure how to "configure stack to pull from my commit".
What I did is I cloned you repo, switched to the ghc8.2 branch and used stack build there. It downloaded ghc 8.2.1 and started doing a loooooot of text which ended with:

... a lot of similar lines ...
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\libxaudio2_8.a
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\libxinput.a
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\libxinput1_1.a
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\libxinput1_2.a
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\libxinput1_3.a
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\libxinput1_4.a
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\libxinput9_1_0.a
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\libzoneoc.a
Extracting  ghc-8.2.1\mingw\x86_64-w64-mingw32\lib\txtmode.o
Extracting  ghc-8.2.1\perl
Extracting  ghc-8.2.1\perl\perl.exe
Extracting  ghc-8.2.1\perl\perl56.dll

Everything is Ok

Folders: 473
Files: 9840
Size:       1780920578
Compressed: 1788733440
GHC installed to C:\Users\Dmitriy\AppData\Local\Programs\stack\x86_64-windows\ghc-8.2.1\

C:\sr\setup-exe-src\setup-Z6RU0evB.hs:1:1: error:
    lexical error (UTF-8 decoding error)
  |
1 | ?????????????????????????????????????????????
  | ^

--  While building simple Setup.hs using:
      C:\Users\Dmitriy\AppData\Local\Programs\stack\x86_64-windows\ghc-8.2.1\bin\ghc.EXE -rtsopts -threaded -clear-package-db -global-package-db -hide-all-packages -package base -main-is StackSetupShim.mainOverride -package Cabal-2.0.0.2 C:\sr\setup-exe-src\setup-Z6RU0evB.hs C:\sr\setup-exe-src\setup-shim-Z6RU0evB.hs -o C:\sr\setup-exe-cache\x86_64-windows\tmp-Cabal-simple_Z6RU0evB_2.0.0.2_ghc-8.2.1.exe
    Process exited with code: ExitFailure 1

And btw regarding you question - yes, I think I'm using ghc 8.2, to be precise stack exec ghc -- --version results in

The Glorious Glasgow Haskell Compilation System, version 8.2.2

when I'm out of that cloned repo.

@schell
Copy link
Contributor

schell commented Jan 27, 2018

@Eoksni if you're working on a project with stack then you can point stack to use a specific package version (by commit hash) by using some special syntax in your projects stack.yaml file. If you're just installing global packages then you can do the same in your global stack.yaml (https://docs.haskellstack.org/en/stable/GUIDE/#finding-project-configs-and-the-implicit-global-project). Once you have found the proper stack.yaml, there should already be a field called packages where you can add the following lines:

- location:
    git: https://github.com/schell/halive
    commit: 0bdd05305aaa7d80cdec115eb816e29300e44a2d
  extra-dep: true

That will tell stack to pull the halive package from that specific commit on github.

@Eoksni
Copy link
Author

Eoksni commented Jan 27, 2018

@schell Thank you! I added it to my project stack.yaml and stack build halive builds successfully. I guess I close the issue now.

@Eoksni Eoksni closed this as completed Jan 27, 2018
@schell
Copy link
Contributor

schell commented Jan 27, 2018

Glad that worked!

@francisdb
Copy link

This is still broken, there is a workaround but the ticket should stay open?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants