Bug 3457 – rdmd fails silently in a particular setup where the compiler is not the expected
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
Linux
Creation time
2009-10-30T18:05:00Z
Last change time
2014-04-18T09:12:02Z
Assigned to
andrei
Creator
leandro.lucarella
Comments
Comment #0 by leandro.lucarella — 2009-10-30T18:05:26Z
I have a set up with both DMD1 and DMD2. I call the binary for DMD1 dmd and the binary for DMD2 dmd2. When running rdmd2 (rdmd for DMD2 ;) it returns 1 to the OS and nothing happens. The problem seems to be rdmd2 is trying to use dmd as the compiler and it fails to include some D2 specific file:
$ rdmd2 --chatty ./buildit.d
chdir '.' && dmd -v -o- './buildit.d' >./buildit.d.deps
$ echo $?
1
$ dmd -v -o- ./buildit.d
parse buildit
semantic buildit
import object (/home/luca/tesis/dmd/linux/bin/../../include/object.di)
import std.path (std/path.d)
./buildit.d(3): module path cannot read file 'std/path.d'
I know this is a weird setup, and that it's OK that rdmd fails, but it would be helpful to have some indication about what happened, like:
Failed to execute: dmd -v -o- './buildit.d' >./buildit.d.deps
The weird thing is when using dmd2, if the compilation fails, rdmd shows the dmd error messages perfectly, so I don't know why it's eating the error messages using DMD1 as the compiler.
Comment #1 by andrei — 2011-06-05T08:56:50Z
This is a bug in dmd; it doesn't print that particular error message to stderr, it prints it to stdout. I submitted a bug report to dmd and wrote a workaround in rdmd.