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

stack ghci in the checked out repository complains #274

Closed
573 opened this Issue Jul 15, 2015 · 14 comments

Comments

Projects
None yet
2 participants
@573

573 commented Jul 15, 2015

Following the (new) steps outlined in the developer guide I get - trying stack ghci:

Configuring GHCi with the following packages: hledger-lib, hledger-web, hledger
GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help
: cannot satisfy -package base-compat
(use -v for more information)

@simonmichael

This comment has been minimized.

Show comment
Hide comment
@simonmichael

simonmichael Jul 15, 2015

Owner

Thanks for the report. I haven't fully stack-updated the dev guide apart from the "how to set up for development" section. Does stack build succeed ? Can you paste the commands you're using ? Here, stack ghci gives a lot of errors but stack ghci hledger-lib, stack ghci hledger, stack ghci hledger-web seem to work.

Owner

simonmichael commented Jul 15, 2015

Thanks for the report. I haven't fully stack-updated the dev guide apart from the "how to set up for development" section. Does stack build succeed ? Can you paste the commands you're using ? Here, stack ghci gives a lot of errors but stack ghci hledger-lib, stack ghci hledger, stack ghci hledger-web seem to work.

@simonmichael

This comment has been minimized.

Show comment
Hide comment
@simonmichael

simonmichael Jul 15, 2015

Owner

PS: fixed typo in previous comment, I meant stack ghci PKG.

Owner

simonmichael commented Jul 15, 2015

PS: fixed typo in previous comment, I meant stack ghci PKG.

@573

This comment has been minimized.

Show comment
Hide comment
@573

573 Jul 16, 2015

I. e. stack ghci hledger-lib gives:

Version 0.1.2.0, Git revision 65246552936b7da4b64b38372feac903d96a8911 (dirty)
2015-07-16 07:08:07.750288: [debug] Checking for project config at: /code/hledger/stack.yaml @(stack-0.1.2.0:Stack.Config src/Stack/Config.hs:496:9)
2015-07-16 07:08:07.760839: [debug] Loading project config file stack.yaml @(stack-0.1.2.0:Stack.Config src/Stack/Config.hs:519:13)
2015-07-16 07:08:07.817059: [debug] Run process: ghc --numeric-version @(stack-0.1.2.0:System.Process.Read src/System/Process/Read.hs:254:3)
2015-07-16 07:08:07.911267: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal id @(stack-0.1.2.0:System.Process.Read src/System/Process/Read.hs:254:3)
2015-07-16 07:08:08.005435: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack-0.1.2.0:System.Process.Read src/System/Process/Read.hs:254:3)
2015-07-16 07:08:08.892584: [info] Configuring GHCi with the following packages: hledger-lib @(stack-0.1.2.0:Stack.Repl src/Stack/Repl.hs:69:5)
2015-07-16 07:08:08.900225: [debug] Run process: /root/.stack/programs/x86_64-linux/ghc-7.10.1/bin/ghc --interactive -hide-all-packages -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -i/code/hledger/hledger-lib/ -i/code/hledger/hledger-lib/.stack-work/dist/x86_64-linux/Cabal-1.22.2.0/build/autogen/ -optP-include -optP/code/hledger/hledger-lib/.stack-work/dist/x86_64-linux/Cabal-1.22.2.0/build/autogen/cabal_macros.h -package=base -package=base-compat -package=array -package=blaze-markup -package=bytestring -package=cmdargs -package=containers -package=csv -package=Decimal -package=directory -package=filepath -package=mtl -package=mtl-compat -package=old-time -package=parsec -package=regex-tdfa -package=safe -package=split -package=transformers -package=utf8-string -package=HUnit -package=pretty-show -package=time -i/code/hledger/hledger-lib/tests/ -package=hledger-lib -package=test-framework -package=test-framework-hunit /code/hledger/hledger-lib/Hledger.hs /code/hledger/hledger-lib/Hledger/Data.hs /code/hledger/hledger-lib/Hledger/Data/Account.hs /code/hledger/hledger-lib/Hledger/Data/AccountName.hs /code/hledger/hledger-lib/Hledger/Data/Amount.hs /code/hledger/hledger-lib/Hledger/Data/Commodity.hs /code/hledger/hledger-lib/Hledger/Data/Dates.hs /code/hledger/hledger-lib/Hledger/Data/Journal.hs /code/hledger/hledger-lib/Hledger/Data/Ledger.hs /code/hledger/hledger-lib/Hledger/Data/OutputFormat.hs /code/hledger/hledger-lib/Hledger/Data/Posting.hs /code/hledger/hledger-lib/Hledger/Data/RawOptions.hs /code/hledger/hledger-lib/Hledger/Data/TimeLog.hs /code/hledger/hledger-lib/Hledger/Data/Transaction.hs /code/hledger/hledger-lib/Hledger/Data/Types.hs /code/hledger/hledger-lib/Hledger/Query.hs /code/hledger/hledger-lib/Hledger/Read.hs /code/hledger/hledger-lib/Hledger/Read/CsvReader.hs /code/hledger/hledger-lib/Hledger/Read/JournalReader.hs /code/hledger/hledger-lib/Hledger/Read/TimelogReader.hs /code/hledger/hledger-lib/Hledger/Reports.hs /code/hledger/hledger-lib/Hledger/Reports/BalanceHistoryReport.hs /code/hledger/hledger-lib/Hledger/Reports/BalanceReport.hs /code/hledger/hledger-lib/Hledger/Reports/EntriesReport.hs /code/hledger/hledger-lib/Hledger/Reports/MultiBalanceReports.hs /code/hledger/hledger-lib/Hledger/Reports/PostingsReport.hs /code/hledger/hledger-lib/Hledger/Reports/ReportOptions.hs /code/hledger/hledger-lib/Hledger/Reports/TransactionsReports.hs /code/hledger/hledger-lib/Hledger/Utils.hs /code/hledger/hledger-lib/Hledger/Utils/Debug.hs /code/hledger/hledger-lib/Hledger/Utils/Regex.hs /code/hledger/hledger-lib/Hledger/Utils/UTF8IOCompat.hs @(stack-0.1.2.0:Stack.Exec src/Stack/Exec.hs:52:5)
GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help
: cannot satisfy -package base-compat
(use -v for more information)

573 commented Jul 16, 2015

I. e. stack ghci hledger-lib gives:

Version 0.1.2.0, Git revision 65246552936b7da4b64b38372feac903d96a8911 (dirty)
2015-07-16 07:08:07.750288: [debug] Checking for project config at: /code/hledger/stack.yaml @(stack-0.1.2.0:Stack.Config src/Stack/Config.hs:496:9)
2015-07-16 07:08:07.760839: [debug] Loading project config file stack.yaml @(stack-0.1.2.0:Stack.Config src/Stack/Config.hs:519:13)
2015-07-16 07:08:07.817059: [debug] Run process: ghc --numeric-version @(stack-0.1.2.0:System.Process.Read src/System/Process/Read.hs:254:3)
2015-07-16 07:08:07.911267: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal id @(stack-0.1.2.0:System.Process.Read src/System/Process/Read.hs:254:3)
2015-07-16 07:08:08.005435: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack-0.1.2.0:System.Process.Read src/System/Process/Read.hs:254:3)
2015-07-16 07:08:08.892584: [info] Configuring GHCi with the following packages: hledger-lib @(stack-0.1.2.0:Stack.Repl src/Stack/Repl.hs:69:5)
2015-07-16 07:08:08.900225: [debug] Run process: /root/.stack/programs/x86_64-linux/ghc-7.10.1/bin/ghc --interactive -hide-all-packages -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -i/code/hledger/hledger-lib/ -i/code/hledger/hledger-lib/.stack-work/dist/x86_64-linux/Cabal-1.22.2.0/build/autogen/ -optP-include -optP/code/hledger/hledger-lib/.stack-work/dist/x86_64-linux/Cabal-1.22.2.0/build/autogen/cabal_macros.h -package=base -package=base-compat -package=array -package=blaze-markup -package=bytestring -package=cmdargs -package=containers -package=csv -package=Decimal -package=directory -package=filepath -package=mtl -package=mtl-compat -package=old-time -package=parsec -package=regex-tdfa -package=safe -package=split -package=transformers -package=utf8-string -package=HUnit -package=pretty-show -package=time -i/code/hledger/hledger-lib/tests/ -package=hledger-lib -package=test-framework -package=test-framework-hunit /code/hledger/hledger-lib/Hledger.hs /code/hledger/hledger-lib/Hledger/Data.hs /code/hledger/hledger-lib/Hledger/Data/Account.hs /code/hledger/hledger-lib/Hledger/Data/AccountName.hs /code/hledger/hledger-lib/Hledger/Data/Amount.hs /code/hledger/hledger-lib/Hledger/Data/Commodity.hs /code/hledger/hledger-lib/Hledger/Data/Dates.hs /code/hledger/hledger-lib/Hledger/Data/Journal.hs /code/hledger/hledger-lib/Hledger/Data/Ledger.hs /code/hledger/hledger-lib/Hledger/Data/OutputFormat.hs /code/hledger/hledger-lib/Hledger/Data/Posting.hs /code/hledger/hledger-lib/Hledger/Data/RawOptions.hs /code/hledger/hledger-lib/Hledger/Data/TimeLog.hs /code/hledger/hledger-lib/Hledger/Data/Transaction.hs /code/hledger/hledger-lib/Hledger/Data/Types.hs /code/hledger/hledger-lib/Hledger/Query.hs /code/hledger/hledger-lib/Hledger/Read.hs /code/hledger/hledger-lib/Hledger/Read/CsvReader.hs /code/hledger/hledger-lib/Hledger/Read/JournalReader.hs /code/hledger/hledger-lib/Hledger/Read/TimelogReader.hs /code/hledger/hledger-lib/Hledger/Reports.hs /code/hledger/hledger-lib/Hledger/Reports/BalanceHistoryReport.hs /code/hledger/hledger-lib/Hledger/Reports/BalanceReport.hs /code/hledger/hledger-lib/Hledger/Reports/EntriesReport.hs /code/hledger/hledger-lib/Hledger/Reports/MultiBalanceReports.hs /code/hledger/hledger-lib/Hledger/Reports/PostingsReport.hs /code/hledger/hledger-lib/Hledger/Reports/ReportOptions.hs /code/hledger/hledger-lib/Hledger/Reports/TransactionsReports.hs /code/hledger/hledger-lib/Hledger/Utils.hs /code/hledger/hledger-lib/Hledger/Utils/Debug.hs /code/hledger/hledger-lib/Hledger/Utils/Regex.hs /code/hledger/hledger-lib/Hledger/Utils/UTF8IOCompat.hs @(stack-0.1.2.0:Stack.Exec src/Stack/Exec.hs:52:5)
GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help
: cannot satisfy -package base-compat
(use -v for more information)

@573

This comment has been minimized.

Show comment
Hide comment
@573

573 Jul 16, 2015

For the stack build part, the linker seems to be missing a library actually, I'll only cite the logs (966 ll. long) tail here:

-- While building package wizards-1.0.2 using:
/root/.stack/programs/x86_64-linux/ghc-7.10.1/bin/runhaskell -package=Cabal-1.22.2.0 -clear-package-db -global-package-db -package-db=/root/.stack/snapshots/x86_64-linux/nightly-2015-07-01/7.10.1/pkgdb/ /tmp/stack1760/Setup.hs --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.2.0/ build
Process exited with code: ExitFailure 1
Logs have been written to: "/code/hledger/.stack-work/logs/wizards-1.0.2.log"

Configuring wizards-1.0.2...
Building wizards-1.0.2...
Preprocessing library wizards-1.0.2...

on the commandline: Warning:
    -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
[1 of 5] Compiling System.Console.Wizard.Internal ( System/Console/Wizard/Internal.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.2.0/build/System/Console/Wizard/Internal.o )
[2 of 5] Compiling System.Console.Wizard ( System/Console/Wizard.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.2.0/build/System/Console/Wizard.o )
[3 of 5] Compiling System.Console.Wizard.Haskeline ( System/Console/Wizard/Haskeline.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.2.0/build/System/Console/Wizard/Haskeline.o )
[4 of 5] Compiling System.Console.Wizard.BasicIO ( System/Console/Wizard/BasicIO.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.2.0/build/System/Console/Wizard/BasicIO.o )
[5 of 5] Compiling System.Console.Wizard.Pure ( System/Console/Wizard/Pure.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.2.0/build/System/Console/Wizard/Pure.o )
/usr/bin/ld: cannot find -ltinfo
collect2: error: ld returned 1 exit status

573 commented Jul 16, 2015

For the stack build part, the linker seems to be missing a library actually, I'll only cite the logs (966 ll. long) tail here:

-- While building package wizards-1.0.2 using:
/root/.stack/programs/x86_64-linux/ghc-7.10.1/bin/runhaskell -package=Cabal-1.22.2.0 -clear-package-db -global-package-db -package-db=/root/.stack/snapshots/x86_64-linux/nightly-2015-07-01/7.10.1/pkgdb/ /tmp/stack1760/Setup.hs --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.2.0/ build
Process exited with code: ExitFailure 1
Logs have been written to: "/code/hledger/.stack-work/logs/wizards-1.0.2.log"

Configuring wizards-1.0.2...
Building wizards-1.0.2...
Preprocessing library wizards-1.0.2...

on the commandline: Warning:
    -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
[1 of 5] Compiling System.Console.Wizard.Internal ( System/Console/Wizard/Internal.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.2.0/build/System/Console/Wizard/Internal.o )
[2 of 5] Compiling System.Console.Wizard ( System/Console/Wizard.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.2.0/build/System/Console/Wizard.o )
[3 of 5] Compiling System.Console.Wizard.Haskeline ( System/Console/Wizard/Haskeline.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.2.0/build/System/Console/Wizard/Haskeline.o )
[4 of 5] Compiling System.Console.Wizard.BasicIO ( System/Console/Wizard/BasicIO.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.2.0/build/System/Console/Wizard/BasicIO.o )
[5 of 5] Compiling System.Console.Wizard.Pure ( System/Console/Wizard/Pure.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.2.0/build/System/Console/Wizard/Pure.o )
/usr/bin/ld: cannot find -ltinfo
collect2: error: ld returned 1 exit status
@573

This comment has been minimized.

Show comment
Hide comment
@573

573 Jul 16, 2015

Will try sudo apt-get install libtinfo-dev

573 commented Jul 16, 2015

Will try sudo apt-get install libtinfo-dev

@573

This comment has been minimized.

Show comment
Hide comment
@573

573 Jul 16, 2015

stack build works with the library installed.

573 commented Jul 16, 2015

stack build works with the library installed.

@573

This comment has been minimized.

Show comment
Hide comment
@573

573 Jul 16, 2015

stack ghci hledger-lib now gives:

GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help
: cannot satisfy -package test-framework
(use -v for more information)

573 commented Jul 16, 2015

stack ghci hledger-lib now gives:

GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help
: cannot satisfy -package test-framework
(use -v for more information)

@573

This comment has been minimized.

Show comment
Hide comment
@573

573 Jul 16, 2015

running stack test and then stack ghci hledger-lib again worked.

573 commented Jul 16, 2015

running stack test and then stack ghci hledger-lib again worked.

@573

This comment has been minimized.

Show comment
Hide comment
@573

573 Jul 16, 2015

stack ghci hledger:

root@8f48ad32cb97:/code/hledger# stack ghci hledger
Configuring GHCi with the following packages: hledger
GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help
: cannot satisfy -package criterion
(use -v for more information)

stack ghci hledger-web:

root@8f48ad32cb97:/code/hledger# stack ghci hledger-web
Configuring GHCi with the following packages: hledger-web
GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help
[ 1 of 16] Compiling Handler.Utils ( /code/hledger/hledger-web/Handler/Utils.
hs, interpreted )
[ 2 of 16] Compiling Settings.Development ( /code/hledger/hledger-web/Settings/D
evelopment.hs, interpreted )
[ 3 of 16] Compiling Settings ( /code/hledger/hledger-web/Settings.hs, i
nterpreted )
[ 4 of 16] Compiling Settings.StaticFiles ( /code/hledger/hledger-web/Settings/S
taticFiles.hs, interpreted )

/code/hledger/hledger-web/Settings/StaticFiles.hs:31:22:
Exception when trying to run compile-time code:
static: getDirectoryContents: does not exist (No such file or directory)
Code: embed staticDir
In the splice: $(Static.embed staticDir)
Failed, modules loaded: Settings, Settings.Development, Handler.Utils.
*Handler.Utils>

573 commented Jul 16, 2015

stack ghci hledger:

root@8f48ad32cb97:/code/hledger# stack ghci hledger
Configuring GHCi with the following packages: hledger
GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help
: cannot satisfy -package criterion
(use -v for more information)

stack ghci hledger-web:

root@8f48ad32cb97:/code/hledger# stack ghci hledger-web
Configuring GHCi with the following packages: hledger-web
GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help
[ 1 of 16] Compiling Handler.Utils ( /code/hledger/hledger-web/Handler/Utils.
hs, interpreted )
[ 2 of 16] Compiling Settings.Development ( /code/hledger/hledger-web/Settings/D
evelopment.hs, interpreted )
[ 3 of 16] Compiling Settings ( /code/hledger/hledger-web/Settings.hs, i
nterpreted )
[ 4 of 16] Compiling Settings.StaticFiles ( /code/hledger/hledger-web/Settings/S
taticFiles.hs, interpreted )

/code/hledger/hledger-web/Settings/StaticFiles.hs:31:22:
Exception when trying to run compile-time code:
static: getDirectoryContents: does not exist (No such file or directory)
Code: embed staticDir
In the splice: $(Static.embed staticDir)
Failed, modules loaded: Settings, Settings.Development, Handler.Utils.
*Handler.Utils>

@573

This comment has been minimized.

Show comment
Hide comment
@573

573 Jul 16, 2015

stack bench then stack ghci hledger works, i guess i got stack now 😉.

573 commented Jul 16, 2015

stack bench then stack ghci hledger works, i guess i got stack now 😉.

@simonmichael

This comment has been minimized.

Show comment
Hide comment
@simonmichael

simonmichael Jul 16, 2015

Owner

Valuable testing, thanks! So it looks like currently

  • stack doesn't fetch system libraries like terminfo
  • stack ghci doesn't fetch deps
  • stack ghci seems to require the test and benchmark deps for some reason, and you have to stack test and stack bench (both) to fetch those
Owner

simonmichael commented Jul 16, 2015

Valuable testing, thanks! So it looks like currently

  • stack doesn't fetch system libraries like terminfo
  • stack ghci doesn't fetch deps
  • stack ghci seems to require the test and benchmark deps for some reason, and you have to stack test and stack bench (both) to fetch those
@simonmichael

This comment has been minimized.

Show comment
Hide comment
@simonmichael

simonmichael Jul 16, 2015

Owner
  • stack ghci hledger-web needs to find things like static/ in its working directory, and doesn't in your case
Owner

simonmichael commented Jul 16, 2015

  • stack ghci hledger-web needs to find things like static/ in its working directory, and doesn't in your case
@573

This comment has been minimized.

Show comment
Hide comment
@573

573 Jul 17, 2015

Had fun and you're welcome! The list of open points appears good to me.

573 commented Jul 17, 2015

Had fun and you're welcome! The list of open points appears good to me.

@simonmichael

This comment has been minimized.

Show comment
Hide comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment