howto recompile dmd 2.053 for CentOS 5.x?

Nick Sabalausky a at a.a
Tue May 24 17:30:28 PDT 2011


"Lars Holowko" <lars.holowko at gmail.com> wrote in message 
news:mailman.383.1306272115.14074.digitalmars-d-learn at puremagic.com...
> Hi there,
>
> I am trying to get a working dmd 2.053 for CentOS 5.6. The provided
> versions seem to be compiled on something newer:
>
> $ sudo rpm -ivh ~/downloads/dmd-2.053-0.fedora.x86_64.rpm
> error: Failed dependencies:
> gcc(x86-64) is needed by dmd-2.053-0.x86_64
> glibc-devel(x86-32) is needed by dmd-2.053-0.x86_64
> glibc-devel(x86-64) is needed by dmd-2.053-0.x86_64
> libc.so.6(GLIBC_2.11)(64bit) is needed by dmd-2.053-0.x86_64
> libgcc(x86-32) is needed by dmd-2.053-0.x86_64
>
>
> dmd from dmd.2.053.zip
>
> $ linux/bin32/dmd
> linux/bin32/dmd: /lib/libc.so.6: version `GLIBC_2.11' not found
> (required by linux/bin32/dmd)
> $ linux/bin64/dmd
> linux/bin64/dmd: /lib64/libc.so.6: version `GLIBC_2.11' not found
> (required by linux/bin64/dmd)
>
>
> I tried it with:
>
> git clone https://github.com/D-Programming-Language/druntime.git
> git clone https://github.com/D-Programming-Language/phobos.git
> git clone https://github.com/D-Programming-Language/dmd.git
>
> and then compiling in this order dmd, druntime, phobos (make -f
> linxu.mak, make -f posix.mak , make -f posix.mak)
>
> I get everything compiled (setting model to m64/64) and m32/32) but my
> problem is: How do I get it all in an rpm or a similar layout as the
> zip file has (32+64 bit libs, with *.di files, if possible with the
> html docs)
>
> I have seen the stuff on
> https://github.com/D-Programming-Language/installer but rpmsrc is
> still for 2.052 and the stuff under linux/ just uses the *.zip file. I
> could adjust rpmsrc, but I have no ideas which commits were 2.053.
>
> If I just try to recompile the src that is provided in the the zip
> file, I run in the errno not defined bug in phobos/zlib/ (I don't get
> that one when I compile git HEAD).
>
>
> Does anyone have an idea how to get this working without have to hack
> in too many makefiles?
>
> Thanks,
>

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.





More information about the Digitalmars-d-learn mailing list