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

Bud on linux

 
Post new topic   Reply to topic     Forum Index -> Build
View previous topic :: View next topic  
Author Message
andynz



Joined: 05 Nov 2006
Posts: 1
Location: New Zealand

PostPosted: Sun Nov 05, 2006 8:20 pm    Post subject: Bud on linux Reply with quote

dmd on linux seems to have the same behaviour as gdc - it outputs object files in the same directory as it was run from. If you would change this so bud acts according, it would be great! Very Happy
Back to top
View user's profile Send private message AIM Address MSN Messenger
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Sun Nov 05, 2006 11:58 pm    Post subject: Re: Bud on linux Reply with quote

andynz wrote:
dmd on linux seems to have the same behaviour as gdc - it outputs object files in the same directory as it was run from. If you would change this so bud acts according, it would be great! Very Happy


I'm not sure that I understand you.

Are you saying that 'dmd', when not using the -op switch, places all the object files into the current directory? Have you tried using the -op switch?

Are you asking me to change Bud so that when dmd places all the object files into the current directory, that Bud will pass those same files to the linker?

Are you saying that Bud currently doesn't do that? If so, what does Bud actually do instead? You can use the -test switch to see the generated command lines without actually executing them.
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
nascent



Joined: 07 Feb 2006
Posts: 26

PostPosted: Tue Nov 07, 2006 8:17 pm    Post subject: Reply with quote

Well, this is what happens for me, when building FreeUniverse. If I don't give it -op then it places the objects into the current directory. It asks gcc to look in subdirectories for the object files, thus failing. With the -op everything works fine (well on build's end, I think) I end up with a linker error.

Quote:
generating code for function 'draw'
derelict/util/loader.o: In function `_D8derelict4util6loader22Platform_LoadSharedLibFAaZC8derelict4util6loader9SharedLib':
derelict/util/loader.dSad.gnu.linkonce.t_D8derelict4util6loader22Platform_LoadSharedLibFAaZC8derelict4util6loader9SharedLib+0x15): undefined reference to `dlopen'
derelict/util/loader.o: In function `_D8derelict4util6loader24Platform_UnloadSharedLibFC8derelict4util6loader9SharedLibZv':
derelict/util/loader.dSad.gnu.linkonce.t_D8derelict4util6loader24Platform_UnloadSharedLibFC8derelict4util6loader9SharedLibZv+0xf): undefined reference to `dlclose'
derelict/util/loader.o: In function `_D8derelict4util6loader16Platform_GetProcFC8derelict4util6loader9SharedLibAaZPv':
derelict/util/loader.dSad.gnu.linkonce.t_D8derelict4util6loader16Platform_GetProcFC8derelict4util6loader9SharedLibAaZPv+0x19): undefined reference to `dlsym'
collect2: ld returned 1 exit status



Also I have a small 2 file project that I have tried building with build, but I can't seem to get it to pass a debug version to dmd. I.E. build foo.d -debug=3.
_________________
I am myself and that is me.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Fri Nov 24, 2006 1:03 am    Post subject: Reply with quote

"-op" is an absolute necessity for D compilers. It doesn't make sense not to have this option. gdc doesn't have it for some reason unless you use the perl script, gdmd (which bud doesn't support). Thus gdc seems to only work properly if you use some sort of makefile.

Frankly, it doesn't seem like a good idea in the first place to allow all D object files to output in the same directory: in D, modules (and thus there object files) often have the same name in different packages; this means that without the "-op" flag same-named object files are plopped into the same directory and thus overwritten (ruining the link phase). I'm at an absolute loss figureing out why an "-op" flag is not a default feature when compiling dmd code.

Furthermore gdc (on linux) refuses to work with bud still, precisely because gdc lacks a "-op" flag.

Derek, is there a way you could implement a default "-op" functionality for all systems? I don't see how this could be the wrong thing to do. Thanks.

-JJR
Back to top
View user's profile Send private message
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Sun Nov 26, 2006 5:48 pm    Post subject: Reply with quote

JJR wrote:
the perl script, gdmd (which bud doesn't support)

How is this not supported? What do I need to do for gdmd?

JJR wrote:
Derek, is there a way you could implement a default "-op" functionality for all systems? I don't see how this could be the wrong thing to do.

If I can only tell the compiler to create all object files in one directory, I'd have to get Bud to compile each file seperately and move the object file to the right place each time. Unless I'm missing something, that doesn't seem to be much of an improvement.

Can't someone get GDC to support a -op switch instead?
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Build 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