digitalmars.D - Output of dmd and dmd.conf location
- Moritz Warning (7/7) Mar 24 2010 Can dmd output the location of it's binary and the dmd.conf it uses?
- Andrei Alexandrescu (4/11) Mar 24 2010 You mean in -v builds? I also think that would be very useful. Also
- Moritz Warning (15/30) Mar 24 2010 dmd -v doesn't outputs the absolute path of the dmd binary.
- Moritz Warning (8/8) Mar 24 2010 Smth. like this would be helpful.
- Walter Bright (2/3) Mar 24 2010 I like it. It's a good idea.
- Moritz Warning (2/6) Mar 24 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4002
- Andrei Alexandrescu (7/37) Mar 24 2010 Absolutely. I never know the full logic by which dmd.conf is found, it's...
- Moritz Warning (8/17) Mar 24 2010 I wouldn't know how to do that on Windows.
- Andrei Alexandrescu (4/21) Mar 24 2010 Yes. If there's a module declaration output that, otherwise output the
- Moritz Warning (3/27) Mar 24 2010 I would suggest to put it in a separate ticket.
- Walter Bright (14/15) Mar 24 2010 From dmd compiler source inifile.c:
- Andrei Alexandrescu (5/22) Mar 24 2010 I know. What I meant to say is that I need to go look it up whenever I
- Michel Fortin (9/10) Mar 24 2010 Not if you are calling dmd from a symbolic link; in this case, it'll be
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.
Mar 24 2010
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
Mar 24 2010
On Wed, 24 Mar 2010 13:55:12 -0500, Andrei Alexandrescu wrote:On 03/24/2010 01:33 PM, Moritz Warning wrote: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..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
Mar 24 2010
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'
Mar 24 2010
Moritz Warning wrote:Smth. like this would be helpful.I like it. It's a good idea.
Mar 24 2010
On Wed, 24 Mar 2010 13:34:05 -0700, Walter Bright wrote:Moritz Warning wrote:http://d.puremagic.com/issues/show_bug.cgi?id=4002Smth. like this would be helpful.I like it. It's a good idea.
Mar 24 2010
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. But the name of the module being compiled would help. AndreiOn 03/24/2010 01:33 PM, Moritz Warning wrote: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..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
Mar 24 2010
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.
Mar 24 2010
On 03/24/2010 04:35 PM, Moritz Warning wrote:On Wed, 24 Mar 2010 16:06:02 -0500, Andrei Alexandrescu wrote:Yes. If there's a module declaration output that, otherwise output the module name as inferred from the file name. AndreiOn 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.
Mar 24 2010
On Wed, 24 Mar 2010 16:40:51 -0500, Andrei Alexandrescu wrote:On 03/24/2010 04:35 PM, Moritz Warning wrote:I would suggest to put it in a separate ticket. Cupcakes are easier to sell than cake. :>On Wed, 24 Mar 2010 16:06:02 -0500, Andrei Alexandrescu wrote:Yes. If there's a module declaration output that, otherwise output the module name as inferred from the file name. AndreiOn 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.
Mar 24 2010
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/
Mar 24 2010
On 03/24/2010 04:42 PM, Walter Bright wrote:Andrei Alexandrescu wrote: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. AndreiI 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/
Mar 24 2010
On 2010-03-24 17:42:49 -0400, Walter Bright <newshound1 digitalmars.com> said:argv0 is where the dmd binary is.Not if you are calling dmd from a symbolic link; in this case, it'll be where the symbolic link is. That's why the D for Xcode installer puts a trampoline program to call dmd in /usr/local/bin/ instead of a symbolic link. The trampoline can adjust argv0 correctly. -- Michel Fortin michel.fortin michelf.com http://michelf.com/
Mar 24 2010