Ticket #347 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

findProgramVersion fails with Debian's gcc

Reported by: ross Owned by:
Priority: normal Milestone:
Component: Cabal library Version: 1.2.3.0
Severity: normal Keywords:
Cc: Difficulty: normal
GHC Version: 6.8.2 Platform:

Description

The version string produced by Debian's gcc has an unexpected form:

Warning: cannot determine version of /usr/bin/gcc :
"gcc (Debian 4.3.1-2) 4.3.1\nCopyright (C) 2008 Free Software Foundation,
Inc.\nThis is free software; see the source for copying conditions. There is
NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.\n\n"

Change History

Changed 5 years ago by duncan

  • status changed from new to closed
  • resolution set to fixed

Hopefully this patch fixed it:

Sun Aug 31 15:01:45 PDT 2008  Duncan Coutts <duncan@haskell.org>
  * Use a hopefully more robust method of determining the gcc version

We now call gcc -dumpversion rather than interpreting the output of gcc --version. I've checked gcc -dumpversion on all the platforms I have access to (including debian, ubuntu and solaris) and it produces consistent results.

Note: See TracTickets for help on using tickets.