[GHC] #8139: ghc 7.6.3 fails to build on OS X 10.9

GHC ghc-devs at haskell.org
Sat Aug 17 20:48:42 CEST 2013


#8139: ghc 7.6.3 fails to build on OS X 10.9
----------------------------------+-------------------------------------
       Reporter:  darinmorrison   |             Owner:
           Type:  bug             |            Status:  new
       Priority:  normal          |         Milestone:
      Component:  Compiler        |           Version:  7.6.3
       Keywords:                  |  Operating System:  Unknown/Multiple
   Architecture:  x86_64 (amd64)  |   Type of failure:  None/Unknown
     Difficulty:  Unknown         |         Test Case:
     Blocked By:                  |          Blocking:
Related Tickets:                  |
----------------------------------+-------------------------------------
 ghc 7.6.3 does not compile on OS X 10.9 (as of DP5).

 There are a few issues that seem to be causing this:

 1) gcc is no longer available and the clang compatibility patches of
 http://ghc.haskell.org/trac/ghc/ticket/7678 are not included in 7.6.3.

 2) There is some sort of bug that causes mkdirhier.sh to fail in some
 cases.

 3) There is another bug when compiling RtsProbes.d with DTrace. The
 problem seems to be triggered by the inclusion of stdint.h. #undef-ing
 HAVE_STDINT_H only for the compilation of RtsProbes.d (which then includes
 inttypes.h instead)  seems to work for some reason. A better solution may
 be possible from someone who understands the DTrace machinery better.

 The issue has has been discussed here:

 https://github.com/mxcl/homebrew/issues/20546

 I have come up with a tentative patch that fixes problems (2) and (3) here
 (and also pasted below):

 https://github.com/darinmorrison/homebrew/commit/611c76f6d6701c482559a64fe262f85b4dfda96f

 {{{
 diff --git a/includes/HsFFI.h b/includes/HsFFI.h
 index dceabab..bc5e423 100644
 --- a/includes/HsFFI.h
 +++ b/includes/HsFFI.h
 @@ -21,7 +21,7 @@ extern "C" {
  #include "stg/Types.h"

  /* get limits for integral types */
 -#ifdef HAVE_STDINT_H
 +#if defined HAVE_STDINT_H && !defined RTS_PROBES_D
  /* ISO C 99 says:
   * "C++ implementations should define these macros only when
   * __STDC_LIMIT_MACROS is defined before <stdint.h> is included."
 diff --git a/rts/RtsProbes.d b/rts/RtsProbes.d
 index 40665ac..8963ca7 100644
 --- a/rts/RtsProbes.d
 +++ b/rts/RtsProbes.d
 @@ -6,6 +6,8 @@
   *
   *
 ---------------------------------------------------------------------------*/

 +#define RTS_PROBES_D
 +
  #include "HsFFI.h"
  #include "rts/EventLogFormat.h"

 diff --git a/utils/mkdirhier/mkdirhier.sh b/utils/mkdirhier/mkdirhier.sh
 index 4c5d5f7..80762f4 100644
 --- a/utils/mkdirhier/mkdirhier.sh
 +++ b/utils/mkdirhier/mkdirhier.sh
 @@ -1,4 +1,4 @@
  #!/bin/sh

 -mkdir -p ${1+"$@"}
 +mkdir -p ${1+"./$@"}


 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8139>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler




More information about the ghc-tickets mailing list