Thread overview | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
March 24, 2010 Output of dmd and dmd.conf location | ||||
---|---|---|---|---|
| ||||
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. |
March 24, 2010 Re: Output of dmd and dmd.conf location | ||||
---|---|---|---|---|
| ||||
Posted in reply to Moritz Warning | 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
|
March 24, 2010 Re: Output of dmd and dmd.conf location | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | 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..
|
March 24, 2010 Re: Output of dmd and dmd.conf location | ||||
---|---|---|---|---|
| ||||
Posted in reply to Moritz Warning | Smth. like this would be helpful. dmd main.d -v Binary: /usr/bin/dmd [1.057] Config: /etc/dmd.conf parse main importall main import object (object.d) object.d: Error: module object cannot read file 'object.d' |
March 24, 2010 Re: Output of dmd and dmd.conf location | ||||
---|---|---|---|---|
| ||||
Posted in reply to Moritz Warning | Moritz Warning wrote:
> Smth. like this would be helpful.
I like it. It's a good idea.
|
March 24, 2010 Re: Output of dmd and dmd.conf location | ||||
---|---|---|---|---|
| ||||
Posted in reply to Moritz Warning | 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
|
March 24, 2010 Re: Output of dmd and dmd.conf location | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Wed, 24 Mar 2010 16:06:02 -0500, Andrei Alexandrescu wrote: > On 03/24/2010 02:11 PM, Moritz Warning wrote: >> On Wed, 24 Mar 2010 13:55:12 -0500, Andrei Alexandrescu wrote: >> [..] > > 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. I wouldn't know how to do that on Windows. Linux beginners might have the problem on Linux. - That one additional line wouldn't hurt. > But the name of the module being compiled would help. I am not sure what you mean. Do you mean "dmd -v" should write out the module name that is compiled at that moment? Sounds good. |
March 24, 2010 Re: Output of dmd and dmd.conf location | ||||
---|---|---|---|---|
| ||||
Posted in reply to Moritz Warning | On 03/24/2010 04:35 PM, Moritz Warning wrote:
> On Wed, 24 Mar 2010 16:06:02 -0500, Andrei Alexandrescu wrote:
>
>> On 03/24/2010 02:11 PM, Moritz Warning wrote:
>>> On Wed, 24 Mar 2010 13:55:12 -0500, Andrei Alexandrescu wrote:
>>>
> [..]
>>
>> 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.
> I wouldn't know how to do that on Windows.
> Linux beginners might have the problem on Linux.
> - That one additional line wouldn't hurt.
>
>> But the name of the module being compiled would help.
> I am not sure what you mean.
> Do you mean "dmd -v" should write out the module name that is compiled at
> that moment? Sounds good.
Yes. If there's a module declaration output that, otherwise output the module name as inferred from the file name.
Andrei
|
March 24, 2010 Re: Output of dmd and dmd.conf location | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | Andrei Alexandrescu wrote: > I never know the full logic by which dmd.conf is found, it's quite convoluted. From dmd compiler source inifile.c: /* Look for inifile in the following sequence of places: * o current directory * o home directory * o directory off of argv0 * o /etc/ */ argv0 is where the dmd binary is. From the documentation http://www.digitalmars.com/d/2.0/dmd-linux.html#dmd_conf 1.current working directory 2.directory specified by the HOME environment variable 3.directory dmd resides in 4./etc/ |
March 24, 2010 Re: Output of dmd and dmd.conf location | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 03/24/2010 04:42 PM, Walter Bright wrote:
> Andrei Alexandrescu wrote:
>> I never know the full logic by which dmd.conf is found, it's quite
>> convoluted.
>
> From dmd compiler source inifile.c:
>
> /* Look for inifile in the following sequence of places:
> * o current directory
> * o home directory
> * o directory off of argv0
> * o /etc/
> */
>
> argv0 is where the dmd binary is.
>
> From the documentation
> http://www.digitalmars.com/d/2.0/dmd-linux.html#dmd_conf
>
> 1.current working directory
> 2.directory specified by the HOME environment variable
> 3.directory dmd resides in
> 4./etc/
I know. What I meant to say is that I need to go look it up whenever I need to figure something out. It would be much simpler to just issue dmd -v and see the thing at work in my environment.
Andrei
|
Copyright © 1999-2021 by the D Language Foundation