haskell - Dependency hell in cabal. It is really a hell -


different programming languages use different packaging systems.

in varied approach, java's maven looks best bet me since maintains different version of jar files in seperately versioned folders , hence, there no way 1 end in conflicting versions of library.

next comes python. python's pip puts packages /usr/local/lib/python/dist-packages/site-packages. when there version conflict, 1 can use virtualenv , live it.

nodejs supports installing packages both in local folders , global folders. till date me, never had dependency conflict in global libraries.

then got fascinated haskell's style , started using cabal. first, installing libraries inside /home/user1/.cabal. when package system broke, 1 friend suggested me remove 2 folders - /home/user1/.cabal && /home/user1/.ghc. now, first confusion arose, why cabal's library files sit in 2 folders .cabal && .ghc. cleaned library folders, ~/.ghc , ~/.cabal , did cabal install package source cabal-db-0.1.12. now, there new error , surprised, because had sanitized local repositories. error was,

configuring cabal-1.22.2.0... building cabal-1.22.2.0... installed cabal-1.22.2.0 cabal: error: packages failed install: ansi-terminal-0.6.2.1 failed during configure step. exception was: user error (the package 'ansi-terminal' requires cabal library version -any && >=1.6 no suitable version installed.) 

then tried safest bet - sandbox cabal-db. worked. repeated sandboxing pacakge, ghc-pkg-autofix. did,

cd ghc-pkg-autofix-0.2.0.1 cabal sandbox init cabal install 

and sandbox there absolutely no external dependencies, there errors again,

cabal: not resolve dependencies: trying: ghc-pkg-autofix-0.2.0.1 (user goal) trying: cabal-1.22.2.0 (dependency of ghc-pkg-autofix-0.2.0.1) next goal: process (dependency of ghc-pkg-autofix-0.2.0.1) rejecting: process-1.2.0.0/installed-06c..., 1.2.3.0, 1.2.2.0, 1.2.1.0, 1.2.0.0, 1.1.0.2, 1.1.0.1, 1.1.0.0 (conflict: ghc-pkg-autofix => process>=1.0 && <1.1) rejecting: process-1.0.1.5, 1.0.1.4, 1.0.1.3, 1.0.1.2, 1.0.1.1, 1.0.0.0 (conflict: cabal => process>=1.1.0.1 && <1.3) dependency tree exhaustively searched.  note: when using sandbox, packages required have consistent dependencies. try reinstalling/unregistering offending packages or recreating sandbox. 

am doing wrong (or) kind of dependency conflicts quite common in cabal? see, managing dependencies in other languages lot simpler.

note: use cabal-install version 1.22.0.0 && the glorious glasgow haskell compilation system, version 7.8.4

"and sandbox there absolutely no external dependencies" not true. sandbox still has dependencies on global package database. things cabal, ghc, process typically installed in global package database. here want install ghc-pkg-autofix requires process 1.0, have more recent version of process installed. sure need ghc-pkg-autofix, seems quite old.


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -