Thread overview
compiling dmd on linux
Mar 06, 2009
Georg Wrede
Mar 06, 2009
Georg Wrede
Mar 06, 2009
naryl
Mar 06, 2009
Walter Bright
Mar 07, 2009
naryl
Mar 07, 2009
Walter Bright
Mar 07, 2009
naryl
March 06, 2009
Compiling dmd seems to need some tweaking. I downloaded the *updated* version of D2.026, copied ./dmd into a new directory an ran

$make -f linux.mak all

There was no *rule* for making dchar, so I compiled it manually and moved it with the others. (Not sensible, but at the time I thought that'd be the only problem...)

$ cd root
$ g++ -m32 -Wno-deprecated -D__near= -D__pascal= -fno-exceptions\
   -O2  -D__I 86__=1 -DMARS=1 -DTARGET_LINUX=1 -D_DH -c   dchar.c
$ mv dchar.o ..
$ cd ..
$ make -f linux.mak all


Got some errors, so I started editing linux.mak. Thus far it looks like

$ diff linux.mak.bak linux.mak
218c218
< dchar.o: ../root/dchar.c
---
> dchar.o: $(ROOT)/dchar.c


Then I changed "../mars/mars.h" to "../mars.h" in 2 files:
backend/elfobj.c backend/dwarf.c


Another thing, what about new.h?

I'm on Fedora 10, and I suspect new.h is deprecated.

$ grep -R "new\.h" *
ph.c:#include	<new.h>
tk/mem.c:#include	<new.h>

March 06, 2009
Georg Wrede wrote:
> Compiling dmd seems to need some tweaking. I downloaded the *updated* version of D2.026, copied ./dmd into a new directory an ran

I mean ./src/dmd

> $make -f linux.mak all
> 
> There was no *rule* for making dchar, so I compiled it manually and moved it with the others. (Not sensible, but at the time I thought that'd be the only problem...)
> 
> $ cd root
> $ g++ -m32 -Wno-deprecated -D__near= -D__pascal= -fno-exceptions\
>    -O2  -D__I 86__=1 -DMARS=1 -DTARGET_LINUX=1 -D_DH -c   dchar.c
> $ mv dchar.o ..
> $ cd ..
> $ make -f linux.mak all
> 
> 
> Got some errors, so I started editing linux.mak. Thus far it looks like
> 
> $ diff linux.mak.bak linux.mak
> 218c218
> < dchar.o: ../root/dchar.c
> ---
>  > dchar.o: $(ROOT)/dchar.c
> 
> 
> Then I changed "../mars/mars.h" to "../mars.h" in 2 files:
> backend/elfobj.c backend/dwarf.c
> 
> 
> Another thing, what about new.h?
> 
> I'm on Fedora 10, and I suspect new.h is deprecated.
> 
> $ grep -R "new\.h" *
> ph.c:#include    <new.h>
> tk/mem.c:#include    <new.h>
> 
March 06, 2009
Georg Wrede Wrote:
> Another thing, what about new.h?
> 
> I'm on Fedora 10, and I suspect new.h is deprecated.
> 
> $ grep -R "new\.h" *
> ph.c:#include	<new.h>
> tk/mem.c:#include	<new.h>
> 
Latest Gentoo. new.h is nowhere to be found. IIRC it was part of the libstdc++, which is kept only for compatibility reasons and only in binaries.
March 06, 2009
naryl wrote:
> Georg Wrede Wrote:
>> Another thing, what about new.h?
>> 
>> I'm on Fedora 10, and I suspect new.h is deprecated.
>> 
>> $ grep -R "new\.h" * ph.c:#include	<new.h> tk/mem.c:#include
>> <new.h>
>> 
> Latest Gentoo. new.h is nowhere to be found. IIRC it was part of the
> libstdc++, which is kept only for compatibility reasons and only in
> binaries.

What do they use instead?
March 07, 2009
Walter Bright Wrote:

> naryl wrote:
> > Georg Wrede Wrote:
> >> Another thing, what about new.h?
> >> 
> >> I'm on Fedora 10, and I suspect new.h is deprecated.
> >> 
> >> $ grep -R "new\.h" * ph.c:#include	<new.h> tk/mem.c:#include
> >> <new.h>
> >> 
> > Latest Gentoo. new.h is nowhere to be found. IIRC it was part of the libstdc++, which is kept only for compatibility reasons and only in binaries.
> 
> What do they use instead?

Just replace <new.h> with <new> in addition to Georg's fixes. As a bonus dmd will not depend on ancient libstdc++ anymore.
March 07, 2009
naryl wrote:
> Just replace <new.h> with <new> in addition to Georg's fixes. As a
> bonus dmd will not depend on ancient libstdc++ anymore.

Sounds good.
March 07, 2009
Uploaded source ebuilds for latest dmd: http://www.assembla.com/wiki/show/d-overlay
Here are the patches: http://code.assembla.com/d-overlay/subversion/nodes/dev-lang/dmd/files

Tango trunk compiles with dmd-1.041.