www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - finding dmd.conf

reply Lutger <lutger.blijdestijn gmail.com> writes:
I'm having some trouble with dmd.conf. I set up a (soft) symbolic link to 
the dmdxxxx/bin path version I want to use, but dmd can't find dmd.conf:

$> which dmd
/home/lutger/code/bin/dmd/bin/dmd
$> dmd main.d
object.d: module object cannot read file 'object.d'
$> /home/lutger/code/bin/dmd/bin/dmd main.d
$>

Fully specifying the path works, and putting dmd.conf in /etc also works, 
but is less than ideal. This is in bash (Konsole) on OpenSuse 11.1.

Anybody an idea what I am doing wrong?
Feb 27 2009
next sibling parent reply Moritz Warning <moritzwarning web.de> writes:
On Fri, 27 Feb 2009 15:54:46 +0100, Lutger wrote:

 I'm having some trouble with dmd.conf. I set up a (soft) symbolic link
 to the dmdxxxx/bin path version I want to use, but dmd can't find
 dmd.conf:
 
 $> which dmd
 /home/lutger/code/bin/dmd/bin/dmd
 $> dmd main.d
 object.d: module object cannot read file 'object.d' $>
 /home/lutger/code/bin/dmd/bin/dmd main.d $>
 
 Fully specifying the path works, and putting dmd.conf in /etc also
 works, but is less than ideal. This is in bash (Konsole) on OpenSuse
 11.1.
 
 Anybody an idea what I am doing wrong?
Have you tried to add your dmd/bin to your PATH environment variable?
Feb 27 2009
parent Lutger <lutger.blijdestijn gmail.com> writes:
Moritz Warning wrote:
...
 Have you tried to add your dmd/bin to your PATH environment variable?
Yes it's there and dmd got properly picked up by the 'which' command.
Feb 27 2009
prev sibling next sibling parent reply Jesse Phillips <jessekphillips gmail.com> writes:
On Fri, 27 Feb 2009 15:54:46 +0100, Lutger wrote:

 I'm having some trouble with dmd.conf. I set up a (soft) symbolic link
 to the dmdxxxx/bin path version I want to use, but dmd can't find
 dmd.conf:
 
 $> which dmd
 /home/lutger/code/bin/dmd/bin/dmd
 $> dmd main.d
 object.d: module object cannot read file 'object.d' $>
 /home/lutger/code/bin/dmd/bin/dmd main.d $>
 
 Fully specifying the path works, and putting dmd.conf in /etc also
 works, but is less than ideal. This is in bash (Konsole) on OpenSuse
 11.1.
 
 Anybody an idea what I am doing wrong?
I'm not sure what you mean by "symbolic link to the dmdxxxx/bin path version I want..." DMD looks in only 2 places for dmd.conf, the location of the dmd executable, in your case /home/lutger/code/bin/dmd/bin/, and /etc/
Feb 27 2009
parent reply Lutger <lutger.blijdestijn gmail.com> writes:
Jesse Phillips wrote:

 On Fri, 27 Feb 2009 15:54:46 +0100, Lutger wrote:
 
 I'm having some trouble with dmd.conf. I set up a (soft) symbolic link
 to the dmdxxxx/bin path version I want to use, but dmd can't find
 dmd.conf:
 
 $> which dmd
 /home/lutger/code/bin/dmd/bin/dmd
 $> dmd main.d
 object.d: module object cannot read file 'object.d' $>
 /home/lutger/code/bin/dmd/bin/dmd main.d $>
 
 Fully specifying the path works, and putting dmd.conf in /etc also
 works, but is less than ideal. This is in bash (Konsole) on OpenSuse
 11.1.
 
 Anybody an idea what I am doing wrong?
I'm not sure what you mean by "symbolic link to the dmdxxxx/bin path version I want..." DMD looks in only 2 places for dmd.conf, the location of the dmd executable, in your case /home/lutger/code/bin/dmd/bin/, and /etc/
It also looks in HOME and the current directory. I should have explained clearer. I have setup 3 installations of D that I use: ~/code/bin/dmd1033/bin ~/code/bin/dmd1037/bin ~/code/bin/dmd2025/bin Then I make a symbolic link to one a these paths: ~/code/bin/dmd/bin The symbolic link is in PATH. This way I can easily switch between whatever d executables, libraries and so forth as required while keeping them seperate. The problem I'm experiencing is that DMD can find dmd.conf in it's own path only when I fully qualify the dmd command like this: ~/code/bin/dmd/bin/dmd main.d Putting dmd.conf in /etc works though, and putting dmd.conf in the current path (of the source I'm building) also works. Furthermore for D1 I'm using dsss in the same way and this doesn't cause any problems. I thought perhaps some other dmd got picked up, but 'which dmd' picks out the right path for dmd, if this command is reliable?
Feb 28 2009
parent Georg Wrede <georg.wrede iki.fi> writes:
Lutger wrote:
 Jesse Phillips wrote:
 
 On Fri, 27 Feb 2009 15:54:46 +0100, Lutger wrote:

 I'm having some trouble with dmd.conf. I set up a (soft) symbolic link
 to the dmdxxxx/bin path version I want to use, but dmd can't find
 dmd.conf:

 $> which dmd
 /home/lutger/code/bin/dmd/bin/dmd
 $> dmd main.d
 object.d: module object cannot read file 'object.d' $>
 /home/lutger/code/bin/dmd/bin/dmd main.d $>

 Fully specifying the path works, and putting dmd.conf in /etc also
 works, but is less than ideal. This is in bash (Konsole) on OpenSuse
 11.1.

 Anybody an idea what I am doing wrong?
I'm not sure what you mean by "symbolic link to the dmdxxxx/bin path version I want..." DMD looks in only 2 places for dmd.conf, the location of the dmd executable, in your case /home/lutger/code/bin/dmd/bin/, and /etc/
It also looks in HOME and the current directory. I should have explained clearer. I have setup 3 installations of D that I use: ~/code/bin/dmd1033/bin ~/code/bin/dmd1037/bin ~/code/bin/dmd2025/bin Then I make a symbolic link to one a these paths: ~/code/bin/dmd/bin
What you could do is, undo what you've done so far, then make a symbolic link like this: cd ~/code/bin ln -s dmd1033 dmd then put ~/code/bin/dmd/bin into your PATH. Now it should work. Any time you want to switch version, just do cd ~/code/bin rm dmd ln -s dmd2025 dmd and now you're using dmd v2025. I just tested this with dmd1040 and dmd2025, so it works.
 The symbolic link is in PATH. This way I can easily switch between whatever 
 d executables, libraries and so forth as required while keeping them 
 seperate. 
 
 The problem I'm experiencing is that DMD can find dmd.conf in it's own path 
 only when I fully qualify the dmd command like this: ~/code/bin/dmd/bin/dmd 
 main.d
 Putting dmd.conf in /etc works though, and putting dmd.conf in the current 
 path (of the source I'm building) also works. 
 
 Furthermore for D1 I'm using dsss in the same way and this doesn't cause any 
 problems. I thought perhaps some other dmd got picked up, but 'which dmd' 
 picks out the right path for dmd, if this command is reliable?
 
Mar 01 2009
prev sibling parent Lutger <lutger.blijdestijn gmail.com> writes:
Can't believe it's happening again, I found the problem after posting.

Due to a kernel update mess I found out my Suse mounted some partitions in 
fstab as 'user' by default, which means noexec apparently . In the funky way 
I separated my drives and partitions this caused some commands to be 
unexecutable. 

Sorry for the noise. 
Feb 28 2009