FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Any linux users having issues with dmd.conf?

 
Post new topic   Reply to topic     Forum Index -> General
View previous topic :: View next topic  
Author Message
sylverpyro



Joined: 23 May 2006
Posts: 28

PostPosted: Wed Jan 24, 2007 10:55 am    Post subject: Any linux users having issues with dmd.conf? Reply with quote

As of dmd 1.00, it does not seem like dmd is parsing the flags passed to it in dmd.conf correctly anymore.

dmd.conf file:
Code:

[Environment]
DFLAGS=-I/home/sylverpyro/Software/Linux/D/DMD/dmd1.00/dmd/src/phobos
DFLAGS=-L-L/home/sylverpyro/Software/Linux/D/DMD/dmd1.00/dmd/lib


Now I have tired putting this file in all the locations that dmd normally serches (/etc/ , ~/dmd/bin/ , ~/ ) and in all cases, whenever I go to compile something this is what happens:

Code:

~# dmd helloWorld.d
object.d: module object cannot read file 'object.d'


Now, if I pass the option from the dmd.conf file it works correctly
Code:

~# dmd -I/home/sylverpyro/Software/Linux/D/DMD/dmd1.00/dmd/src/phobos helloWorld.d


Doing an strace on the first call results in this: (the relivent part of the trace)
Code:

30153 open("/home/sylverpyro/Software/Linux/D/DMD/dmd1.00/dmd/bin/dmd.conf", O_RDONLY) = 3
30153 fstat64(3, {st_mode=S_IFREG|0644, st_size=158, ...}) = 0
30153 read(3, "\r\n[Environment]\r\n\r\nDFLAGS=\"-I/ho"..., 158) = 158
30153 close(3)                          = 0
30153 unlink("helloWorld.o")            = -1 ENOENT (No such file or directory)
30153 open("helloWorld.d", O_RDONLY)    = 3
30153 fstat64(3, {st_mode=S_IFREG|0644, st_size=72, ...}) = 0
30153 read(3, "import std.stdio;\n\nint main()\n{\n"..., 72) = 72
30153 close(3)                          = 0
30153 stat64("object.di", 0xbfa06b9c)   = -1 ENOENT (No such file or directory)
30153 stat64("object.d", 0xbfa06b9c)    = -1 ENOENT (No such file or directory)
30153 open("object.d", O_RDONLY)        = -1 ENOENT (No such file or directory)


So it is finding the dmd.conf file, opening and reading it, but not correctly using the flags found there.

Has anyone else run into this issue?
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Thu Jan 25, 2007 12:29 pm    Post subject: Reply with quote

It looks like there are windows linefeeds\return whitespaces in the file ("\r\n"). Try cleaning up all line end characters in the dmd.conf file by either using a program that converts win32 linefeeds ("\r\n") to unix liefeeds ("\n"). Or by simply editing the file yourself and removing and reapplying the returns after each line manually.

This could be a result of this file somehow getting edited and saved in a win32 editor at some point before or after packaging.

That's my best guess anyway.
Back to top
View user's profile Send private message
sylverpyro



Joined: 23 May 2006
Posts: 28

PostPosted: Tue Jan 30, 2007 2:39 pm    Post subject: Reply with quote

Thanks! That did the trick. Writing one from scratch with VIM fixed the issue.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> General All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group