www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - masm386 for building Phobos on Win32.

reply Dave <Dave_member pathlink.com> writes:
Where / how would I best go about getting the masm386 and macros.asm that is
needed to build Phobos on Windows?

Thanks,

- Dave
Aug 23 2004
parent reply J C Calvarese <jcc7 cox.net> writes:
Dave wrote:
 Where / how would I best go about getting the masm386 and macros.asm that is
 needed to build Phobos on Windows?
 
 Thanks,
 
 - Dave

You shouldn't need either of these to build Phobos. Is there a file called "minit.obj" in dmd\src\phobos? If it's missing it might have been deleted accidentily from a make clean. You may need to get another copy from the DMD zip file. Walter wrote: "minit.obj is already supplied for those who do not have masm386.exe." D/27406 -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Aug 23 2004
parent reply Sean Kelly <sean f4.ca> writes:
J C Calvarese wrote:
 Dave wrote:
 
 Where / how would I best go about getting the masm386 and macros.asm 
 that is
 needed to build Phobos on Windows?

 Thanks,

 - Dave

You shouldn't need either of these to build Phobos. Is there a file called "minit.obj" in dmd\src\phobos? If it's missing it might have been deleted accidentily from a make clean. You may need to get another copy from the DMD zip file. Walter wrote: "minit.obj is already supplied for those who do not have masm386.exe." D/27406

Building Phobos is actually a bit involved in my experience. I keep the compiler in a different directory so I have to change phobos/win32.mak and phobos/internal/gc to reflect that (the DMD line right at the top). I also need to comment out this bit: minit.obj : internal\minit.asm $(CC) -c internal\minit.asm so make doesn't try to build minit.obj. It tries to built it on my machine even when the file is already present. Then I need to manually compile phobos/internal/gc and *then* compile phobos/win32.mak. I've actually been meaning to ask Walter to edit the scripts so the dm and dmd paths are variables set at the top of the makefile, but I'm sure he has better things to do with his time :) Sean
Aug 23 2004
parent reply J C Calvarese <jcc7 cox.net> writes:
Sean Kelly wrote:
 J C Calvarese wrote:
 
 Dave wrote:

 Where / how would I best go about getting the masm386 and macros.asm 
 that is
 needed to build Phobos on Windows?

 Thanks,

 - Dave

You shouldn't need either of these to build Phobos. Is there a file called "minit.obj" in dmd\src\phobos? If it's missing it might have been deleted accidentily from a make clean. You may need to get another copy from the DMD zip file. Walter wrote: "minit.obj is already supplied for those who do not have masm386.exe." D/27406

Building Phobos is actually a bit involved in my experience. I keep the

I shouldn't have sugarcoated the build process. A while back, I ended up searching the net for masm386.exe. The sad thing is even when I found a file by that name, Phobos still wouldn't build with it. :( Another time, Borland's make was earlier in my path than DM's make was. Apparently, the makefile formats are incompatible. Oops. So you could say that building Phobos been tricky for me, too. It got to the point where I avoid re-building it.
 compiler in a different directory so I have to change phobos/win32.mak 
 and phobos/internal/gc to reflect that (the DMD line right at the top). 
  I also need to comment out this bit:
 
 minit.obj : internal\minit.asm
     $(CC) -c internal\minit.asm
 
 so make doesn't try to build minit.obj.  It tries to built it on my 
 machine even when the file is already present.  Then I need to manually 
 compile phobos/internal/gc and *then* compile phobos/win32.mak.

I'm still fuzzy on how make works. I thought if the file was already there (such as minit.obj) and the source wasn't newer, it wouldn't try to make another. But maybe that doesn't apply if the source isn't there. Anyway, I guess I'm wrong on that. Too bad the makefile is so targeted for the way Walter does stuff. All the rest of us have to do it the hard way. :(
 I've actually been meaning to ask Walter to edit the scripts so the dm 
 and dmd paths are variables set at the top of the makefile, but I'm sure 
 he has better things to do with his time :)

You could try posting an improved version on the newsgroup, but we all know how quickly Walter incorporates other people's code. ;)
 
 
 Sean

-- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Aug 23 2004
next sibling parent reply Dave <Dave_member pathlink.com> writes:
Thanks for the info. and quick replies!

It looks like I already ran into just about everything mentioned below,
including the relative path to Borland make <g>

In the process I did a make clean which removed minit.obj.

I'll just grab it from the zip and I should be good to go.

- Dave

J C Calvarese wrote:

 Sean Kelly wrote:
 J C Calvarese wrote:
 
 Dave wrote:

 Where / how would I best go about getting the masm386 and macros.asm
 that is
 needed to build Phobos on Windows?

 Thanks,

 - Dave

You shouldn't need either of these to build Phobos. Is there a file called "minit.obj" in dmd\src\phobos? If it's missing it might have been deleted accidentily from a make clean. You may need to get another copy from the DMD zip file. Walter wrote: "minit.obj is already supplied for those who do not have masm386.exe." D/27406

Building Phobos is actually a bit involved in my experience. I keep the

I shouldn't have sugarcoated the build process. A while back, I ended up searching the net for masm386.exe. The sad thing is even when I found a file by that name, Phobos still wouldn't build with it. :( Another time, Borland's make was earlier in my path than DM's make was. Apparently, the makefile formats are incompatible. Oops. So you could say that building Phobos been tricky for me, too. It got to the point where I avoid re-building it.
 compiler in a different directory so I have to change phobos/win32.mak
 and phobos/internal/gc to reflect that (the DMD line right at the top).
  I also need to comment out this bit:
 
 minit.obj : internal\minit.asm
     $(CC) -c internal\minit.asm
 
 so make doesn't try to build minit.obj.  It tries to built it on my
 machine even when the file is already present.  Then I need to manually
 compile phobos/internal/gc and *then* compile phobos/win32.mak.

I'm still fuzzy on how make works. I thought if the file was already there (such as minit.obj) and the source wasn't newer, it wouldn't try to make another. But maybe that doesn't apply if the source isn't there. Anyway, I guess I'm wrong on that. Too bad the makefile is so targeted for the way Walter does stuff. All the rest of us have to do it the hard way. :(
 I've actually been meaning to ask Walter to edit the scripts so the dm
 and dmd paths are variables set at the top of the makefile, but I'm sure
 he has better things to do with his time :)

You could try posting an improved version on the newsgroup, but we all know how quickly Walter incorporates other people's code. ;)
 
 
 Sean


Aug 24 2004
parent reply J C Calvarese <jcc7 cox.net> writes:
Dave wrote:
 Thanks for the info. and quick replies!
 
 It looks like I already ran into just about everything mentioned below,
 including the relative path to Borland make <g>
 
 In the process I did a make clean which removed minit.obj.
 
 I'll just grab it from the zip and I should be good to go.
 
 - Dave

Can anyone remind how I'm supposed to get past this error message? Error: don't know how to make 'internal\gc\dmgc.lib' Did screw something up again? -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Aug 28 2004
parent J C Calvarese <jcc7 cox.net> writes:
J C Calvarese wrote:
 Can anyone remind how I'm supposed to get past this error message?
 
 Error: don't know how to make 'internal\gc\dmgc.lib'

Nevermind, I figured it out myself with a hint from digitalmars.D/9898. So if I run the makefile in dmd\src\phobos\internal\gc first, then I could run the makefile in dmd\src\phobos. Whew! -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Aug 28 2004
prev sibling parent reply John Reimer <brk_6502 NOSP_AM.yahoo.com> writes:
Masm used to be free with the windows driver sdk, but I don't know if 
it's still available in that form.  I know you can get a version of masm 
included with masm32 at www.masm32.com, but I'm not sure if that one is 
a valid/legal use of masm (looks okay to me, though).

Otherwise, it would be great if nasm could do the compiling here.  It's 
a pretty mature opensource assembler for x86 CPU's.
Aug 24 2004
parent reply Sean Kelly <sean f4.ca> writes:
John Reimer wrote:
 Masm used to be free with the windows driver sdk, but I don't know if 
 it's still available in that form.  I know you can get a version of masm 
 included with masm32 at www.masm32.com, but I'm not sure if that one is 
 a valid/legal use of masm (looks okay to me, though).

I've got that installed, but I think the file is called ml.exe in that distro. It may work anyway, but I haven't gotten around to experimenting. Sean
Aug 24 2004
parent John Reimer <brk_6502 NOSP_AM.yahoo.com> writes:
Sean Kelly wrote:
 John Reimer wrote:
 
 Masm used to be free with the windows driver sdk, but I don't know if 
 it's still available in that form.  I know you can get a version of 
 masm included with masm32 at www.masm32.com, but I'm not sure if that 
 one is a valid/legal use of masm (looks okay to me, though).

I've got that installed, but I think the file is called ml.exe in that distro. It may work anyway, but I haven't gotten around to experimenting. Sean

You are correct. It's called ml, but running it gives this message: ----- Microsoft (R) Macro Assembler Version 6.14.8444 Copyright (C) Microsoft Corp 1981-1997. All rights reserved. usage: ML [ options ] filelist [ /link linkoptions] Run "ML /help" or "ML /?" for more info ----- I guess it must be an old masm version, but perhaps it's all that's needed to do the job.
Aug 24 2004