Output of dmd and dmd.conf location

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Mar 24 14:06:02 PDT 2010


On 03/24/2010 02:11 PM, Moritz Warning wrote:
> On Wed, 24 Mar 2010 13:55:12 -0500, Andrei Alexandrescu wrote:
>
>> On 03/24/2010 01:33 PM, Moritz Warning wrote:
>>> Can dmd output the location of it's binary and the dmd.conf it uses? It
>>> would be really helpful to solve a lot of problems and confusion that
>>> arises in #D.
>>>
>>> People use different installers, packages and what else not when some
>>> installation doesn't work right away. Usually it makes every other
>>> attempts to find the problem a nightmare.
>>>
>>> Thanks.
>>
>> You mean in -v builds? I also think that would be very useful. Also
>> having the module name, whether express or deduced, would be great.
>>
>> Andrei
>
> dmd -v doesn't outputs the absolute path of the dmd binary.
> Information about the path that must be used in dmd.conf
> needs some deduction from the dmd -v output (when the dmd.conf is
> working).
>
> But when there is a wrong dmd.conf (with wrong paths inside) picked up by
> dmd, then there is no information at all:
>
> dmd main.d -v
> parse     main
> importall main
> import    object        (object.d)
> object.d: Error: module object cannot read file 'object.d'
>
> Having the absolute path to dmd and dmd.conf would help a lot at this
> point.
> I've seen countless people struggling and also failing with this problem..

Absolutely. I never know the full logic by which dmd.conf is found, it's 
quite convoluted. You may want to submit a bugzilla enhancement request. 
I don't think the dmd binary is essential, after all you launched it so 
you can do a which dmd or whatever. But the name of the module being 
compiled would help.

Andrei



More information about the Digitalmars-d mailing list