On Tuesday, September 25, 2018 4:34:17 AM MDT aliak via Digitalmars-d wrote: > Alo, > > I'm wondering what’s the deal with dmd.conf and what’s the > correct way to handle it with dmd installations. > > Scenario: `brew install dmd` puts dmd in `/usr/local/bin/dmd` > (symlink) and sets the `SYSCONFDIR` in its build config so > `dmd.conf` is in `/usr/local/etc/dmd.conf`. > > AFAICT: that seems correct. Is it? > > The problem comes with tools like digger. Which seems to be part > of DMD’s PR process as D bot seems to love it :) so I guess it's > officially supported? - plus it seems super convenient for dmd > development. > > But anyway, it’s broken on the mac if you use brew (and brew is > [probably?] defacto). There is a workaround when running `digger > build` but it’s not nice, and you’d never be able to guess it, > and it’s error prone [0]. > > When you do `digger install` it seems to not “install” a > `dmd.conf` but it does install the `dmd` binary in > `/usr/local/bin/dmd` - but that wasn’t built with `SYSCONFDIR` so > it doesn’t find `/usr/local/etc/dmd.conf` either, but even if it > did, that’s the wrong `dmd.conf` (i.e. not the one that the build > was based on - so would it even point to the right env?). > > So basically, is dmd.conf supposed to go along with an ad hoc > installation of dmd? > > And, is dmd.conf necessary or can I safely ignore its existence? > (it seems like maybe dub depends on it though so maybe not). > > Cheers, > - Ali > > [0]: https://github.com/CyberShadow/Digger/issues/74
Yes. You want dmd.conf, or certain paths won't be set correctly (like where to find Phobos). Personally, I'd strongly suggest against having multiple copies of dmd installed at the same time. It just sounds like a recipe for disaster. Regardless, here's the description for how dmd finds dmd.conf: https://dlang.org/dmd-linux.html#dmd-conf - Jonathan M Davis