Skip to content

Missing files in package #3093

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

Closed
vladfi1 opened this issue Jan 29, 2016 · 21 comments
Closed

Missing files in package #3093

vladfi1 opened this issue Jan 29, 2016 · 21 comments

Comments

@vladfi1
Copy link

vladfi1 commented Jan 29, 2016

I've started getting some strange errors on a new machine running ghc 7.10.3 and cabal head. When I try to cabal install cpphs (or anything depending on it), I get:

Preprocessing executable 'cpphs' for cpphs-1.19.3...

Language/Preprocessor/Cpphs/CppIfdef.hs:21:8:
    Could not find module ‘Text.Parse’
    There are files missing in the ‘polyparse-1.11@50GgOpxfRtT3j5QNLOIbKj’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.

Language/Preprocessor/Cpphs/MacroPass.hs:32:8:
    Could not find module ‘System.Time’
    There are files missing in the ‘old-time-1.1.0.3@HzR15Sum2ZRAJx4k8whG1D’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
cpphs-1.19.3 failed during the building phase. The exception was:
ExitFailure 1

The odd thing is that ghc-pkg check doesn't show any errors, and I can import both Text.Parse and System.Time just fine in ghci.

@ezyang
Copy link
Contributor

ezyang commented Jan 29, 2016

It's possible that Cabal is using a different database. Is this in a sandbox? Can you post the output with -v?

@vladfi1
Copy link
Author

vladfi1 commented Jan 29, 2016

I was not using a sandbox. After nuking .cabal and .ghc for the second time, I managed to install cpphs (and all my other packages) without any errors. I think what I did differently that time was that I installed cpphs before any other packages. I'll see if I can find a way to reproduce this - it shouldn't be too hard, as it is not the first time that these sorts of errors have popped up.

Incidentally I do have the -v output:

$ cabal install cpphs -v
/home/vlad//.cabal/bin/alex --version
/usr/bin/gcc -dumpversion
looking for tool haddock near compiler in /opt/ghc/7.10.3/bin
found haddock in /opt/ghc/7.10.3/bin/haddock
/opt/ghc/7.10.3/bin/haddock --version
/home/vlad//.cabal/bin/happy --version
/opt/ghc/7.10.3/bin/hpc version
looking for tool hsc2hs near compiler in /opt/ghc/7.10.3/bin
found hsc2hs in /opt/ghc/7.10.3/bin/hsc2hs
/opt/ghc/7.10.3/bin/hsc2hs --version
/opt/ghc/7.10.3/bin/ghc -c /tmp/1804289383846930886.c -o /tmp/16816927771714636915.o
/usr/bin/ld -x -r /tmp/16816927771714636915.o -o /tmp/1957747793424238335.o
/usr/bin/pkg-config --version
/bin/tar --help
Reading available packages...
Choosing modular solver.
Resolving dependencies...
Ready to install cpphs-1.19.3
Waiting for install task to finish...
Extracting
/home/vlad/.cabal/packages/hackage.haskell.org/cpphs/1.19.3/cpphs-1.19.3.tar.gz
to /tmp/cabal-tmp-11243...
Updating cpphs.cabal with the latest revision from the index.
Configuring cpphs-1.19.3...
Dependency base ==4.8.2.0: using base-4.8.2.0
Dependency directory ==1.2.2.0: using directory-1.2.2.0
Dependency old-locale ==1.0.0.7: using old-locale-1.0.0.7
Dependency old-time ==1.1.0.3: using old-time-1.1.0.3
Dependency polyparse ==1.11: using polyparse-1.11
Using Cabal-1.23.0.0 compiled by ghc-7.10
Using compiler: ghc-7.10.3
Using install prefix: /home/vlad//.cabal
Binaries installed in: /home/vlad//.cabal/bin
Libraries installed in:
/home/vlad//.cabal/lib/x86_64-linux-ghc-7.10.3/cpphs-1.19.3-2VgmLy8vEw4RSbW33lvG3g
Private binaries installed in: /home/vlad//.cabal/libexec
Data files installed in:
/home/vlad//.cabal/share/x86_64-linux-ghc-7.10.3/cpphs-1.19.3
Documentation installed in:
/home/vlad//.cabal/share/doc/x86_64-linux-ghc-7.10.3/cpphs-1.19.3
Configuration files installed in: /home/vlad//.cabal/etc
Using alex version 3.1.7 found on system at: /home/vlad//.cabal/bin/alex
Using ar found on system at: /usr/bin/ar
No c2hs found
No cpphs found
Using gcc version 5.2.1 found on system at: /usr/bin/gcc
Using ghc version 7.10.3 found on system at: /opt/ghc/7.10.3/bin/ghc
Using ghc-pkg version 7.10.3 found on system at: /opt/ghc/7.10.3/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.16.1 found on system at: /opt/ghc/7.10.3/bin/haddock
Using happy version 1.19.5 found on system at: /home/vlad//.cabal/bin/happy
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.67 found on system at: /opt/ghc/7.10.3/bin/hpc
Using hsc2hs version 0.67 found on system at: /opt/ghc/7.10.3/bin/hsc2hs
No hscolour found
No jhc found
Using ld found on system at: /usr/bin/ld
No lhc found
No lhc-pkg found
Using pkg-config version 0.28 found on system at: /usr/bin/pkg-config
Using strip version 2.25 found on system at: /usr/bin/strip
Using tar found on system at: /bin/tar
No uhc found
Component build order: library, executable 'cpphs'
creating dist/build
creating dist/build/autogen
Building cpphs-1.19.3...
/opt/ghc/7.10.3/bin/ghc-pkg init dist/package.conf.inplace
Preprocessing library cpphs-1.19.3...
Building library...
creating dist/build
/opt/ghc/7.10.3/bin/ghc --make -fbuilding-cabal-package -O -dynamic -fPIC -osuf dyn_o -hisuf dyn_hi -outputdir dist/build -odir dist/build -hidir dist/build -stubdir dist/build -i -idist/build -i. -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -this-package-key 2VgmLy8vEw4RSbW33lvG3g -hide-all-packages -package-db dist/package.conf.inplace -package-id base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d -package-id directory-1.2.2.0-f8e14a9d121b76a00a0f669ee724a732 -package-id old-locale-1.0.0.7-55QNK53FiIh9myaD17ya7H -package-id old-time-1.1.0.3-1YWUSaYB8rbLdvkaQaEpuh -package-id polyparse-1.11-7SVweJmgKeGRg8BA4JRfq -XHaskell98 Language.Preprocessor.Cpphs Language.Preprocessor.Unlit Language.Preprocessor.Cpphs.CppIfdef Language.Preprocessor.Cpphs.HashDefine Language.Preprocessor.Cpphs.MacroPass Language.Preprocessor.Cpphs.Options Language.Preprocessor.Cpphs.Position Language.Preprocessor.Cpphs.ReadFirst Language.Preprocessor.Cpphs.RunCpphs Language.Preprocessor.Cpphs.SymTab Language.Preprocessor.Cpphs.Tokenise
[ 1 of 11] Compiling Language.Preprocessor.Cpphs.HashDefine ( Language/Preprocessor/Cpphs/HashDefine.hs, dist/build/Language/Preprocessor/Cpphs/HashDefine.dyn_o )
[ 2 of 11] Compiling Language.Preprocessor.Cpphs.SymTab ( Language/Preprocessor/Cpphs/SymTab.hs, dist/build/Language/Preprocessor/Cpphs/SymTab.dyn_o )
[ 3 of 11] Compiling Language.Preprocessor.Unlit ( Language/Preprocessor/Unlit.hs, dist/build/Language/Preprocessor/Unlit.dyn_o )
[ 4 of 11] Compiling Language.Preprocessor.Cpphs.Options ( Language/Preprocessor/Cpphs/Options.hs, dist/build/Language/Preprocessor/Cpphs/Options.dyn_o )
[ 5 of 11] Compiling Language.Preprocessor.Cpphs.Position ( Language/Preprocessor/Cpphs/Position.hs, dist/build/Language/Preprocessor/Cpphs/Position.dyn_o )
[ 6 of 11] Compiling Language.Preprocessor.Cpphs.Tokenise ( Language/Preprocessor/Cpphs/Tokenise.hs, dist/build/Language/Preprocessor/Cpphs/Tokenise.dyn_o )
[ 7 of 11] Compiling Language.Preprocessor.Cpphs.MacroPass ( Language/Preprocessor/Cpphs/MacroPass.hs, dist/build/Language/Preprocessor/Cpphs/MacroPass.dyn_o )
[ 8 of 11] Compiling Language.Preprocessor.Cpphs.ReadFirst ( Language/Preprocessor/Cpphs/ReadFirst.hs, dist/build/Language/Preprocessor/Cpphs/ReadFirst.dyn_o )
[ 9 of 11] Compiling Language.Preprocessor.Cpphs.CppIfdef ( Language/Preprocessor/Cpphs/CppIfdef.hs, dist/build/Language/Preprocessor/Cpphs/CppIfdef.dyn_o )
[10 of 11] Compiling Language.Preprocessor.Cpphs.RunCpphs ( Language/Preprocessor/Cpphs/RunCpphs.hs, dist/build/Language/Preprocessor/Cpphs/RunCpphs.dyn_o )
[11 of 11] Compiling Language.Preprocessor.Cpphs ( Language/Preprocessor/Cpphs.hs, dist/build/Language/Preprocessor/Cpphs.dyn_o )
Linking...
[(ComponentId
"base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d",PackageIdentifier {pkgName =
PackageName {unPackageName = "base"}, pkgVersion = Version {versionBranch =
[4,8,2,0], versionTags = []}},ModuleRenaming True []),(ComponentId
"directory-1.2.2.0-f8e14a9d121b76a00a0f669ee724a732",PackageIdentifier
{pkgName = PackageName {unPackageName = "directory"}, pkgVersion = Version
{versionBranch = [1,2,2,0], versionTags = []}},ModuleRenaming True
[]),(ComponentId "old-locale-1.0.0.7-55QNK53FiIh9myaD17ya7H",PackageIdentifier
{pkgName = PackageName {unPackageName = "old-locale"}, pkgVersion = Version
{versionBranch = [1,0,0,7], versionTags = []}},ModuleRenaming True
[]),(ComponentId "old-time-1.1.0.3-1YWUSaYB8rbLdvkaQaEpuh",PackageIdentifier
{pkgName = PackageName {unPackageName = "old-time"}, pkgVersion = Version
{versionBranch = [1,1,0,3], versionTags = []}},ModuleRenaming True
[]),(ComponentId "polyparse-1.11-7SVweJmgKeGRg8BA4JRfq",PackageIdentifier
{pkgName = PackageName {unPackageName = "polyparse"}, pkgVersion = Version
{versionBranch = [1,11], versionTags = []}},ModuleRenaming True [])]
/opt/ghc/7.10.3/bin/ghc -shared -dynamic '-dynload deploy' -optl-Wl,-rpath,/opt/ghc/7.10.3/lib/ghc-7.10.3/array_67iodizgJQIIxYVTp4emlA -optl-Wl,-rpath,/opt/ghc/7.10.3/lib/ghc-7.10.3/base_HQfYBxpPvuw8OunzQu6JGM -optl-Wl,-rpath,/opt/ghc/7.10.3/lib/ghc-7.10.3/binar_3uXFWMoAGBg0xKP9MHKRwi -optl-Wl,-rpath,/opt/ghc/7.10.3/lib/ghc-7.10.3/rts -optl-Wl,-rpath,/opt/ghc/7.10.3/lib/ghc-7.10.3/bytes_6VWy06pWzJq9evDvK2d4w6 -optl-Wl,-rpath,/opt/ghc/7.10.3/lib/ghc-7.10.3/conta_2C3ZI8RgPO2LBMidXKTvIU -optl-Wl,-rpath,/opt/ghc/7.10.3/lib/ghc-7.10.3/deeps_6vMKxt5sPFR0XsbRWvvq59 -optl-Wl,-rpath,/opt/ghc/7.10.3/lib/ghc-7.10.3/direc_0hFG6ZxK1nk4zsyOqbNHfm -optl-Wl,-rpath,/opt/ghc/7.10.3/lib/ghc-7.10.3/filep_Ey7a1in9roBAE8bUFJ5R9m -optl-Wl,-rpath,/opt/ghc/7.10.3/lib/ghc-7.10.3/ghcpr_8TmvWUcS1U1IKHT0levwg3 -optl-Wl,-rpath,/opt/ghc/7.10.3/lib/ghc-7.10.3/integ_2aU3IZNMF9a7mQ0OzsZ0dS -optl-Wl,-rpath,/home/vlad/.cabal/lib/x86_64-linux-ghc-7.10.3/old-locale-1.0.0.7-55QNK53FiIh9myaD17ya7H -optl-Wl,-rpath,/home/vlad/.cabal/lib/x86_64-linux-ghc-7.10.3/old-time-1.1.0.3-1YWUSaYB8rbLdvkaQaEpuh -optl-Wl,-rpath,/home/vlad/.cabal/lib/x86_64-linux-ghc-7.10.3/polyparse-1.11-7SVweJmgKeGRg8BA4JRfq -optl-Wl,-rpath,/home/vlad/.cabal/lib/x86_64-linux-ghc-7.10.3/text-1.2.2.0-4EcouYGaYbCaqCSaVELQiT -optl-Wl,-rpath,/opt/ghc/7.10.3/lib/ghc-7.10.3/time_FTheb6LSxyX1UABIbBXRfn -optl-Wl,-rpath,/opt/ghc/7.10.3/lib/ghc-7.10.3/unix_KZL8h98IqDM57kQSPo1mKx -no-auto-link-packages -package-db dist/package.conf.inplace -package-id base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d -package-id directory-1.2.2.0-f8e14a9d121b76a00a0f669ee724a732 -package-id old-locale-1.0.0.7-55QNK53FiIh9myaD17ya7H -package-id old-time-1.1.0.3-1YWUSaYB8rbLdvkaQaEpuh -package-id polyparse-1.11-7SVweJmgKeGRg8BA4JRfq dist/build/Language/Preprocessor/Cpphs.dyn_o dist/build/Language/Preprocessor/Unlit.dyn_o dist/build/Language/Preprocessor/Cpphs/CppIfdef.dyn_o dist/build/Language/Preprocessor/Cpphs/HashDefine.dyn_o dist/build/Language/Preprocessor/Cpphs/MacroPass.dyn_o dist/build/Language/Preprocessor/Cpphs/Options.dyn_o dist/build/Language/Preprocessor/Cpphs/Position.dyn_o dist/build/Language/Preprocessor/Cpphs/ReadFirst.dyn_o dist/build/Language/Preprocessor/Cpphs/RunCpphs.dyn_o dist/build/Language/Preprocessor/Cpphs/SymTab.dyn_o dist/build/Language/Preprocessor/Cpphs/Tokenise.dyn_o -o dist/build/libHScpphs-1.19.3-2VgmLy8vEw4RSbW33lvG3g-ghc7.10.3.so
/opt/ghc/7.10.3/bin/ghc-pkg update - --global --user '--package-db=dist/package.conf.inplace'
Preprocessing executable 'cpphs' for cpphs-1.19.3...
Building executable cpphs...
creating dist/build/cpphs
creating dist/build/cpphs/cpphs-tmp
/opt/ghc/7.10.3/bin/ghc --make -no-link -fbuilding-cabal-package -O -static -outputdir dist/build/cpphs/cpphs-tmp -odir dist/build/cpphs/cpphs-tmp -hidir dist/build/cpphs/cpphs-tmp -stubdir dist/build/cpphs/cpphs-tmp -i -idist/build/cpphs/cpphs-tmp -i. -idist/build/autogen -Idist/build/autogen -Idist/build/cpphs/cpphs-tmp -optP-include -optPdist/build/autogen/cabal_macros.h -hide-all-packages -package-db dist/package.conf.inplace -package-id base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d -package-id directory-1.2.2.0-f8e14a9d121b76a00a0f669ee724a732 -package-id old-locale-1.0.0.7-55QNK53FiIh9myaD17ya7H -package-id old-time-1.1.0.3-1YWUSaYB8rbLdvkaQaEpuh -package-id polyparse-1.11-7SVweJmgKeGRg8BA4JRfq -XHaskell98 ./cpphs.hs

Language/Preprocessor/Cpphs/CppIfdef.hs:21:8:
    Could not find module ‘Text.Parse’
    There are files missing in the ‘polyparse-1.11@7SVweJmgKeGRg8BA4JRfq’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.

Language/Preprocessor/Cpphs/MacroPass.hs:32:8:
    Could not find module ‘System.Time’
    There are files missing in the ‘old-time-1.1.0.3@1YWUSaYB8rbLdvkaQaEpuh’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.

Language/Preprocessor/Cpphs/MacroPass.hs:33:8:
    Could not find module ‘System.Locale’
    There are files missing in the ‘old-locale-1.0.0.7@55QNK53FiIh9myaD17ya7H’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
Failed to install cpphs-1.19.3
World file is already up to date.
cabal: Error: some packages failed to install:
cpphs-1.19.3 failed during the building phase. The exception was:
ExitFailure 1

Thanks for the help!

@ezyang
Copy link
Contributor

ezyang commented Feb 1, 2016

Could also be a bug in ghc-pkg, it's validation isn't catching this case (wouldn't be too surprising, since the checks GHC does are a different codepath.)

@gbaz
Copy link
Collaborator

gbaz commented Feb 1, 2016

We ran into this with the hackage builders too for some reason. @davean ended up just kicking the box over and then it got working again, but we didn't track down the exact source of issues...

@davean
Copy link

davean commented Feb 1, 2016

Then it stopped again. If you have a proper solution I'm all ears.

On Mon, Feb 1, 2016 at 5:33 PM, gbaz [email protected] wrote:

We ran into this with the hackage builders too for some reason. @davean
https://github.com/davean ended up just kicking the box over and then
it got working again, but we didn't track down the exact source of issues...


Reply to this email directly or view it on GitHub
#3093 (comment).

@vladfi1
Copy link
Author

vladfi1 commented Feb 2, 2016

Happened again :(

$ cabal install c2hs -v
/home/vlad/.cabal/bin/alex --version
/home/vlad/.cabal/bin/c2hs --numeric-version
/home/vlad/.cabal/bin/cpphs --version
/usr/bin/gcc -dumpversion
/opt/ghc/7.10.3/bin/haddock --version
/home/vlad/.cabal/bin/happy --version
/opt/ghc/7.10.3/bin/hpc version
looking for tool hsc2hs near compiler in /opt/ghc/7.10.3/bin
found hsc2hs in /opt/ghc/7.10.3/bin/hsc2hs
/opt/ghc/7.10.3/bin/hsc2hs --version
/home/vlad/.cabal/bin/HsColour -version
/opt/ghc/7.10.3/bin/ghc -c /tmp/30852.c -o /tmp/30852.o
/usr/bin/ld -x -r /tmp/30852.o -o /tmp/30853.o
/usr/bin/pkg-config --version
/bin/tar --help
Reading available packages...
Choosing modular solver.
Resolving dependencies...
Ready to install c2hs-0.27.1
Waiting for install task to finish...
Extracting
/home/vlad/.cabal/packages/hackage.haskell.org/c2hs/0.27.1/c2hs-0.27.1.tar.gz
to /tmp/cabal-tmp-30852...
Updating c2hs.cabal with the latest revision from the index.
Configuring c2hs-0.27.1...
Flags chosen: regression=False, base3=True
Dependency array ==0.5.1.0: using array-0.5.1.0
Dependency base ==4.8.2.0: using base-4.8.2.0
Dependency bytestring ==0.10.6.0: using bytestring-0.10.6.0
Dependency containers ==0.5.6.2: using containers-0.5.6.2
Dependency directory ==1.2.2.0: using directory-1.2.2.0
Dependency dlist ==0.7.1.2: using dlist-0.7.1.2
Dependency filepath ==1.4.0.0: using filepath-1.4.0.0
Dependency language-c ==0.4.7: using language-c-0.4.7
Dependency pretty ==1.1.2.0: using pretty-1.1.2.0
Dependency process ==1.2.3.0: using process-1.2.3.0
Using Cabal-1.22.4.0 compiled by ghc-7.8
Using compiler: ghc-7.10.3
Using install prefix: /home/vlad/.cabal
Binaries installed in: /home/vlad/.cabal/bin
Libraries installed in:
/home/vlad/.cabal/lib/x86_64-linux-ghc-7.10.3/c2hs-0.27.1-KiaXdQwYtwX44N1OCh6oO3
Private binaries installed in: /home/vlad/.cabal/libexec
Data files installed in:
/home/vlad/.cabal/share/x86_64-linux-ghc-7.10.3/c2hs-0.27.1
Documentation installed in:
/home/vlad/.cabal/share/doc/x86_64-linux-ghc-7.10.3/c2hs-0.27.1
Configuration files installed in: /home/vlad/.cabal/etc
Using alex version 3.1.4 found on system at: /home/vlad/.cabal/bin/alex
Using ar found on system at: /usr/bin/ar
Using c2hs version 0.26.1 found on system at: /home/vlad/.cabal/bin/c2hs
Using cpphs version 1.19.3 found on system at: /home/vlad/.cabal/bin/cpphs
Using gcc version 4.9.2 found on system at: /usr/bin/gcc
Using ghc version 7.10.3 found on system at: /opt/ghc/7.10.3/bin/ghc
Using ghc-pkg version 7.10.3 found on system at: /opt/ghc/7.10.3/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.16.1 found on system at: /opt/ghc/7.10.3/bin/haddock
Using happy version 1.19.5 found on system at: /home/vlad/.cabal/bin/happy
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.67 found on system at: /opt/ghc/7.10.3/bin/hpc
Using hsc2hs version 0.67 found on system at: /opt/ghc/7.10.3/bin/hsc2hs
Using hscolour version 1.22 found on system at: /home/vlad/.cabal/bin/HsColour
No jhc found
Using ld found on system at: /usr/bin/ld
No lhc found
No lhc-pkg found
Using pkg-config version 0.28 found on system at: /usr/bin/pkg-config
Using strip version 2.25 found on system at: /usr/bin/strip
Using tar found on system at: /bin/tar
No uhc found
Component build order: executable 'c2hs'
creating dist/build
creating dist/build/autogen
Building c2hs-0.27.1...
/opt/ghc/7.10.3/bin/ghc-pkg init dist/package.conf.inplace
Preprocessing executable 'c2hs' for c2hs-0.27.1...
Building executable c2hs...
creating dist/build/c2hs
creating dist/build/c2hs/c2hs-tmp
/opt/ghc/7.10.3/bin/ghc --make -no-link -fbuilding-cabal-package -O -static -outputdir dist/build/c2hs/c2hs-tmp -odir dist/build/c2hs/c2hs-tmp -hidir dist/build/c2hs/c2hs-tmp -stubdir dist/build/c2hs/c2hs-tmp -i -idist/build/c2hs/c2hs-tmp -isrc -idist/build/autogen -Idist/build/autogen -Idist/build/c2hs/c2hs-tmp -optP-include -optPdist/build/autogen/cabal_macros.h -hide-all-packages -package-db dist/package.conf.inplace -package-id array-0.5.1.0-960bf9ae8875cc30355e086f8853a049 -package-id base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d -package-id bytestring-0.10.6.0-c60f4c543b22c7f7293a06ae48820437 -package-id containers-0.5.6.2-e59c9b78d840fa743d4169d4bea15592 -package-id directory-1.2.2.0-f8e14a9d121b76a00a0f669ee724a732 -package-id dlist-0.7.1.2-ff29ea897ce0546ab24638745f33b7b9 -package-id filepath-1.4.0.0-f97d1e4aebfd7a03be6980454fe31d6e -package-id language-c-0.4.7-d235e920b644bb71f540b01f7a2f0159 -package-id pretty-1.1.2.0-5cc412214ea63f61ee84c4fbabdbe0ec -package-id process-1.2.3.0-78f206acb2330ea8066c6c19c87356f0 -XHaskell98 -XForeignFunctionInterface src/Main.hs -Wall -fno-warn-incomplete-patterns -fwarn-tabs

src/Text/Lexers.hs:139:18:
    Could not find module ‘Data.DList’
    There are files missing in the ‘dlist-0.7.1.2@dlist_AO7XAasbAeyL0XLKeq1Aui’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
Failed to install c2hs-0.27.1
World file is already up to date.
cabal: Error: some packages failed to install:
c2hs-0.27.1 failed during the building phase. The exception was:
ExitFailure 1

Again, nothing detected by ghc-pkg and I can import Data.DList just fine in ghci.

@silky
Copy link

silky commented Feb 8, 2016

hey @vladfi1 - are you able to tell me a bit more about how you reproduced this error?

@23Skidoo
Copy link
Member

23Skidoo commented Feb 8, 2016

My current hypothesis is that this is due to missing dynamic libs.

@vladfi1
Copy link
Author

vladfi1 commented Feb 8, 2016

@silky Unfortunately I wasn't able to reproduce the error.

@davean
Copy link

davean commented Feb 11, 2016

I have reason to believe, but not absolute confirmation, that this is related to cabal sandboxes being found up the directory tree. At least for the builders. That package database is used, but its paths not translated, so it looks for packages, that it isn't supposed to have, in the wrong place.

I need to build a lot more packages to confirm this has solved the problem for me though.

@23Skidoo
Copy link
Member

@davean

I have reason to believe, but not absolute confirmation, that this is related to cabal sandboxes being found up the directory tree.

I have doubts that this is the case. Unless you have a cabal.sandbox.config in the directory you're running cabal from, a sandbox up the tree won't be picked up. Also, with -v you should get a message that a sandbox is being used.

@davean
Copy link

davean commented Feb 12, 2016

My reasons for believing this is that:

  • The hashes are present in the sandbox and not the local environment
  • Changing between having the sandbox and not seemed to toggle the bug
    across 4 tries.

There are of course reasons the hashes might match but not be coming from
the sandbox. So the first isn't proof. Further as its wasn't deterministic,
the second could just be chance.
I'm afraid I care more about catching the builder up the the current state
of hackage though then debugging this. We're badly behind and it isn't
breaking now.

Since removing the sandbox I've been able to build over 200 packages
without error.

-davean

On Thu, Feb 11, 2016 at 9:33 PM, Mikhail Glushenkov <
[email protected]> wrote:

I have reason to believe, but not absolute confirmation, that this is
related to cabal sandboxes being found up the directory tree.

I have doubts that this is the case. Unless you have a
cabal.sandbox.config in the directory you're running cabal from, a
sandbox up the tree won't be picked up. Also, with -v you should get a
message that a sandbox is being used.


Reply to this email directly or view it on GitHub
#3093 (comment).

@23Skidoo
Copy link
Member

Would be interested to hear about how exactly you were using sandboxing.

@davean
Copy link

davean commented Feb 12, 2016

I used a cabal sandbox to build https://github.com/haskell/hackage-server
(GHC 7.10.3, Cabal 1.22.5.0, cabal-install 1.22.8.0)

From the root directory of said git repo, I ran the builder script. The
builder script specifies:

"--package-db=clear --package-db=global --package-db=" ++ packageDb

(See
https://github.com/haskell/hackage-server/blob/master/BuildClient.hs#L563-L564
)

-davean

On Fri, Feb 12, 2016 at 3:56 AM, Mikhail Glushenkov <
[email protected]> wrote:

Would be interested to hear about how exactly you were using sandboxing.


Reply to this email directly or view it on GitHub
#3093 (comment).

@davean
Copy link

davean commented Feb 12, 2016

Oh, and GHC is installed via hvr's ubuntu packages. There is a slightly
older version of cabal-install also installed via said but that isn't in
the PATH.

On Fri, Feb 12, 2016 at 4:07 AM, davean [email protected] wrote:

I used a cabal sandbox to build https://github.com/haskell/hackage-server
(GHC 7.10.3, Cabal 1.22.5.0, cabal-install 1.22.8.0)

From the root directory of said git repo, I ran the builder script. The
builder script specifies:

"--package-db=clear --package-db=global --package-db=" ++ packageDb

(See
https://github.com/haskell/hackage-server/blob/master/BuildClient.hs#L563-L564
)

-davean

On Fri, Feb 12, 2016 at 3:56 AM, Mikhail Glushenkov <
[email protected]> wrote:

Would be interested to hear about how exactly you were using sandboxing.


Reply to this email directly or view it on GitHub
#3093 (comment).

@23Skidoo
Copy link
Member

So if you're running cabal from the same directory you have created a sandbox in, then yes, it's going to pick up the sandbox. So the problem seems to be that you're then manually specifying --package-db=clear --package-db=global and that apparently leads to problems in the presence of a sandbox. I guess you could also solve this problem by changing this line to invoke cabal with --ignore-sandbox.

@xeruf
Copy link

xeruf commented Apr 13, 2021

no sandbox, using arch, exact same issue still :/

@fgaz
Copy link
Member

fgaz commented Apr 13, 2021

@xerus2000 could you post the sequence of commands that leads to that error and the error itself?

@gbaz
Copy link
Collaborator

gbaz commented Apr 13, 2021

ok this is going to be the usual haskell on archlinux issue where their default install is busted since it provides only dynamic builds of the libs. Here's their documentation, but I wouldn't go the route they suggest: https://wiki.archlinux.org/index.php/haskell

Instead, just rip out everything arch provides for cabal and ghc and install good, reasonable versions via ghcup: https://www.haskell.org/ghcup/

@fgaz
Copy link
Member

fgaz commented Apr 14, 2021

By the way I think we can close the ticket since it was originally for v1- sandboxes

@xeruf
Copy link

xeruf commented Apr 15, 2021

yes close it, I indeed had the usual arch issue :/

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

No branches or pull requests

8 participants