
#8825: ghc can't determine gcc version on ru_RU locale -------------------------------------+------------------------------------ Reporter: slyfox | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by slyfox): Replying to [comment:1 juhpetersen]:
So `LANG=C ghc ...` or `LANG=en_US.utf8 ghc ...` do not give the warning?
Yes, LANG=C "fixes" it.
I suspect it would be better to give an explicit example of how to reproduce the warning. What version of binutils (for GNU ld) do you have installed?
ghc's warning explicitely says about 'gcc' / 'clang'. I don't think it matters, but it's '''binutils-2.24'''. Once I'll manage to filter out which exactly file triggers it from 9 parallel building threads I'll post a minimal example. I thought error message is obvious enough, but whatever: '''compiler/main/SysTools.lhs''' {{{ -- See Note [Run-time linker info]. getCompilerInfo' :: DynFlags -> IO CompilerInfo getCompilerInfo' dflags = do let (pgm,_) = pgm_c dflags -- Try to grab the info from the process output. parseCompilerInfo _stdo stde _exitc -- Regular GCC | any ("gcc version" `isPrefixOf`) stde = return GCC -- Regular clang | any ("clang version" `isPrefixOf`) stde = return Clang ... -- Process the executable call info <- catchIO (do (exitc, stdo, stde) <- readProcessWithExitCode pgm ["-v"] "" -- Split the output by lines to make certain kinds -- of processing easier. parseCompilerInfo (lines stdo) (lines stde) exitc ) (\err -> do debugTraceMsg dflags 2 (text "Error (figuring out compiler information):" <+> text (show err)) errorMsg dflags $ hang (text "Warning:") 9 $ text "Couldn't figure out linker information!" $$ text "Make sure you're using GNU gcc, or clang" return UnknownCC) return info }}}
I don't think I have seen this on Fedora anyway, so it sounds like it could be a Gentoo specific issue perhaps.
Gentoo does not do translation to russian on it's own. What locale do you use on Fedora? Do you have non-english locale installed for gcc? That should be easy to check: {{{ LANG=ru_RU.UTF-8 gcc -v 2>&1 | tail -n1 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8825#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler