Skip to content

Library linking error when project is moved #5359

@chrissound

Description

@chrissound

This morning I moved a project directory from inside another project, to a directory somewhere else.

When I tried to 'stack ghci' into the project I got:

Loading stack ghci orgmode-parse ...
orgmode-parse-0.2.0: initial-build-steps (lib)
Configuring GHCi with the following packages: orgmode-parse
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
<command line>: can't load .so/.DLL for: libHSaeson-1.1.0.0-6czAS50gW4ueCUtDYEEe5.so (libHSaeson-1.1.0.0-6czAS50gW4ueCUtDYEEe5.so: cannot open shared object file: No such file or directory)
Command "stack ghci orgmode-parse" exited unexpectedly

I then removed .stack-work and it worked correctly from here.

Here is stack ghci --verbose with the original issue:

stack ghci --verbose
Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2
2018-06-04 06:55:12.025387: [debug] Checking for project config at: /home/chris/Projects/Haskell/orgmode-parse/stack.yaml
@(src/Stack/Config.hs:850:9)
2018-06-04 06:55:12.025597: [debug] Loading project config file stack.yaml
@(src/Stack/Config.hs:876:13)
2018-06-04 06:55:12.026996: [debug] Decoding build plan from: /home/chris/.stack/build-plan/lts-7.14.yaml
@(src/Stack/Snapshot.hs:164:5)
2018-06-04 06:55:12.027065: [debug] Trying to decode /home/chris/.stack/build-plan-cache/lts-7.14.cache
@(src/Stack/Snapshot.hs:156:32)
2018-06-04 06:55:12.028822: [debug] Success decoding /home/chris/.stack/build-plan-cache/lts-7.14.cache
@(src/Stack/Snapshot.hs:156:32)
2018-06-04 06:55:12.033226: [debug] Found already installed GHC builds: nopie
@(src/Stack/Setup.hs:458:13)
2018-06-04 06:55:12.033884: [debug] Getting global package database location
@(src/Stack/GhcPkg.hs:47:5)
2018-06-04 06:55:12.034096: [debug] Run process: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --no-user-package-db list --global
@(src/Stack/GhcPkg.hs:76:10)
2018-06-04 06:55:12.035199: [debug] Asking GHC for its version
@(src/Stack/Setup/Installed.hs:98:13)
2018-06-04 06:55:12.035321: [debug] Run process: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc --numeric-version
@(src/Stack/Setup/Installed.hs:99:19)
2018-06-04 06:55:12.036182: [debug] Getting Cabal package version
@(src/Stack/GhcPkg.hs:180:5)
2018-06-04 06:55:12.038038: [debug] Run process: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --no-user-package-db field --simple-output Cabal version
@(src/Stack/GhcPkg.hs:76:10)
2018-06-04 06:55:12.053007: [debug] Process finished in 19ms: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --no-user-package-db list --global
@(src/Stack/GhcPkg.hs:76:10)
2018-06-04 06:55:12.059231: [debug] Process finished in 18ms: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --no-user-package-db field --simple-output Cabal version
@(src/Stack/GhcPkg.hs:76:10)
2018-06-04 06:55:12.070346: [debug] Process finished in 35ms: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc --numeric-version
@(src/Stack/Setup/Installed.hs:99:19)
2018-06-04 06:55:12.070458: [debug] GHC version is: ghc-8.0.1
@(src/Stack/Setup/Installed.hs:102:13)
2018-06-04 06:55:12.070532: [debug] Resolving package entries
@(src/Stack/Setup.hs:256:5)
2018-06-04 06:55:12.070670: [debug] Trying to decode /home/chris/.stack/loaded-snapshot-cache/x86_64-linux/ghc-8.0.1/lts-7.14.cache
@(src/Stack/Snapshot.hs:384:9)
2018-06-04 06:55:12.102597: [debug] Success decoding /home/chris/.stack/loaded-snapshot-cache/x86_64-linux/ghc-8.0.1/lts-7.14.cache
@(src/Stack/Snapshot.hs:384:9)
2018-06-04 06:55:12.103576: [debug] Starting to execute command inside EnvConfig
@(src/Stack/Runners.hs:171:18)
2018-06-04 06:55:12.103634: [debug] Parsing the targets
@(src/Stack/Build/Target.hs:460:3)
2018-06-04 06:55:12.106349: [debug] Trying to decode /home/chris/.stack/indices/Hackage/01-index.cache
@(src/Stack/PackageIndex.hs:407:23)
2018-06-04 06:55:12.259620: [debug] Success decoding /home/chris/.stack/indices/Hackage/01-index.cache
@(src/Stack/PackageIndex.hs:407:23)
2018-06-04 06:55:12.278467: [debug] Start: getPackageFiles /home/chris/Projects/Haskell/orgmode-parse/orgmode-parse.cabal
@(src/Stack/Package.hs:332:21)
2018-06-04 06:55:12.300108: [debug] Finished in 22ms: getPackageFiles /home/chris/Projects/Haskell/orgmode-parse/orgmode-parse.cabal
@(src/Stack/Package.hs:332:21)
2018-06-04 06:55:12.303560: [debug] Parsing the targets
@(src/Stack/Build/Target.hs:460:3)
2018-06-04 06:55:12.317282: [debug] Parsing the targets
@(src/Stack/Build/Target.hs:460:3)
2018-06-04 06:55:12.330924: [debug] Start: getPackageFiles /home/chris/Projects/Haskell/orgmode-parse/orgmode-parse.cabal
@(src/Stack/Package.hs:332:21)
2018-06-04 06:55:12.420885: [debug] Finished in 90ms: getPackageFiles /home/chris/Projects/Haskell/orgmode-parse/orgmode-parse.cabal
@(src/Stack/Package.hs:332:21)
2018-06-04 06:55:12.423736: [debug] Finding out which packages are already installed
@(src/Stack/Build/Installed.hs:57:5)
2018-06-04 06:55:12.423920: [debug] Run process: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --global --no-user-package-db dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-06-04 06:55:12.462016: [debug] Process finished in 38ms: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --global --no-user-package-db dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-06-04 06:55:12.462794: [debug] Ignoring package Cabal due to wanting version 1.24.2.0 instead of 1.24.0.0
@(src/Stack/Build/Installed.hs:185:5)
2018-06-04 06:55:12.463075: [debug] Run process: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --user --no-user-package-db --package-db /home/chris/.stack/snapshots/x86_64-linux-nopie/lts-7.14/8.0.1/pkgdb dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-06-04 06:55:12.503499: [debug] Process finished in 40ms: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --user --no-user-package-db --package-db /home/chris/.stack/snapshots/x86_64-linux-nopie/lts-7.14/8.0.1/pkgdb dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-06-04 06:55:12.504457: [debug] Run process: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --user --no-user-package-db --package-db /home/chris/Projects/Haskell/orgmode-parse/.stack-work/install/x86_64-linux-nopie/lts-7.14/8.0.1/pkgdb dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-06-04 06:55:12.522915: [debug] Process finished in 18ms: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --user --no-user-package-db --package-db /home/chris/Projects/Haskell/orgmode-parse/.stack-work/install/x86_64-linux-nopie/lts-7.14/8.0.1/pkgdb dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-06-04 06:55:12.523478: [debug] Constructing the build plan
@(src/Stack/Build/ConstructPlan.hs:186:5)
2018-06-04 06:55:12.533436: [debug] Checking if we are going to build multiple executables with the same name
@(src/Stack/Build.hs:177:5)
2018-06-04 06:55:12.533663: [debug] Executing the build plan
@(src/Stack/Build/Execute.hs:491:5)
2018-06-04 06:55:12.534632: [debug] Getting global package database location
@(src/Stack/GhcPkg.hs:47:5)
2018-06-04 06:55:12.534749: [debug] Run process: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --no-user-package-db list --global
@(src/Stack/GhcPkg.hs:76:10)
2018-06-04 06:55:12.551098: [debug] Process finished in 16ms: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --no-user-package-db list --global
@(src/Stack/GhcPkg.hs:76:10)
2018-06-04 06:55:12.552446: [info] orgmode-parse-0.2.0: initial-build-steps (lib)
@(src/Stack/Build/Execute.hs:873:23)
2018-06-04 06:55:12.552658: [debug] Run process within /home/chris/Projects/Haskell/orgmode-parse/: /home/chris/.stack/setup-exe-cache/x86_64-linux-nopie/Cabal-simple_mPHDZzAJ_1.24.0.0_ghc-8.0.1 --builddir=.stack-work/dist/x86_64-linux-nopie/Cabal-1.24.0.0 repl stack-initial-build-steps
@(src/Stack/Prelude.hs:96:3)
2018-06-04 06:55:12.591129: [debug] Process finished in 38ms: /home/chris/.stack/setup-exe-cache/x86_64-linux-nopie/Cabal-simple_mPHDZzAJ_1.24.0.0_ghc-8.0.1 --builddir=.stack-work/dist/x86_64-linux-nopie/Cabal-1.24.0.0 repl stack-initial-build-steps
@(src/Stack/Prelude.hs:96:3)
2018-06-04 06:55:12.591303: [debug] Finding out which packages are already installed
@(src/Stack/Build/Installed.hs:57:5)
2018-06-04 06:55:12.591405: [debug] Run process: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --global --no-user-package-db dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-06-04 06:55:12.618007: [debug] Process finished in 27ms: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --global --no-user-package-db dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-06-04 06:55:12.618265: [debug] Ignoring package Cabal due to wanting version 1.24.2.0 instead of 1.24.0.0
@(src/Stack/Build/Installed.hs:185:5)
2018-06-04 06:55:12.618504: [debug] Run process: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --user --no-user-package-db --package-db /home/chris/.stack/snapshots/x86_64-linux-nopie/lts-7.14/8.0.1/pkgdb dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-06-04 06:55:12.660794: [debug] Process finished in 42ms: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --user --no-user-package-db --package-db /home/chris/.stack/snapshots/x86_64-linux-nopie/lts-7.14/8.0.1/pkgdb dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-06-04 06:55:12.661489: [debug] Run process: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --user --no-user-package-db --package-db /home/chris/Projects/Haskell/orgmode-parse/.stack-work/install/x86_64-linux-nopie/lts-7.14/8.0.1/pkgdb dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-06-04 06:55:12.680428: [debug] Process finished in 19ms: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc-pkg --user --no-user-package-db --package-db /home/chris/Projects/Haskell/orgmode-parse/.stack-work/install/x86_64-linux-nopie/lts-7.14/8.0.1/pkgdb dump --expand-pkgroot
@(src/Stack/Prelude.hs:117:3)
2018-06-04 06:55:12.681096: [debug] Start: getPackageFiles /home/chris/Projects/Haskell/orgmode-parse/orgmode-parse.cabal
@(src/Stack/Package.hs:332:21)
2018-06-04 06:55:12.705781: [debug] Finished in 25ms: getPackageFiles /home/chris/Projects/Haskell/orgmode-parse/orgmode-parse.cabal
@(src/Stack/Package.hs:332:21)
2018-06-04 06:55:12.706784: [info] Configuring GHCi with the following packages: orgmode-parse
@(src/Stack/Ghci.hs:366:5)
2018-06-04 06:55:12.707048: [debug] Run process: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc --version
@(src/Stack/Ghci.hs:878:3)
2018-06-04 06:55:12.746009: [debug] Process finished in 39ms: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc --version
@(src/Stack/Ghci.hs:878:3)
2018-06-04 06:55:12.746344: [debug] Run process: /home/chris/.stack/programs/x86_64-linux/ghc-nopie-8.0.1/bin/ghc --interactive -i -odir=/home/chris/Projects/Haskell/orgmode-parse/.stack-work/odir -hidir=/home/chris/Projects/Haskell/orgmode-parse/.stack-work/odir -hide-all-packages -i/home/chris/Projects/Haskell/orgmode-parse/.stack-work/dist/x86_64-linux-nopie/Cabal-1.24.0.0/build -i/home/chris/Projects/Haskell/orgmode-parse/src -i/home/chris/Projects/Haskell/orgmode-parse/.stack-work/dist/x86_64-linux-nopie/Cabal-1.24.0.0/build/autogen -stubdir=/home/chris/Projects/Haskell/orgmode-parse/.stack-work/dist/x86_64-linux-nopie/Cabal-1.24.0.0/build -package-id=base-4.9.0.0 -package-id=aeson-1.1.0.0-6czAS50gW4ueCUtDYEEe5 -package-id=attoparsec-0.13.1.0-5Olk1S76r1CDYzFS6V3sZR -package-id=bytestring-0.10.8.1 -package-id=containers-0.5.7.1 -package-id=free-4.12.4-Etm59Dm8iExFxAy1L49Ovd -package-id=hashable-1.2.4.0-EMu4H7FB10MAl6hwKw992G -package-id=old-locale-1.0.0.7-6glXNhHF891B41ZfuI8hU8 -package-id=text-1.2.2.1-5QpmrLQApEZ4Ly9nMHWY0s -package-id=thyme-0.3.5.5-8UGzHTSalzf5sQqIwYBoDi -package-id=unordered-containers-0.2.7.1-Eo9jd5DMz45DhBLCG8skzW -Wall -fwarn-tabs -funbox-strict-fields -fno-warn-orphans -fno-warn-unused-do-bind -optP-include -optP/tmp/haskell-stack-ghci/ced67bb5/cabal_macros.h -ghci-script=/tmp/haskell-stack-ghci/8a525597/ghci-script
@(src/RIO/Process.hs:479:5)
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
<command line>: can't load .so/.DLL for: libHSaeson-1.1.0.0-6czAS50gW4ueCUtDYEEe5.so (libHSaeson-1.1.0.0-6czAS50gW4ueCUtDYEEe5.so: cannot open shared object file: No such file or directory)

Also reported here: commercialhaskell/stack#2936

Stack version

Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.

Cabal version

cabal --version
cabal-install version 1.24.0.2
compiled using version 1.24.2.0 of the Cabal library

Method of installation

arch linux pacman

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions