DMD crash! and JSON files

Regan Heath regan at netmail.co.nz
Wed Apr 21 08:11:49 PDT 2010


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.

So.. attempt #1, the naive approach.  I cracked open the win32.mak files 
for each and added -X to DFLAGS.


For druntime...

I did a "make -fwin32.mak clean" then "make -fwin32.mak" only to get:
   Target 'target' is up to date

It seems that 'clean' doesn't clean everything, it gave an error:
   The system cannot find the file specified.

for one of the myriad files included in the del command.  I modified 
win32.mak for druntime to perform a seperate del command for each item, eg.

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

this isn't perfect as I suspect if any file in any of those lists is 
missing the delete will stop dead, but this does at least clean enough 
to get me going again.

** (Walter, might be worth making a similar change to the master copy?)

I then repeated the make steps and managed to produce a druntime.lib 
plus these JSON file..
   bitop.json
   gcstub.json

that's less than I was expecting.. is this because the dmd command to 
build druntime.lib is a -lib and -X is not compatible/meaningful with it?


Ignoring that for now I moved on to phobos itself...

"make -fwin32.mak clean" worked, but "make -fwin32.mak" failed until I 
added:  "-I%@P%\..\..\src\druntime\src" to my sc.ini

** (Walter, should that be there by default? .. perhaps not as you only 
need it to rebuild phobos and most ppl don't do that).

Now "make -fwin32.mak" gets as far as the big dmd -lib command but this 
time it crashes ***!

I do however have a few JSON files from the make:
   c_stdio.json
   Czlib.json
   Dzlib.json
   oldsyserror.json

It seems I am going to need to get smarter with the makefiles, instead 
of attempting to piggy-back the lib build process I should build each 
file seperately to produce a JSON...



More information about the Digitalmars-d mailing list