www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Does DMD produce working programs on Snow Leopard?

reply Justin Whear <justin economicmodeling.com> writes:
I've been trying to get some SDL windowing code to run on Snow Leopard and been
getting mysterious bus errors. After some poking around, I think the problems
are rather more fundamental in nature. Observe the following code:

module test1;
import std.stdio;

void main() {
	B b = new B();
}
class B {
	this() {
		writefln("Constructed B");
	}
}

If I use "dmd -run test1.d" I get nothing. No compilation problems, no errors,
and no "Constructed B".
If I use "dmd test1.d && ./test1" I get "Segmentation fault".
Using "gdb test1" to produce a backtrace reveals this:


terror11AssertError ()



All this is with dmd 1.050 on a Mac Mini running Mac OS X 10.6.1. I believe
this is the OS X version that most of my end-users (associates) are using, so I
need to target it. Is DMD going to be updated to produce working binaries on
this system?
Nov 02 2009
parent reply Walter Bright <newshound1 digitalmars.com> writes:
Justin Whear wrote:
 All this is with dmd 1.050 on a Mac Mini running Mac OS X 10.6.1. I
 believe this is the OS X version that most of my end-users
 (associates) are using, so I need to target it. Is DMD going to be
 updated to produce working binaries on this system?
Currently, no, dmd only works on 10.5. I haven't figured out why it is failing on 10.6 yet, but we'll find a fix for it.
Nov 02 2009
parent reply Justin Whear <justin economicmodeling.com> writes:
Ok, I'll look forward to that. Do you know if 10.6 makes any effort to be
backwards compatible? That is, could I build on 10.5 and then distribute to
boxes with 10.6 installed?

Walter Bright Wrote:

 Justin Whear wrote:
 All this is with dmd 1.050 on a Mac Mini running Mac OS X 10.6.1. I
 believe this is the OS X version that most of my end-users
 (associates) are using, so I need to target it. Is DMD going to be
 updated to produce working binaries on this system?
Currently, no, dmd only works on 10.5. I haven't figured out why it is failing on 10.6 yet, but we'll find a fix for it.
Nov 02 2009
next sibling parent Sean Kelly <sean invisibleduck.org> writes:
10.6 is as backwards-compatible as 10.5, so in theory you should be able to
build on either and distribute on either.  However, it sounds like this *may*
not be possible in this case if the problem between 10.5 and 10.6 involves a
change in how object files are processed/generated (assuming a common approach
can't be found that works for both).  If the compiler really has to generate
different output based on the platform it's running on then it will either need
to detect this somehow or accept a switch.  This is all speculative however,
since we haven't figured out exactly what the problem is yet (mostly because
Walter hasn't investigated it and I've been too busy to give it a serious look).

Justin Whear Wrote:

 Ok, I'll look forward to that. Do you know if 10.6 makes any effort to be
backwards compatible? That is, could I build on 10.5 and then distribute to
boxes with 10.6 installed?
 
 Walter Bright Wrote:
 
 Justin Whear wrote:
 All this is with dmd 1.050 on a Mac Mini running Mac OS X 10.6.1. I
 believe this is the OS X version that most of my end-users
 (associates) are using, so I need to target it. Is DMD going to be
 updated to produce working binaries on this system?
Currently, no, dmd only works on 10.5. I haven't figured out why it is failing on 10.6 yet, but we'll find a fix for it.
Nov 02 2009
prev sibling parent Walter Bright <newshound1 digitalmars.com> writes:
Justin Whear wrote:
 Ok, I'll look forward to that. Do you know if 10.6 makes any effort
 to be backwards compatible? That is, could I build on 10.5 and then
 distribute to boxes with 10.6 installed?
I have no idea. I do know that it was necessary to jump through obscure hoops to get a 10.5 program to run on 10.4 without a bus error.
Nov 02 2009