#4996: can't link executables due to dtrace error on Mac OS X 10.5
--------------------------------------+-------------------------------------
Reporter: MtnViewMark | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.0.2
Resolution: wontfix | Keywords: dtrace osx mac 10.5
Testcase: | Blockedby:
Difficulty: | Os: MacOS X
Blocking: | Architecture: Unknown/Multiple
Failure: GHC doesn't work at all |
--------------------------------------+-------------------------------------
Comment(by grddev):
The problem seems to be that the dtrace symbols use version "v2" to encode
the typedefs under 10.6, which the dtrace utilities in 10.5 do not
understand. According to Apples own sources
(http://www.opensource.apple.com/source/dtrace/dtrace-78/libdtrace/dt_ld.m?txt)
"v2" seems to be a subset of "v1", which 10.5 understands.
Comparing against an older version of ghc, the dtrace symbols indeed seem
to be defined identically, but with "v1" in the name instead of "v2".
Workaround hack: Replace every instance of instance of
`___dtrace_typedefs$HaskellEvent$v2$` with
`___dtrace_typedefs$HaskellEvent$v1$` in the installed libHSrts*.a files.
With this hack, the 10.6 build of ghc now works on 10.5 and produces
working applications. What impact this change has on using dtrace together
with either ghc or a resulting application, I have no idea. I also don't
know how to test that. If it still works, the workaround could be
integrated in the build system by simply changing the header file
generated by dtrace, instead of modifying the archive files afterwards.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4996#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs