Bug 615 – dmd does not properly read dmd.conf with Unix line-ending characters
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-11-27T17:34:00Z
Last change time
2014-02-15T13:20:23Z
Assigned to
bugzilla
Creator
rael
Comments
Comment #0 by rael — 2006-11-27T17:34:41Z
Using dmd.conf edited on linux, dmd does not appear to grok it. If I copy a dmd.conf edited on Windows, it parses it properly. The two files differ in line endings only. If I had to guess, it is an error in inifile.c, in the method inifile(), somewhere around line 272 or below.
To reproduce, I compiled a simple program as follows:
% dmd hello.d
using the linux-edited dmd.conf file:
[Environment]
DFLAGS=-I/opt/dmd/src/phobos
And this failed. Using an explicit command-line argument:
% dmd -I/opt/dmd/src/phobos hello.d
works. If I use the Windows-edited dmd.conf file, it works either way.
Comment #1 by bugzilla — 2006-11-30T02:00:38Z
I cannot reproduce this.
Comment #2 by rael — 2006-12-04T09:05:16Z
I discovered the issue after using strace under linux to track files opened during execution of the dmd compiler. It turns out that I had copied the original dmd.conf file to my home directory somewhere along the way and dmd was using that instead of the one in /etc.
I don't know if it would be worth it, but perhaps it might be useful to have the '-v' option to dmd cause dmd to emit information about the configuration file it thinks it is reading.