www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Strange issue on OSX

reply "Jeremy DeHaan" <dehaan.jeremiah gmail.com> writes:
I wanted to try out OSX to make sure all my stuff was working 
fine there as well, but after downloading DMD and then running it 
in the terminal to make sure everything was good it gives me this 
error:
/usr/bin/dmd: Bad CPU type in executable


This is my first time using a Mac, so I could very well be doing 
something wrong. I didn't want to spend a lot of money, so it is 
a slightly older machine currently running OSX 10.6.8. It is an 
Intel Core Duo, which apparently won't let me upgrade to 
Mavericks, so I'm stuck with Snow Leopard.


Any advice for what I should do? Anyone seen this error before?

Thanks in advance,
     Jeremy
Jun 12 2014
next sibling parent reply "Jeremy DeHaan" <dehaan.jeremiah gmail.com> writes:
Just tried downloading the .zip instead of using the installer. I 
got the same problem. I also tried downloading 2.064, and again I 
got the same error message. I did notice that not everything give 
me the Bad CPU Type error message. I'll try building from source 
and see how that goes.


On Thursday, 12 June 2014 at 23:12:38 UTC, Jeremy DeHaan wrote:
 I wanted to try out OSX to make sure all my stuff was working 
 fine there as well, but after downloading DMD and then running 
 it in the terminal to make sure everything was good it gives me 
 this error:
 /usr/bin/dmd: Bad CPU type in executable


 This is my first time using a Mac, so I could very well be 
 doing something wrong. I didn't want to spend a lot of money, 
 so it is a slightly older machine currently running OSX 10.6.8. 
 It is an Intel Core Duo, which apparently won't let me upgrade 
 to Mavericks, so I'm stuck with Snow Leopard.


 Any advice for what I should do? Anyone seen this error before?

 Thanks in advance,
     Jeremy

Jun 12 2014
parent reply Jacob Carlborg <doob me.com> writes:
On 13/06/14 07:26, Tolga Cakiroglu wrote:
 In the download page, table shows for which CPU type they are available.

 dmd.2.065.0.zip shows i386 and x86_64. So, this should run on 32 and
 64-bits.
 dmd.2.065.0.dmg shows only x86_64 which is for 64-bit CPU only.

That's not correct. The zip file only contains 64bit. DMD for OS X has only been released as 64bit for quite a while now. Just run the "file" command on the dmd executable to see which platforms it supports. -- /Jacob Carlborg
Jun 13 2014
parent Jacob Carlborg <doob me.com> writes:
On 2014-06-14 04:12, Jeremy DeHaan wrote:

 I agree. Also, this page (http://dlang.org/dmd-osx.html) says that the
 base requirement is a 32 bit OSX. Why is the DMD version that is
 released 64 bit? That seems very counter intuitive.

Technically you can run 64bit applications on 32bit OS X if you have a 64bit CPU. -- /Jacob Carlborg
Jun 14 2014
prev sibling next sibling parent "Jeremy DeHaan" <dehaan.jeremiah gmail.com> writes:
So building from source seemed to work. Is it possible that the 
OSX version of DMD was released as a 64 bit version?

On Friday, 13 June 2014 at 03:53:30 UTC, Jeremy DeHaan wrote:
 Just tried downloading the .zip instead of using the installer. 
 I got the same problem. I also tried downloading 2.064, and 
 again I got the same error message. I did notice that not 
 everything give me the Bad CPU Type error message. I'll try 
 building from source and see how that goes.


 On Thursday, 12 June 2014 at 23:12:38 UTC, Jeremy DeHaan wrote:
 I wanted to try out OSX to make sure all my stuff was working 
 fine there as well, but after downloading DMD and then running 
 it in the terminal to make sure everything was good it gives 
 me this error:
 /usr/bin/dmd: Bad CPU type in executable


 This is my first time using a Mac, so I could very well be 
 doing something wrong. I didn't want to spend a lot of money, 
 so it is a slightly older machine currently running OSX 
 10.6.8. It is an Intel Core Duo, which apparently won't let me 
 upgrade to Mavericks, so I'm stuck with Snow Leopard.


 Any advice for what I should do? Anyone seen this error before?

 Thanks in advance,
    Jeremy


Jun 12 2014
prev sibling next sibling parent "Tolga Cakiroglu" <tcak pcak.com> writes:
In the download page, table shows for which CPU type they are 
available.

dmd.2.065.0.zip shows i386 and x86_64. So, this should run on 32 
and 64-bits.
dmd.2.065.0.dmg shows only x86_64 which is for 64-bit CPU only.

On Friday, 13 June 2014 at 04:25:38 UTC, Jeremy DeHaan wrote:
 So building from source seemed to work. Is it possible that the 
 OSX version of DMD was released as a 64 bit version?

 On Friday, 13 June 2014 at 03:53:30 UTC, Jeremy DeHaan wrote:
 Just tried downloading the .zip instead of using the 
 installer. I got the same problem. I also tried downloading 
 2.064, and again I got the same error message. I did notice 
 that not everything give me the Bad CPU Type error message. 
 I'll try building from source and see how that goes.


 On Thursday, 12 June 2014 at 23:12:38 UTC, Jeremy DeHaan wrote:
 I wanted to try out OSX to make sure all my stuff was working 
 fine there as well, but after downloading DMD and then 
 running it in the terminal to make sure everything was good 
 it gives me this error:
 /usr/bin/dmd: Bad CPU type in executable


 This is my first time using a Mac, so I could very well be 
 doing something wrong. I didn't want to spend a lot of money, 
 so it is a slightly older machine currently running OSX 
 10.6.8. It is an Intel Core Duo, which apparently won't let 
 me upgrade to Mavericks, so I'm stuck with Snow Leopard.


 Any advice for what I should do? Anyone seen this error 
 before?

 Thanks in advance,
   Jeremy



Jun 12 2014
prev sibling next sibling parent "Tolga Cakiroglu" <tcak pcak.com> writes:
On Friday, 13 June 2014 at 07:13:36 UTC, Jacob Carlborg wrote:
 On 13/06/14 07:26, Tolga Cakiroglu wrote:
 In the download page, table shows for which CPU type they are 
 available.

 dmd.2.065.0.zip shows i386 and x86_64. So, this should run on 
 32 and
 64-bits.
 dmd.2.065.0.dmg shows only x86_64 which is for 64-bit CPU only.

That's not correct. The zip file only contains 64bit. DMD for OS X has only been released as 64bit for quite a while now. Just run the "file" command on the dmd executable to see which platforms it supports.

Well, then somebody should update what the download page lists there. At least make it clear and "correct". If I and others think or cannot understand which one to download correctly, that means there is a problem.
Jun 13 2014
prev sibling next sibling parent "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm gmx.net> writes:
On Friday, 13 June 2014 at 15:14:00 UTC, Tolga Cakiroglu wrote:
 On Friday, 13 June 2014 at 07:13:36 UTC, Jacob Carlborg wrote:
 On 13/06/14 07:26, Tolga Cakiroglu wrote:
 In the download page, table shows for which CPU type they are 
 available.

 dmd.2.065.0.zip shows i386 and x86_64. So, this should run on 
 32 and
 64-bits.
 dmd.2.065.0.dmg shows only x86_64 which is for 64-bit CPU 
 only.

That's not correct. The zip file only contains 64bit. DMD for OS X has only been released as 64bit for quite a while now. Just run the "file" command on the dmd executable to see which platforms it supports.

Well, then somebody should update what the download page lists there. At least make it clear and "correct". If I and others think or cannot understand which one to download correctly, that means there is a problem.

https://github.com/D-Programming-Language/dlang.org/pull/593
Jun 13 2014
prev sibling next sibling parent "Jeremy DeHaan" <dehaan.jeremiah gmail.com> writes:
On Friday, 13 June 2014 at 15:14:00 UTC, Tolga Cakiroglu wrote:
 On Friday, 13 June 2014 at 07:13:36 UTC, Jacob Carlborg wrote:
 On 13/06/14 07:26, Tolga Cakiroglu wrote:
 In the download page, table shows for which CPU type they are 
 available.

 dmd.2.065.0.zip shows i386 and x86_64. So, this should run on 
 32 and
 64-bits.
 dmd.2.065.0.dmg shows only x86_64 which is for 64-bit CPU 
 only.

That's not correct. The zip file only contains 64bit. DMD for OS X has only been released as 64bit for quite a while now. Just run the "file" command on the dmd executable to see which platforms it supports.

Well, then somebody should update what the download page lists there. At least make it clear and "correct". If I and others think or cannot understand which one to download correctly, that means there is a problem.

I agree. Also, this page (http://dlang.org/dmd-osx.html) says that the base requirement is a 32 bit OSX. Why is the DMD version that is released 64 bit? That seems very counter intuitive.
Jun 13 2014
prev sibling next sibling parent "Chris Cain" <zshazz gmail.com> writes:
On Saturday, 14 June 2014 at 02:12:45 UTC, Jeremy DeHaan wrote:
 I agree. Also, this page (http://dlang.org/dmd-osx.html) says 
 that the base requirement is a 32 bit OSX. Why is the DMD 
 version that is released 64 bit? That seems very counter 
 intuitive.

Honestly, I feel like it should be noted that you need to build from source to get the 32-bit version... but I don't see why it should be included in the actual binary release. Not even Apple supports the 32-bit hardware anymore. AFAIK, 64-bit Macs came out in late 2006, so we're talking about 8 year old hardware at this point.
Jun 13 2014
prev sibling next sibling parent "Jeremy DeHaan" <dehaan.jeremiah gmail.com> writes:
On Saturday, 14 June 2014 at 02:30:56 UTC, Chris Cain wrote:
 On Saturday, 14 June 2014 at 02:12:45 UTC, Jeremy DeHaan wrote:
 I agree. Also, this page (http://dlang.org/dmd-osx.html) says 
 that the base requirement is a 32 bit OSX. Why is the DMD 
 version that is released 64 bit? That seems very counter 
 intuitive.

Honestly, I feel like it should be noted that you need to build from source to get the 32-bit version... but I don't see why it should be included in the actual binary release. Not even Apple supports the 32-bit hardware anymore. AFAIK, 64-bit Macs came out in late 2006, so we're talking about 8 year old hardware at this point.

I didn't realize that was the case. Like I said in my original post, I haven't used a mac before this so I am pretty new to them. It definitely would have been nice if it said something about needing to build it for 32 bit OSX though. I think that would have saved me a lot of time.
Jun 13 2014
prev sibling next sibling parent "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm gmx.net> writes:
On Saturday, 14 June 2014 at 10:38:08 UTC, Jacob Carlborg wrote:
 On 2014-06-14 04:12, Jeremy DeHaan wrote:

 I agree. Also, this page (http://dlang.org/dmd-osx.html) says 
 that the
 base requirement is a 32 bit OSX. Why is the DMD version that 
 is
 released 64 bit? That seems very counter intuitive.

Technically you can run 64bit applications on 32bit OS X if you have a 64bit CPU.

Really? The other way round, yes, but this would really surprise me...
Jun 14 2014
prev sibling parent "David Nadlinger" <code klickverbot.at> writes:
On Saturday, 14 June 2014 at 11:16:57 UTC, Marc Sch├╝tz wrote:
 On Saturday, 14 June 2014 at 10:38:08 UTC, Jacob Carlborg wrote:
 Technically you can run 64bit applications on 32bit OS X if 
 you have a 64bit CPU.

Really? The other way round, yes, but this would really surprise me...

Yes. Before Mountain Lion, you could choose to run the Mach kernel in 32 bit mode while running 64 bit applications. David
Jun 14 2014