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
daf5cd6b
Commit
daf5cd6b
authored
Jun 24, 2014
by
tibbe
Browse files
Merge pull request #1958 from llelf/master
clearly warn about the absense of working C compiler if we need foreign deps
parents
8be51771
de224193
Changes
1
Hide whitespace changes
Inline
Side-by-side
Cabal/Distribution/Simple/Configure.hs
View file @
daf5cd6b
...
...
@@ -75,7 +75,7 @@ import Distribution.Simple.Program
,
ProgramSearchPathEntry
(
..
),
getProgramSearchPath
,
setProgramSearchPath
,
configureAllKnownPrograms
,
knownPrograms
,
lookupKnownProgram
,
userSpecifyArgss
,
userSpecifyPaths
,
requireProgram
,
requireProgramVersion
,
lookupProgram
,
requireProgram
,
requireProgramVersion
,
pkgConfigProgram
,
gccProgram
,
rawSystemProgramStdoutConf
)
import
Distribution.Simple.Setup
(
ConfigFlags
(
..
),
CopyDest
(
..
),
fromFlag
,
fromFlagOrDefault
,
flagToMaybe
)
...
...
@@ -1159,11 +1159,20 @@ checkForeignDeps pkg lbi verbosity = do
_
<-
rawSystemProgramStdoutConf
verbosity
gccProgram
(
withPrograms
lbi
)
(
cName
:
"-o"
:
oNname
:
args
)
return
True
--TODO: need a better error in the case of not finding gcc!
`
catchIO
`
(
\
_
->
return
False
)
`
catchExit
`
(
\
_
->
return
False
)
explainErrors
Nothing
[]
=
return
()
-- should be impossible!
explainErrors
_
_
|
isNothing
.
lookupProgram
gccProgram
.
withPrograms
$
lbi
=
die
$
unlines
$
[
"No working gcc"
,
"This package depends on foreign library but we cannot "
++
"find a working C compiler. If you have it in a "
++
"non-standard location you can use the --with-gcc "
++
"flag to specify it."
]
explainErrors
hdr
libs
=
die
$
unlines
$
[
if
plural
then
"Missing dependencies on foreign libraries:"
...
...
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