View mode: basic / threaded / horizontal-split · Log in · Help
June 24, 2010
guide for building DMD/Phobos from SVN (on Linux)?
Hi folks,

Is there a guide somewhere on building DMD/Phobos from SVN? I wanted
to try my hand at fixing a few bugs, but I suspect the environment I
built is broken.

On a Linux box, I checked out dmd, druntime and phobos from SVN;
twiddled the makefiles to fix paths; built them in that order; and set
up my dmd.conf. Everything seems to work okay at first: a simple
hello-world program compiles and executes properly. But if I compile
it with '-unittest', I get a series of messages like this:

/home/graham/dmd/druntime/trunk/src/core/thread.d(758): volatile 
statements deprecated; used synchronized statements instead

Have I done something wrong? Any general pointers or advice?

Thanks,
Graham
June 24, 2010
Re: guide for building DMD/Phobos from SVN (on Linux)?
The weird thing about building phobos is that it depends on druntime being accessible.  I publish everything to /usr/local/include/d and /usr/local/lib.  I have a script at the top-level of each SVN tree to take care of everything for me.  Hopefully they'll clue you into what you're missing.


Here's the druntime one:


#!/bin/bash
sudo rm -f  /usr/local/include/d/object.*
sudo rm -fr /usr/local/include/d/core
pushd ./trunk
make -fposix.mak
popd
sudo mkdir -p /usr/local/include/d/core
sudo cp -f  ./trunk/import/object.*   /usr/local/include/d/.
sudo cp -fr ./trunk/import/core/*     /usr/local/include/d/core/.
sudo cp -f  ./trunk/lib/libdruntime.a /usr/local/lib/.


And here's the phobos one:


#!/bin/bash
sudo rm -fr /usr/local/include/d/std
sudo rm -fr /usr/local/include/d/etc
pushd ./trunk/phobos
make -flinux.mak DRUNTIME_PATH=/usr/local
sudo rm -f  /usr/local/lib/libphobos2.a
popd
sudo mkdir /usr/local/include/d/std
sudo mkdir /usr/local/include/d/etc
sudo cp -fr ./trunk/phobos/std/* /usr/local/include/d/std/.
sudo cp -fr ./trunk/phobos/etc/* /usr/local/include/d/etc/.
sudo cp -f  ./trunk/phobos/generated/posix/release/libphobos2.a /usr/local/lib/.


My dmd.conf looks like so:


[Environment]
DFLAGS=-I/usr/local/include/d -L-L/usr/local/lib
June 24, 2010
Re: guide for building DMD/Phobos from SVN (on Linux)?
Hi Sean,

On Thu, 24 Jun 2010 15:13:38 -0400, Sean Kelly wrote:

> Here's the druntime one:
> 
> 
> #!/bin/bash
> sudo rm -f  /usr/local/include/d/object.* sudo rm -fr
> /usr/local/include/d/core pushd ./trunk
> make -fposix.mak
> popd
> sudo mkdir -p /usr/local/include/d/core sudo cp -f 
> ./trunk/import/object.*   /usr/local/include/d/. sudo cp -fr
> ./trunk/import/core/*     /usr/local/include/d/core/. sudo cp -f 
> ./trunk/lib/libdruntime.a /usr/local/lib/.
> 
> 
> And here's the phobos one:
> 
> 
> #!/bin/bash
> sudo rm -fr /usr/local/include/d/std
> sudo rm -fr /usr/local/include/d/etc
> pushd ./trunk/phobos
> make -flinux.mak DRUNTIME_PATH=/usr/local sudo rm -f 
> /usr/local/lib/libphobos2.a popd
> sudo mkdir /usr/local/include/d/std
> sudo mkdir /usr/local/include/d/etc
> sudo cp -fr ./trunk/phobos/std/* /usr/local/include/d/std/. sudo cp -fr
> ./trunk/phobos/etc/* /usr/local/include/d/etc/. sudo cp -f 
> ./trunk/phobos/generated/posix/release/libphobos2.a /usr/local/lib/.
> 
> 
> My dmd.conf looks like so:
> 
> 
> [Environment]
> DFLAGS=-I/usr/local/include/d -L-L/usr/local/lib
>

Thank you! I haven't figured out what I was doing wrong yet, but using
your build-scripts did the trick: my -unittest error is no more.

Much appreciated!

Graham
Top | Discussion index | About this forum | D home