error: attribute 'ghc883' missing, at (string):1:43

97 views
Skip to first unread message

Amy de Buitléir

unread,
Apr 8, 2020, 3:55:07 PM4/8/20
to haskell-stack
I can't create build a starter project in Stack. My OS is NixOS.

$ stack --version

Version 2.1.3, Git revision 636e3a759d51127df2b62f90772def126cdf6d1f (7735 commits) x86_64 hpack-0.31.2


As shown below, `stack new` gives some warnings.

$ stack --verbose new amy1
Version 2.1.3, Git revision 636e3a759d51127df2b62f90772def126cdf6d1f (7735 commits) x86_64 hpack-0.31.2
2020-04-08 20:30:03.639665: [debug] No project config file found, using defaults.
2020-04-08 20:30:03.643738: [debug] SELECT COUNT(*) FROM "last_performed" WHERE ("action"=?) AND ("timestamp">=?); [PersistInt64 1,PersistUTCTime 2020-04-07 19:30:03.643700965 UTC]
2020-04-08 20:30:03.644153: [debug] Run from outside a project, using implicit global project config
2020-04-08 20:30:03.644397: [debug] Using resolver: lts-12.24 from implicit global project's config file: /home/amy/.stack/global-project/stack.yaml
2020-04-08 20:30:03.644484: [debug] Using package location completions from a lock file
2020-04-08 20:30:03.779085: [debug] PATH is: Just "/home/amy/.conda/condabin:/home/amy/wain-tools:/home/amy/bin:/home/amy/.local/bin:/home/amy/.cabal/bin:/home/amy/bin:/run/wrappers/bin:/home/amy/.nix-profile/bin:/etc/profiles/per-user/amy/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin"
2020-04-08 20:30:03.779143: [debug] Using a nix-shell environment with nix packages: haskell.compiler.ghc844, git, gcc, gmp
2020-04-08 20:30:03.779262: [debug] Run process: /home/amy/.nix-profile/bin/nix-shell --pure -E "with (import <nixpkgs> {}); let inputs = [haskell.compiler.ghc844 git gcc gmp]; libPath = lib.makeLibraryPath inputs; stackExtraArgs = lib.concatMap (pkg: [ ''--extra-lib-dirs=${lib.getLib pkg}/lib''   ''--extra-include-dirs=${lib.getDev pkg}/include'' ]) inputs; in runCommand ''myEnv'' { buildInputs = lib.optional stdenv.isLinux glibcLocales ++ inputs; STACK_PLATFORM_VARIANT=''nix''; STACK_IN_NIX_SHELL=1; LD_LIBRARY_PATH = libPath;STACK_IN_NIX_EXTRA_ARGS = stackExtraArgs; LANG=\"en_US.UTF-8\";} \"\"" --run "'
/home/amy/.local/bin/stack' $STACK_IN_NIX_EXTRA_ARGS '--internal-re-exec-version=2.1.3' '--verbose' 'new' 'amy1'"
warning: unknown setting '
sandbox-fallback'
warning: unknown setting '
system-features'
Version 2.1.3, Git revision 636e3a759d51127df2b62f90772def126cdf6d1f (7735 commits) x86_64 hpack-0.31.2
2020-04-08 20:30:04.683798: [debug] No project config file found, using defaults.
2020-04-08 20:30:04.687392: [debug] SELECT COUNT(*) FROM "last_performed" WHERE ("action"=?) AND ("timestamp">=?); [PersistInt64 1,PersistUTCTime 2020-04-07 19:30:04.687364165 UTC]
2020-04-08 20:30:04.687772: [debug] Opening local template: "new-template.hsfiles"
2020-04-08 20:30:04.689343: [info] Downloading template "new-template" to create project "amy1" in amy1/ ...
2020-04-08 20:30:04.689395: [debug] Downloading /commercialhaskell/stack-templates/master/new-template.hsfiles
2020-04-08 20:30:04.842154: [debug] Opening local template: "/home/amy/.stack/templates/new-template.hsfiles"
2020-04-08 20:30:04.856510: [info]
The following parameters were needed by the template but not provided: category, copyright
You can provide them in /home/amy/.stack/config.yaml, like this:
templates:
  params:
    category: value
    copyright: value
Or you can pass each one as parameters like this:
stack new amy1 new-template -p "category:value" -p "copyright:value"

2020-04-08 20:30:04.857531: [info] Looking for .cabal or package.yaml files to use to init the project.
2020-04-08 20:30:04.857803: [info] Using cabal packages:
2020-04-08 20:30:04.857851: [info] - amy1/

2020-04-08 20:30:04.857904: [debug] Running hpack on /home/amy/amy1/package.yaml
2020-04-08 20:30:04.859757: [debug] hpack generated a modified version of /home/amy/amy1/amy1.cabal
2020-04-08 20:30:04.861012: [debug] Downloading snapshot versions file from https://s3.amazonaws.com/haddock.stackage.org/snapshots.json
2020-04-08 20:30:05.358056: [debug] Done downloading and parsing snapshot versions file
2020-04-08 20:30:05.358183: [info] Selecting the best among 17 snapshots...

2020-04-08 20:30:05.507398: [info] * Matches lts-15.7
2020-04-08 20:30:05.507480: [info]
2020-04-08 20:30:05.507518: [info] Selected resolver: lts-15.7
2020-04-08 20:30:05.507655: [info] Initialising configuration using resolver: lts-15.7
2020-04-08 20:30:05.507698: [info] Total number of user packages considered: 1
2020-04-08 20:30:05.507733: [info] Writing configuration to file: amy1/stack.yaml
2020-04-08 20:30:05.508116: [info] All done.


Then `stack setup` reports an error.

$ stack --verbose setup
Version 2.1.3, Git revision 636e3a759d51127df2b62f90772def126cdf6d1f (7735 commits) x86_64 hpack-0.31.2
2020-04-08 20:31:12.700615: [debug] Checking for project config at: /home/amy/amy1/stack.yaml
2020-04-08 20:31:12.700763: [debug] Loading project config file stack.yaml
2020-04-08 20:31:12.704717: [debug] SELECT COUNT(*) FROM "last_performed" WHERE ("action"=?) AND ("timestamp">=?); [PersistInt64 1,PersistUTCTime 2020-04-07 19:31:12.704683873 UTC]
2020-04-08 20:31:12.705148: [debug] Not reading lock file
2020-04-08 20:31:12.835925: [debug] Running hpack on /home/amy/amy1/package.yaml
2020-04-08 20:31:12.838569: [debug] hpack output unchanged in /home/amy/amy1/amy1.cabal
2020-04-08 20:31:12.881434: [debug] Migration executed: CREATE TABLE "config_cache"("id" INTEGER PRIMARY KEY,"directory" VARCHAR NOT NULL DEFAULT (hex(randomblob(16))),"type" VARCHAR NOT NULL,"pkg_src" VARCHAR NOT NULL,"active" BOOLEAN NOT NULL,"path_env_var" VARCHAR NOT NULL,"haddock" BOOLEAN NOT NULL DEFAULT 0,CONSTRAINT "unique_config_cache" UNIQUE ("directory","type"))
2020-04-08 20:31:12.881537: [debug] Migration executed: CREATE TABLE "config_cache_dir_option"("id" INTEGER PRIMARY KEY,"config_cache_id" INTEGER NOT NULL REFERENCES "config_cache","index" INTEGER NOT NULL,"option" VARCHAR NOT NULL,CONSTRAINT "unique_config_cache_dir_option" UNIQUE ("config_cache_id","index"))
2020-04-08 20:31:12.881601: [debug] Migration executed: CREATE TABLE "config_cache_no_dir_option"("id" INTEGER PRIMARY KEY,"config_cache_id" INTEGER NOT NULL REFERENCES "config_cache","index" INTEGER NOT NULL,"option" VARCHAR NOT NULL,CONSTRAINT "unique_config_cache_no_dir_option" UNIQUE ("config_cache_id","index"))
2020-04-08 20:31:12.881657: [debug] Migration executed: CREATE TABLE "config_cache_dep"("id" INTEGER PRIMARY KEY,"config_cache_id" INTEGER NOT NULL REFERENCES "config_cache","ghc_pkg_id" VARCHAR NOT NULL,CONSTRAINT "unique_config_cache_dep" UNIQUE ("config_cache_id","ghc_pkg_id"))
2020-04-08 20:31:12.881711: [debug] Migration executed: CREATE TABLE "config_cache_component"("id" INTEGER PRIMARY KEY,"config_cache_id" INTEGER NOT NULL REFERENCES "config_cache","component" BLOB NOT NULL,CONSTRAINT "unique_config_cache_component" UNIQUE ("config_cache_id","component"))
2020-04-08 20:31:12.882177: [debug] PATH is: Just "/home/amy/.conda/condabin:/home/amy/wain-tools:/home/amy/bin:/home/amy/.local/bin:/home/amy/.cabal/bin:/home/amy/bin:/run/wrappers/bin:/home/amy/.nix-profile/bin:/etc/profiles/per-user/amy/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin"
2020-04-08 20:31:12.882268: [debug] Using a nix-shell environment with nix packages: haskell.compiler.ghc883, git, gcc, gmp
2020-04-08 20:31:12.882506: [debug] Run process: /home/amy/.nix-profile/bin/nix-shell --pure -E "with (import <nixpkgs> {}); let inputs = [haskell.compiler.ghc883 git gcc gmp]; libPath = lib.makeLibraryPath inputs; stackExtraArgs = lib.concatMap (pkg: [ ''--extra-lib-dirs=${lib.getLib pkg}/lib''   ''--extra-include-dirs=${lib.getDev pkg}/include'' ]) inputs; in runCommand ''myEnv'' { buildInputs = lib.optional stdenv.isLinux glibcLocales ++ inputs; STACK_PLATFORM_VARIANT=''nix''; STACK_IN_NIX_SHELL=1; LD_LIBRARY_PATH = libPath;STACK_IN_NIX_EXTRA_ARGS = stackExtraArgs; LANG=\"en_US.UTF-8\";} \"\"" --run "'/home/amy/.local/bin/stack' $STACK_IN_NIX_EXTRA_ARGS '--internal-re-exec-version=2.1.3' '--verbose' 'setup'"
warning
: unknown setting 'sandbox-fallback'
warning
: unknown setting 'system-features'
error
: attribute 'ghc883' missing, at (string):1:43
(use '--show-trace' to show detailed location information)


The `stack` command doesn't have a  `--show-trace` attribute; I suspect that suggestion is coming from GHC or cabal or something.

Kirill Zaborsky

unread,
Apr 8, 2020, 5:08:03 PM4/8/20
to haskell-stack
Hello Amy,
It looks like your NixOS doesn't have GHC 8.8.3 available (and the log shows that the suggestion comes from nix-shell run by Stack), you could see some  workarounds e.g. in https://github.com/commercialhaskell/stack/issues/2861

Kind regards,
Kirill Zaborsky

среда, 8 апреля 2020 г., 22:55:07 UTC+3 пользователь Amy de Buitléir написал:
Reply all
Reply to author
Forward
0 new messages