
Has anybody tried compiling GHC with the (beta) macOS 10.12 Sierra SDK? I just gave it a shot trying to compile GHC 7.8.3 and ran into a problem with GetTime.c in the RTS. (I haven’t tried GHC 8.0.1.) Manuel

Could you share your error messages ?
On Wednesday, July 27, 2016, Manuel M T Chakravarty
Has anybody tried compiling GHC with the (beta) macOS 10.12 Sierra SDK? I just gave it a shot trying to compile GHC 7.8.3 and ran into a problem with GetTime.c in the RTS. (I haven’t tried GHC 8.0.1.)
Manuel
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org javascript:; http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

fwiw I suspect this is http://git.haskell.org/ghc.git/commit/a0f1809742160ca0c07778f91f3e2a8ea147c0... On Thu, Jul 28, 2016 at 5:13 PM, Carter Schonwald < carter.schonwald@gmail.com> wrote:
Could you share your error messages ?
On Wednesday, July 27, 2016, Manuel M T Chakravarty
wrote: Has anybody tried compiling GHC with the (beta) macOS 10.12 Sierra SDK? I just gave it a shot trying to compile GHC 7.8.3 and ran into a problem with GetTime.c in the RTS. (I haven’t tried GHC 8.0.1.)
Manuel
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Yes, it is exactly the issue Brandon references. Thanks. I have got one concern with this fix, though: doesn’t that mean that a GHC *build* on macOS 10.12 will not run on earlier versions of macOS? In the meantime, I found, https://github.com/Homebrew/homebrew-core/issues/1957#issuecomment-226328001 which explains the issue. Now, when you compile on macOS 10.12 with this fix, GHC RTS will use ’clock_gettime’. However, that symbol is not available in the system libraries of earlier version of macOS, which will lead to a dyld failure when trying to run the executable. In fact, given this is in the RTS, any Haskell program compiled with such as build of GHC would be unable to run on macOS versions older than 10.12 (unless I am mistaken). Has this been considered? Manuel
Brandon Allbery
: fwiw I suspect this is http://git.haskell.org/ghc.git/commit/a0f1809742160ca0c07778f91f3e2a8ea147c0... http://git.haskell.org/ghc.git/commit/a0f1809742160ca0c07778f91f3e2a8ea147c0...
On Thu, Jul 28, 2016 at 5:13 PM, Carter Schonwald
mailto:carter.schonwald@gmail.com> wrote: Could you share your error messages ? On Wednesday, July 27, 2016, Manuel M T Chakravarty
mailto:chak@justtesting.org> wrote: Has anybody tried compiling GHC with the (beta) macOS 10.12 Sierra SDK? I just gave it a shot trying to compile GHC 7.8.3 and ran into a problem with GetTime.c in the RTS. (I haven’t tried GHC 8.0.1.) Manuel
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org <> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org mailto:ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com mailto:allbery.b@gmail.com ballbery@sinenomine.net mailto:ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net http://sinenomine.net/_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

BTW, here is an alternative fix (against 7.10.3) that uses the minimum deployment target to determine whether to use the new ’clock_gettime()’ on macOS to avoid the problem I mentioned in my previous message: https://github.com/mchakravarty/ghc/commit/da87a6551a528d51dfd4277c4468c57d5... (So far only tested by compiling against the macOS 10.12 SDK w/ Xcode 8 and running it on macOS 10.11.) Manuel
Manuel M T Chakravarty
: Yes, it is exactly the issue Brandon references. Thanks.
I have got one concern with this fix, though: doesn’t that mean that a GHC *build* on macOS 10.12 will not run on earlier versions of macOS?
In the meantime, I found,
https://github.com/Homebrew/homebrew-core/issues/1957#issuecomment-226328001 https://github.com/Homebrew/homebrew-core/issues/1957#issuecomment-226328001
which explains the issue. Now, when you compile on macOS 10.12 with this fix, GHC RTS will use ’clock_gettime’. However, that symbol is not available in the system libraries of earlier version of macOS, which will lead to a dyld failure when trying to run the executable.
In fact, given this is in the RTS, any Haskell program compiled with such as build of GHC would be unable to run on macOS versions older than 10.12 (unless I am mistaken). Has this been considered?
Manuel
Brandon Allbery
mailto:allbery.b@gmail.com>: fwiw I suspect this is http://git.haskell.org/ghc.git/commit/a0f1809742160ca0c07778f91f3e2a8ea147c0... http://git.haskell.org/ghc.git/commit/a0f1809742160ca0c07778f91f3e2a8ea147c0...
On Thu, Jul 28, 2016 at 5:13 PM, Carter Schonwald
mailto:carter.schonwald@gmail.com> wrote: Could you share your error messages ? On Wednesday, July 27, 2016, Manuel M T Chakravarty
mailto:chak@justtesting.org> wrote: Has anybody tried compiling GHC with the (beta) macOS 10.12 Sierra SDK? I just gave it a shot trying to compile GHC 7.8.3 and ran into a problem with GetTime.c in the RTS. (I haven’t tried GHC 8.0.1.) Manuel
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org <> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org mailto:ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com mailto:allbery.b@gmail.com ballbery@sinenomine.net mailto:ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net http://sinenomine.net/_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org mailto:ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
participants (3)
-
Brandon Allbery
-
Carter Schonwald
-
Manuel M T Chakravarty