On Friday, February 18, 2011 12:29:40 Kai Meyer wrote:
> == Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article
> 
> > On Friday, February 18, 2011 10:12:09 Kai Meyer wrote:
> > > Great news! Worked like a champ. Is there documentation somewhere that
> > > I missed? I would love to be able to answer these questions on my own.
> > > I've been stumped on this one for a week :(
> > 
> > That should be in the dmd.conf in dmd.2.052.zip. If you're using an old
> > dmd.conf, that would be the problem. Actually, I wouldn't have expected
> > and old dmd.conf to work at all, since the directory structure for the
> > lib folder(s) was changed due to the addition of 64-bit. So, I don't
> > know what the deal with your setup is. Regardless, make sure that your
> > current dmd.conf is either the most up-to-date on or at least based on
> > it. Otherwise, you're going to be running into issues.
> > - Jonathan M Davis
> 
> Ok, my dmd.conf that came with the download does not have it in there. The
> package doesn't claim ownership to /etc/dmd.conf. I removed the rpm
> package, deleted the old dmd.conf, and installed the rpm again, but the
> dmd.conf that was generated is exactly the same:
> [kai@worky ~]$ cat /etc/dmd.conf
> 
> [Environment]
> 
> DFLAGS= -I/usr/include/d/dmd/phobos -I/usr/include/d/dmd/druntime/import
> -L-L/usr/lib
> 
> 
> Should I just simply add "-L-lrt" to the dmd.conf for now? Or just put it
> in my make file?
> 
> Why does the rpm not claim ownership of the config file?:
> [kai@worky ~]$ rpm -qf /etc/dmd.conf
> file /etc/dmd.conf is not owned by any package
> [kai@worky ~]$ rpm -ql dmd | grep dmd.conf
> /usr/share/man/man5/dmd.conf.5.gz
> 
> Thanks for the fast replies!

If you just use the zip file, you're fine. I don't know what the state of the 
rpm 
is. I just always use the zip file. It's nice and self contained. All you have 
to 
do is make sure that /path/to/dmd2/linux/bin is on your PATH.

The current dmd.conf should look like this:

=======
[Environment]

DFLAGS=-I%@P%/../../src/phobos -I%@P%/../../src/druntime/import -L-
L%@P%/../lib32 -L-L%@P%/../lib64 -L--no-warn-search-mismatch -L--export-dynamic 
-L-lrt
=======

If the pieces get moved elsewhere (such as installing libphobos2.a in a 
/usr/lib 
or something similar), then the paths would have to be updated though. Also, 
according to the online docs:

====
dmd will look for the initialization file dmd.conf in the following sequence of 
directories:
1. current working directory
2. directory specified by the HOME environment variable
3. directory dmd resides in
4. /etc/
======

So, maybe you need to just put the correct dmd.conf in one of the first three 
spots. Or you could just edit /etc/dmd.conf. I don't know what exactly the rpm 
does, so I don't know what it does with dmd.conf. But you have several options. 
Really, -L-lrt _should_ be in dmd.conf since core.time and std.datetime require 
it, but ultimately what matters is that it be in your DFLAGS so that dmd uses 
it 
when compiling.

- Jonathan M Davis

Reply via email to