Resolving dependencies... Configuring extensible-exceptions-0.1.1.4... Building extensible-exceptions-0.1.1.4... Installed extensible-exceptions-0.1.1.4 Configuring BerkeleyDB-0.7.2... Building BerkeleyDB-0.7.2... Failed to install BerkeleyDB-0.7.2 Build log ( /home/builder/.cabal/logs/BerkeleyDB-0.7.2.log ): cabal: Entering directory '/tmp/cabal-tmp-21005/BerkeleyDB-0.7.2' Configuring BerkeleyDB-0.7.2... Building BerkeleyDB-0.7.2... Preprocessing library BerkeleyDB-0.7.2... In file included from dist/build/Database/Berkeley/Db_hsc_make.c:1:0: Db.hsc: In function ‘main’: Db.hsc:150:16: error: ‘DB_NOSERVER_HOME’ undeclared (first use in this function) /opt/ghc/8.0.2/lib/ghc-8.0.1.20161018/template-hsc.h:35:10: note: in definition of macro ‘hsc_const’ if ((x) < 0) \ ^ Db.hsc:150:16: note: each undeclared identifier is reported only once for each function it appears in /opt/ghc/8.0.2/lib/ghc-8.0.1.20161018/template-hsc.h:35:10: note: in definition of macro ‘hsc_const’ if ((x) < 0) \ ^ Db.hsc:151:16: error: ‘DB_NOSERVER_ID’ undeclared (first use in this function) /opt/ghc/8.0.2/lib/ghc-8.0.1.20161018/template-hsc.h:35:10: note: in definition of macro ‘hsc_const’ if ((x) < 0) \ ^ compiling dist/build/Database/Berkeley/Db_hsc_make.c failed (exit code 1) command was: /usr/bin/gcc -c dist/build/Database/Berkeley/Db_hsc_make.c -o dist/build/Database/Berkeley/Db_hsc_make.o -fno-stack-protector -fno-stack-protector -D__GLASGOW_HASKELL__=800 -Dlinux_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Dlinux_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -IDatabase/Berkeley/ -DUSE_DB_CXX -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/opt/ghc/8.0.2/lib/ghc-8.0.1.20161018/bytestring-0.10.8.1/include -I/opt/ghc/8.0.2/lib/ghc-8.0.1.20161018/base-4.9.0.0/include -I/opt/ghc/8.0.2/lib/ghc-8.0.1.20161018/integer-gmp-1.0.0.1/include -I/opt/ghc/8.0.2/lib/ghc-8.0.1.20161018/include -I/opt/ghc/8.0.2/lib/ghc-8.0.1.20161018/include/ cabal: Leaving directory '/tmp/cabal-tmp-21005/BerkeleyDB-0.7.2' cabal: Error: some packages failed to install: BerkeleyDB-0.7.2 failed during the building phase. The exception was: ExitFailure 1