Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
32ea70c8
Commit
32ea70c8
authored
Sep 27, 2013
by
Mikhail Glushenkov
Browse files
Suggest that 'ExitFailure 9' is probably due to memory exhaustion.
Fixes #1522.
parent
809ba758
Changes
1
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/Install.hs
View file @
32ea70c8
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Install
...
...
@@ -33,10 +34,10 @@ import qualified Data.Set as S
import
Data.Maybe
(
isJust
,
fromMaybe
,
maybeToList
)
import
Control.Exception
as
Exception
(
Exception
(
toException
),
bracket
,
catches
,
Handler
(
Handler
),
handleJust
,
IOException
,
SomeException
)
(
Exception
(
fromException
,
toException
),
bracket
,
catches
,
Handler
(
Handler
),
handleJust
,
IOException
,
SomeException
)
import
System.Exit
(
ExitCode
)
(
ExitCode
(
..
)
)
import
Distribution.Compat.Exception
(
catchIO
,
catchExit
)
import
Control.Monad
...
...
@@ -187,10 +188,10 @@ install verbosity packageDBs repos comp platform conf useSandbox mSandboxPkgInfo
then
installFailedInSandbox
else
[]
)
-- TODO: use a better error message, remove duplication.
installFailedInSandbox
=
"
\n
Note: when using a sandbox, all packages are required to have
\
\
consistent dependencies.
\
\
Try reinstalling/unregistering the offending packages or
\
\
recreating the sandbox."
"
\n
Note: when using a sandbox, all packages are required to have
"
++
"
consistent dependencies.
"
++
"
Try reinstalling/unregistering the offending packages or
"
++
"
recreating the sandbox."
logMsg
message
rest
=
debugNoWrap
verbosity
message
>>
rest
-- TODO: Make InstallContext a proper datatype with documented fields.
...
...
@@ -801,17 +802,28 @@ printBuildFailures plan =
DependentFailed
pkgid
->
" depends on "
++
display
pkgid
++
" which failed to install."
DownloadFailed
e
->
" failed while downloading the package."
++
" The e
xception
was:
\n
"
++
show
e
++
showE
xception
e
UnpackFailed
e
->
" failed while unpacking the package."
++
" The e
xception
was:
\n
"
++
show
e
++
showE
xception
e
ConfigureFailed
e
->
" failed during the configure step."
++
" The e
xception
was:
\n
"
++
show
e
++
showE
xception
e
BuildFailed
e
->
" failed during the building phase."
++
" The e
xception
was:
\n
"
++
show
e
++
showE
xception
e
TestsFailed
e
->
" failed during the tests phase."
++
" The e
xception
was:
\n
"
++
show
e
++
showE
xception
e
InstallFailed
e
->
" failed during the final install step."
++
" The exception was:
\n
"
++
show
e
++
showException
e
showException
e
=
" The exception was:
\n
"
++
show
e
++
maybeOOM
e
#
ifdef
mingw32_HOST_OS
maybeOOM
_
=
""
#
else
maybeOOM
e
=
maybe
""
onExitFailure
(
fromException
e
)
onExitFailure
(
ExitFailure
9
)
=
"
\n
This may be due to an out-of-memory condition."
onExitFailure
_
=
""
#
endif
-- | If we're working inside a sandbox and some add-source deps were installed,
-- update the timestamps of those deps.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment