Re: Compiling 32-bit GHC on a 64-bit Mac

2011-06-06 Thread Johan Tibell
On Sun, Jun 5, 2011 at 2:38 PM, Ian Lynagh ig...@earth.li wrote:
 On Sun, Jun 05, 2011 at 02:10:39PM +0200, Johan Tibell wrote:

 I need to reproduce a bug that only appears on 32-bit machines. I
 don't own such a machine but I was hoping I could compile a 32-bit GHC
 on my Mac and debug using that. What changes do I need to make (e.g.
 to build/mk) to build a 32-bit GHC?

 Install
    http://www.haskell.org/ghc/dist/7.0.3/ghc-7.0.3-i386-apple-darwin.tar.bz2
 and make sure its ghc is first in your path.

 Then build as normal.

Running the OS X installers is a bit intrusive. Is there a way to get
a 32-bit version directly from source?

Cheers,
Johan

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Compiling 32-bit GHC on a 64-bit Mac

2011-06-06 Thread Christian Maeder

Am 06.06.2011 12:08, schrieb Johan Tibell:

On Sun, Jun 5, 2011 at 2:38 PM, Ian Lynaghig...@earth.li  wrote:

On Sun, Jun 05, 2011 at 02:10:39PM +0200, Johan Tibell wrote:


I need to reproduce a bug that only appears on 32-bit machines. I
don't own such a machine but I was hoping I could compile a 32-bit GHC
on my Mac and debug using that. What changes do I need to make (e.g.
to build/mk) to build a 32-bit GHC?


Install
http://www.haskell.org/ghc/dist/7.0.3/ghc-7.0.3-i386-apple-darwin.tar.bz2
and make sure its ghc is first in your path.

Then build as normal.


Running the OS X installers is a bit intrusive. Is there a way to get
a 32-bit version directly from source?


You need a 32-bit bootstrapping compiler as binary. The above 
binary-dist does not use the OS X installer (as it does not end in .pkg)


Cheers Christian



Cheers,
Johan


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: How to install GhC on a Mac without registering?

2011-06-06 Thread Malcolm Wallace

On 6 Jun 2011, at 13:49, Lyndon Maydwell wrote:

 I would be fantastic if XCode wasn't a dependency.  ...
 
 Not to detract at all from the work of the wonderful GHC and Haskell
 Platform contributors in any way. For me it would just make it that
 much easier to convince mac-using friends to give Haskell a try.

The ghc team already bundle a copy of gcc in their Windows distribution, 
precisely because it can be fiddly to get a working copy of gcc for that 
platform otherwise.  I wonder if they would consider the possibility of 
shipping gcc on Mac too?  (There may be good reasons not to do that, but let's 
have the discussion.)

Regards,
Malcolm

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: [Haskell-cafe] How to install GhC on a Mac without registering?

2011-06-06 Thread Daniel Peebles
Isn't gcc just used for its assembler and object file creation, these days,
now that via-C is deprecated? Or are there other parts of it that are
needed?

On Mon, Jun 6, 2011 at 10:47 AM, Malcolm Wallace malcolm.wall...@me.comwrote:


 On 6 Jun 2011, at 13:49, Lyndon Maydwell wrote:

  I would be fantastic if XCode wasn't a dependency.  ...
 
  Not to detract at all from the work of the wonderful GHC and Haskell
  Platform contributors in any way. For me it would just make it that
  much easier to convince mac-using friends to give Haskell a try.

 The ghc team already bundle a copy of gcc in their Windows distribution,
 precisely because it can be fiddly to get a working copy of gcc for that
 platform otherwise.  I wonder if they would consider the possibility of
 shipping gcc on Mac too?  (There may be good reasons not to do that, but
 let's have the discussion.)

 Regards,
 Malcolm

 ___
 Haskell-Cafe mailing list
 haskell-c...@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: [Haskell-cafe] How to install GhC on a Mac without registering?

2011-06-06 Thread Simon Marlow

On 06/06/11 15:57, Daniel Peebles wrote:

Isn't gcc just used for its assembler and object file creation, these
days, now that via-C is deprecated? Or are there other parts of it that
are needed?


The C compiler is needed to support foreign export and foreign import 
wrapper, and we also generate C fragments for some initialisation code 
now (in 7.2.1) as part of some changes I made to the way module 
initialisation is done.  The C compiler is also used to support 
-rtsopts, which requires compiling a small C file and linking it into 
the binary.


It's sometimes handy to be able to compile C files with GHC, if you're 
not using Cabal.


Cheers,
Simon



On Mon, Jun 6, 2011 at 10:47 AM, Malcolm Wallace malcolm.wall...@me.com
mailto:malcolm.wall...@me.com wrote:


On 6 Jun 2011, at 13:49, Lyndon Maydwell wrote:

  I would be fantastic if XCode wasn't a dependency.  ...
 
  Not to detract at all from the work of the wonderful GHC and Haskell
  Platform contributors in any way. For me it would just make it that
  much easier to convince mac-using friends to give Haskell a try.

The ghc team already bundle a copy of gcc in their Windows
distribution, precisely because it can be fiddly to get a working
copy of gcc for that platform otherwise.  I wonder if they would
consider the possibility of shipping gcc on Mac too?  (There may be
good reasons not to do that, but let's have the discussion.)

Regards,
Malcolm

___
Haskell-Cafe mailing list
haskell-c...@haskell.org mailto:haskell-c...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe




___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: How to install GhC on a Mac without registering?

2011-06-06 Thread Sean Leather
On Mon, Jun 6, 2011 at 16:47, Malcolm Wallace wrote:

 The ghc team already bundle a copy of gcc in their Windows distribution,
 precisely because it can be fiddly to get a working copy of gcc for that
 platform otherwise.  I wonder if they would consider the possibility of
 shipping gcc on Mac too?  (There may be good reasons not to do that, but
 let's have the discussion.)


I would be in favor of this -- assuming it didn't create new problems --
especially if it meant the latest GHC installer could be used on older
versions of Mac OS X. The Windows installer still works for Windows 2000,
but the Mac installer requires the Snow Leopard.

Regards,
Sean
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: How to install GhC on a Mac without registering?

2011-06-06 Thread Ian Lynagh
On Mon, Jun 06, 2011 at 03:47:57PM +0100, Malcolm Wallace wrote:
 
 On 6 Jun 2011, at 13:49, Lyndon Maydwell wrote:
 
  I would be fantastic if XCode wasn't a dependency.  ...
  
  Not to detract at all from the work of the wonderful GHC and Haskell
  Platform contributors in any way. For me it would just make it that
  much easier to convince mac-using friends to give Haskell a try.
 
 The ghc team already bundle a copy of gcc in their Windows distribution, 
 precisely because it can be fiddly to get a working copy of gcc for that 
 platform otherwise.  I wonder if they would consider the possibility of 
 shipping gcc on Mac too?  (There may be good reasons not to do that, but 
 let's have the discussion.)

I'm pretty sure we aren't allowed to redistribute XCode.

As well as gcc and friends, I think XCode also includes various headers
and/or libraries that we need.

If there is an alternative - especially one that allows us to support
multiple versions of OS X more easily - then using it may make sense.


Thanks
Ian


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: getCPUTime implementation incorrect?

2011-06-06 Thread Evan Laforge
 See

  http://hackage.haskell.org/trac/ghc/ticket/4247

 and

  http://hackage.haskell.org/trac/ghc/ticket/4970

 We ought to fix this in 7.0.4, since getCPUTime is pretty broken on OSX
 64-bit right now, but the fix involves an API change (to Foreign.C.Types).
  Ian - could we apply a fix that doesn't change APIs?

At least getCPUTime could be, since its use of CTime is internal.
Adding new types to Foreign.C shouldn't break anyone, and if you
change getCPUTime to internally use the new type no one outside will
be the wiser.  Except they can remove their OS X workarounds :)

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users