Not much to say other than GHC does not compile as a 64-bit program on OS X, even on 64-bit systems (all shipping macs are 64-bit, and have been for somewhere up to a year).
I've tried to see if i can get it to compile 64-bit, and I haven't had any luck at all. configure doesn't seem to take any notice of CFLAGS etc.
Trac metadata
Trac field
Value
Version
6.10.1
Type
FeatureRequest
TypeOfFailure
OtherFailure
Priority
normal
Resolution
Unresolved
Component
Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
I agree that it would be interesting to get this to work. But this won't be done with a couple of CFLAGS. There is more involved, such as getting the runtime system compile for 64bit. All the required code should already be in there (for 64bit support on other archs), but the Mac build currently assumes 32bit. So, that should be split into two paths, one Mac 32bit and one Mac 64bit (and then there is Mac ppc of course).
There seems to already be support for the x86_64-apple-darwin target in configure.ac; running configure like so:
./configure --build=x86_64-apple-darwin
results in x86_64_HOST_ARCH being defined throughout.
The Stage1 compiler seems to mostly build after this; the first failure is in Adjustor.c because as Manuel said the runtime system isn't designed to handle 64bit OS X yet - the code path indeed needs to be split.
I'm taking over this ticket because I'm interested in getting it working; 64bit support is already there and it would be nice to have on OS X.
I've added x86_64-apple-darwin to the list of Tier-2 platforms on Platforms (optimistically assuming that it works unregisterised, at least).
I'm not sure it even works unregistered, actually. The unregistered OS X x86_64 ghc build that Ian Lynagh made a couple of months ago unfortunately included a bug that has since been fixed, that appeared (to Austin and me, at least) to prevent using it to build another GHC with it. And more recent attempts on my part to make a new unregistered build for x86_64 ran into several issues as described on #3472 (closed) . I've tried several times and have failed, but maybe my approach is incorrect, so I'd welcome it if anyone else on this CC list could try similar steps to see if it's PEBKAC :)
I've added x86_64-apple-darwin to the list of Tier-2 platforms on Platforms (optimistically assuming that it works unregisterised, at least).
Since the release of Snow Leopard (Mac OS X 10.5.8) x86_64-apple-darwin is the default for Macs. Given the upgrade price for Snow Leopard and the typical adoption rate of Macs users, this will soon be the most widely used Mac platform.
Is there a workaround for template haskell (TH) code being compiled in 32bit mode? How does TH call ghc internally? (Adding "-optc-m32 -opta-m32 -optl-m32" to the installed ghci (and runghc?) did not help.)
Just to add: what we would really like is for someone to step forward as the Maintainer of the X86_64 MacOS port of GHC. Then we really could make it a Tier-1 platform (see http://hackage.haskell.org/trac/ghc/wiki/Platforms). In principle its not hard:
MacOS is already in one Tier-1 platform (32 bit)
x86_64 is already in another Tier-1 platform (Linux)
All we need to do is to put the two together -- and some folk are already working on that (#3472 (closed)).
But for us to sign up to Tier-1-ness, we need someone (or a small group) to sign up to being the maintainers.
(Ben recently volunteered to be the maintainer for Sparc; thanks Ben.)
Just to add: what we would really like is for someone to step forward as the Maintainer of the X86_64 MacOS port of GHC. Then we really could make it a Tier-1 platform (see http://hackage.haskell.org/trac/ghc/wiki/Platforms). In principle its not hard:
MacOS is already in one Tier-1 platform (32 bit)
x86_64 is already in another Tier-1 platform (Linux)
All we need to do is to put the two together -- and some folk are already working on that (#3472 (closed)).
But for us to sign up to Tier-1-ness, we need someone (or a small group) to sign up to being the maintainers.
(Ben recently volunteered to be the maintainer for Sparc; thanks Ben.)
Simon
I would definitely be willing to "co-maintain" this with someone else, but as a relative newcomer to Haskell and GHC (who hasn't even succeeded in making an unregistered build for this platform yet) I don't think I'd be suitable as a sole maintainer. Any experts out there who'd be willing to help?
Replying to [ticket:2965#comment:36045 pumpkin]: I too would be happy to help to maintain this, however, I am also a relative newbie and would need assistance. If someone could point me in the right direction, I am a fast learner!!!!
Just to add: what we would really like is for someone to step forward as the Maintainer of the X86_64 MacOS port of GHC. Then we really could make it a Tier-1 platform (see http://hackage.haskell.org/trac/ghc/wiki/Platforms). In principle its not hard:
MacOS is already in one Tier-1 platform (32 bit)
x86_64 is already in another Tier-1 platform (Linux)
All we need to do is to put the two together -- and some folk are already working on that (#3472 (closed)).
But for us to sign up to Tier-1-ness, we need someone (or a small group) to sign up to being the maintainers.
(Ben recently volunteered to be the maintainer for Sparc; thanks Ben.)
Simon
I would definitely be willing to "co-maintain" this with someone else, but as a relative newcomer to Haskell and GHC (who hasn't even succeeded in making an unregistered build for this platform yet) I don't think I'd be suitable as a sole maintainer. Any experts out there who'd be willing to help?
It's my ticket, so i guess i could take some responsibility. I'm not sure how useful I could be, or how much time i could spend, at least not until the summer holidays here (December to February). I've also never looked into GHC's source, so I'd probably need help too. So anyway, sign me up as co-maintainer, and i'll see how i can help when I have time.
I'd also like to say thanks to everyone for the recent activity regarding this ticket. With Snow Leopard being the first Mac OS favouring 64-bit over 32, I think it's important that GHC move that way, so it doesn't feel left behind on the system.
Just to add: what we would really like is for someone to step forward as the Maintainer of the X86_64 MacOS port of GHC. Then we really could make it a Tier-1 platform (see http://hackage.haskell.org/trac/ghc/wiki/Platforms). In principle its not hard:
MacOS is already in one Tier-1 platform (32 bit)
x86_64 is already in another Tier-1 platform (Linux)
All we need to do is to put the two together -- and some folk are already working on that (#3472 (closed)).
But for us to sign up to Tier-1-ness, we need someone (or a small group) to sign up to being the maintainers.
(Ben recently volunteered to be the maintainer for Sparc; thanks Ben.)
Simon
I would definitely be willing to "co-maintain" this with someone else, but as a relative newcomer to Haskell and GHC (who hasn't even succeeded in making an unregistered build for this platform yet) I don't think I'd be suitable as a sole maintainer. Any experts out there who'd be willing to help?
Just to add: what we would really like is for someone to step forward as the Maintainer of the X86_64 MacOS port of GHC. Then we really could make it a Tier-1 platform (see http://hackage.haskell.org/trac/ghc/wiki/Platforms). In principle its not hard:
MacOS is already in one Tier-1 platform (32 bit)
x86_64 is already in another Tier-1 platform (Linux)
All we need to do is to put the two together -- and some folk are already working on that (#3472 (closed)).
But for us to sign up to Tier-1-ness, we need someone (or a small group) to sign up to being the maintainers.
(Ben recently volunteered to be the maintainer for Sparc; thanks Ben.)
Simon
The way I see it, as soon as GHC works as a 64 bit app on OS X, this will very soon be the main version for OS X and it's the maintenance of the 32 bit version that you need to worry about. I am currently listed (with Wolfgang Taller) as x86 platform maintainer. As soon as there is a 64 bit version of GHC on OS X, I will surely use that (as will most GHC users on Macs).
I've removed Wolfgang as maintainer, as we haven't heard from him in a long time. That leaves you ;-) Any other interested maintainers, please add yourselves: Contributors.
Bear in mind that the 64-bit build will use twice as much memory, so I can imagine some people might still want the 32-bit version, especially since a large proportion of OS X machines are laptops.