DMD crash! and JSON files

Regan Heath regan at netmail.co.nz
Thu Apr 22 03:27:36 PDT 2010


Don wrote:
> Regan Heath wrote:
>> I just installed VisualD and enabled JSON output on my project and to 
>> my delight F12 took me to my own symbols.  Yay.  Next, I thought it 
>> would be grand if I could jump around phobos/druntime code the same 
>> way so I went looking for JSON files for these.  Sadly, they're not 
>> included in the DMD release zip.  Not to be foiled so easily I figured 
>> I'd try my hand at building druntime and phobos.
> 
> [snip]
> 
>> Now "make -fwin32.mak" gets as far as the big dmd -lib command but 
>> this time it crashes ***!
> 
> bug 4809 ?
> 
> BTW, I don't need to modify paths in order to build on Windows (except 
> note that you need to touch druntime/minit.obj because of a problem with 
> the download). So you shouldn't need to modify sc.ini.

Ahh.. I've figured out why I got the error.  It was a combination of things.

1. My modified druntime win32.mak:

clean:
	del $(DOCS)
	del $(IMPORTS)
	del $(DRUNTIME)
	del $(OBJS_TO_DELETE)
	del $(GCSTUB)

without this change "make -fwin32.mak clean" will error before cleaning 
the imports, because none of the docs exist, they're not included in the 
zip.  With this change the *imports* are deleted.

2. The default druntime "make -fwin32.mak" does not build the imports, 
you have to do that as a seperate step "make -fwin32.mak import".

So, as I had #1 and didn't perform #2 it meant that my phobos build 
needed to find the druntime source, instead of using the imports, thus 
why it failed with:

dmd -c -O -release -nofloat -w -d etc\c\zlib.d -ofCzlib.obj

dmd -c -O -release -nofloat -w -d std\zlib.d -ofDzlib.obj
std\stdio.d(24): Error: module memory cannot read file 'core\memory.d'
import path[0] = D:\Development\D\dmd2\windows\bin\..\..\src\phobos
import path[1] = D:\Development\D\dmd2\windows\bin\..\..\src\druntime\import

--- errorlevel 1

My understanding of what 'make' does is limited to doing what I've 
previously needed to do, which isn't much, but I prefer the default make 
target to at least build "everything", so I've added the following 
target to the top of the win32.mak for druntime:

all : target import doc

Is that a sensible default for the distributed file?  Perhaps?  I think 
the change I made to clean is.

R



More information about the Digitalmars-d mailing list