howto recompile dmd 2.053 for CentOS 5.x?

Lars Holowko lars.holowko at gmail.com
Wed May 25 10:15:57 PDT 2011


On Tue, May 24, 2011 at 5:30 PM, Nick Sabalausky <a at a.a> wrote:
>
> The DMD zips contain all the source code. You should be able to do this:
>
> - Unzip dmd.2.053.zip (or whatever other version you want)
> - Go into the 'src/dmd' directory
> - Compile dmd (For me, it's just "make -f linux.mak", but I'm on a 32/32
> system. I don't know if you'd need another switch for 64-bit...But you say
> you've already compiled dmd from git, so you probably already know :) )
> - Copy the resulting executable to the bin directory: cp ./dmd
> ../../linu/bin(32|64)/
>
> That should be all you need. I don't *think* you'd need to to recompile
> druntime or phobos (but then, I'm not an expert on DMD's internals). If you
> do end up needing to recompile them, they're right there in th zip, too,
> 'src/druntime' and 'src/phobos'. If you do, the just remember to copy the
> resulting libs from the src directory to 'linux/lib(32|64)/'.
>
> We do really need a better way to compile DMD/DRuntime/Phobos, though. I've
> been meaning to make unix and windows scripts for it, but haven't gotten to
> it yet.
>
>

Thanks a lot Nick,

Just recompiling dmd alone and use the rest from the zip archive worked.
(had to remove L--no-warn-search-mismatch from dmd.conf which is not
supported by CentOS' ancient ld). I thought I would need to recompile
everything to match compiler and libraries.

And it really doesn't help that the phobos src in the 2.053.zip does not
compile (vs phobos on git does).

When dmd goes in the next beta round this will be my first test:
  Can I compile everything in the zip file...

But it would be great if we could convince Walter to build dmd on an
older distro like CentOS 5 (or even 4?) instead.

Lars


More information about the Digitalmars-d-learn mailing list