digitalmars.D - Followed all installation instructions, still no luck (OS X 10.5)
- Steve Johnson (10/10) Apr 26 2009 I have tried to install DMD for OS X about six different ways, none of w...
- Unknown W. Brackets (13/27) Apr 26 2009 Well iirc, you need to:
- Steve Johnson (3/5) Apr 26 2009 My original post specifically said that I already did that. Also, I have...
- Daniel Keep (6/12) Apr 26 2009 One thing to try is calling the compiler and explicitly passing
- Steve Johnson (1/3) Apr 26 2009 Looks like that fixed it! Do I need to keep dmd.conf in /usr/etc then? P...
- Denis Koroskin (3/7) Apr 26 2009 It looks like dmd can't find dmd.conf and didn't use it at all. I'm not ...
- Jacob Carlborg (2/15) Apr 27 2009 Put it in the same directory as dmd
- Unknown W. Brackets (11/14) Apr 26 2009 It really is /etc not /usr/etc. I said the sudo thing just in case you
I have tried to install DMD for OS X about six different ways, none of which have worked. The installation instructions are confusing and inconsistent. I keep getting this error: "object.d: Error: module object cannot read file 'object.d'" The instructions say to run this: "chmod u+x dmd/osx/bin/{dmd,dumpobj,obj2asm,rdmd}" Except that there is no rdmd file in the osx/bin folder. Later, it says to run this: "/dmd/bin/shell all.sh" Except that there is no /dmd folder, and there is certainly no dmd/bin/shell file for OS X. Other than those things, I followed the instructions to the letter, adding ~/dmd/osx/bin to my PATH, copying dmd.conf to /etc, etc. Anyway, when I run "dmd samples/d/hello.d", I get the error described above. Any ideas?
Apr 26 2009
Well iirc, you need to: sudo cp dmd.conf /etc/dmd.conf Which will (potentially) require editing of dmd.conf for the correct paths. I usually put phobos's src in /usr/src/phobos or .../d/phobos, but I can't remember if it was different on Mac... (some things have /private before them there...) Basically, your error indicates that dmd cannot find the include file object.d, which it always needs. This file should be in dmd/src/druntime/import (2.x) or dmd/src/phobos (1.x) iirc. If you don't want to go installing things, you could also potentially add a -I/that/path flag to dmd. -[Unknown] Steve Johnson wrote:I have tried to install DMD for OS X about six different ways, none of which have worked. The installation instructions are confusing and inconsistent. I keep getting this error: "object.d: Error: module object cannot read file 'object.d'" The instructions say to run this: "chmod u+x dmd/osx/bin/{dmd,dumpobj,obj2asm,rdmd}" Except that there is no rdmd file in the osx/bin folder. Later, it says to run this: "/dmd/bin/shell all.sh" Except that there is no /dmd folder, and there is certainly no dmd/bin/shell file for OS X. Other than those things, I followed the instructions to the letter, adding ~/dmd/osx/bin to my PATH, copying dmd.conf to /etc, etc. Anyway, when I run "dmd samples/d/hello.d", I get the error described above. Any ideas?
Apr 26 2009
Well iirc, you need to: sudo cp dmd.conf /etc/dmd.confMy original post specifically said that I already did that. Also, I have tried editing the paths to no effect. I put the src folder in usr and changed my dmd.conf file to say this: DFLAGS=-I/usr/src/phobos -L-L% P%/../lib I'm on 1.x, btw.
Apr 26 2009
Steve Johnson wrote:One thing to try is calling the compiler and explicitly passing -I/usr/src/phobos (or whatever directory object.d is in) to it. If that works, then DMD cannot, for some reason, find its configuration file. -- DanielWell iirc, you need to: sudo cp dmd.conf /etc/dmd.confMy original post specifically said that I already did that. Also, I have tried editing the paths to no effect. I put the src folder in usr and changed my dmd.conf file to say this: DFLAGS=-I/usr/src/phobos -L-L% P%/../lib I'm on 1.x, btw.
Apr 26 2009
One thing to try is calling the compiler and explicitly passing -I/usr/src/phobos (or whatever directory object.d is in) to it.Looks like that fixed it! Do I need to keep dmd.conf in /usr/etc then? Perhaps some other path?
Apr 26 2009
On Mon, 27 Apr 2009 08:24:38 +0400, Steve Johnson <diordna gmail.com> wrote:It looks like dmd can't find dmd.conf and didn't use it at all. I'm not sure dmd is looking for it in /usr/etc. The correct thing to do would be to find a proper place for dmd.conf and stop passing -I switch directly.One thing to try is calling the compiler and explicitly passing -I/usr/src/phobos (or whatever directory object.d is in) to it.Looks like that fixed it! Do I need to keep dmd.conf in /usr/etc then? Perhaps some other path?
Apr 26 2009
Denis Koroskin wrote:On Mon, 27 Apr 2009 08:24:38 +0400, Steve Johnson <diordna gmail.com> wrote:Put it in the same directory as dmdIt looks like dmd can't find dmd.conf and didn't use it at all. I'm not sure dmd is looking for it in /usr/etc. The correct thing to do would be to find a proper place for dmd.conf and stop passing -I switch directly.One thing to try is calling the compiler and explicitly passing -I/usr/src/phobos (or whatever directory object.d is in) to it.Looks like that fixed it! Do I need to keep dmd.conf in /usr/etc then? Perhaps some other path?
Apr 27 2009
It really is /etc not /usr/etc. I said the sudo thing just in case you hadn't verified it exists in /etc. The following locations are checked on Mac OS X: The current directory (`pwd`) The home directory ($HOME) The directory of argv0 (e.g. /usr/local/bin) /etc/ It will not look in /usr/etc except given the above circumstances (e.g. current dir.) -[Unknown] Steve Johnson wrote:One thing to try is calling the compiler and explicitly passing -I/usr/src/phobos (or whatever directory object.d is in) to it.Looks like that fixed it! Do I need to keep dmd.conf in /usr/etc then? Perhaps some other path?
Apr 26 2009