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

Linux Issues with Build 3.00

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



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Tue Jun 06, 2006 10:49 am    Post subject: Linux Issues with Build 3.00 Reply with quote

On Linux, I type in:

Quote:
build foo.d


and get this error:

Quote:
Error: build:Cannot find application '/home/john/bin/gcc' to run


It shouldn't be looking in my local shell path. Or, I should say, build shouldn't be looking only in my local shell path. It should be looking in the system path.

If I type gcc on the command line, gcc is completely accessible... just not through build.

Can you look into this?

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



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

PostPosted: Tue Jun 06, 2006 5:44 pm    Post subject: Re: Linux Issues with Build 3.00 Reply with quote

JJR wrote:
On Linux, I type in:

Quote:
build foo.d


and get this error:

Quote:
Error: build:Cannot find application '/home/john/bin/gcc' to run


It shouldn't be looking in my local shell path. Or, I should say, build shouldn't be looking only in my local shell path. It should be looking in the system path.

If I type gcc on the command line, gcc is completely accessible... just not through build.

Can you look into this?

-JJR

I need more information.

I'm assuming you have not made any changes to either dmd.conf or build.cfg, and that 'gcc' is being used as your linker.

I'm guessing you have a LINKCMD= line in your dmd.conf file. Can you show me what that looks like?

If you want 'gcc' to be found on the normal $PATH list, your LINKCMD in the dmd.conf file should just look like ...
Code:

LINKCMD=gcc


Build does not scan the path looking for 'gcc'. It just uses whatever you supply in the LINKCMD. If you don't have a LINKCMD it just runs 'gcc' and not '$HOME/gcc'
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Tue Jun 06, 2006 10:41 pm    Post subject: Reply with quote

LINKCMD?

I didn't know about that until you mentioned it... nor do I use it. My dmd.conf contains no LINKCMD line.

The only thing I've done is add a path to my local binaries to the ~/.bashrc file so that I can run local binaries automatically:

Quote:
PATH=~/bin:"${PATH}"


This makes it easy for me to add local binaries to my home/john/bin directory and run them from anywhere else (in this case, I stick links to the dmd executables there, including build).

But I guess that shouldn't affect anything in this case?

gcc is a system-wide tool available to all users in my linux machines, so I don't know why build does this. I can use gcc via command-line easy enough. It just seems that build can't access it the same way (which doesn't make sense)? If build just runs gcc (since I don't have a LINKCMD), why is it not working in my case?

I tried adding a LINKCMD=gcc (since you mentioned it) and this is what happened:

Quote:
Error: build:Cannot find application '/=gcc' to run


If build tries to just run gcc either way it has troubles. Maybe it's not calling the exec process right? As I said before gcc runs fine from the commandline, just not from build.

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



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Fri Jun 09, 2006 11:40 am    Post subject: Reply with quote

Build 3.01 can now see gcc properly, thanks!

But it seems to pass the object files incorrectly now.

When I type "build @full.brf" on the command line (to build build itself in the Source directory), I get this:

Code:
gcc: build.o,build_bn.o,source.o,source_bn.o,uti: No such file or directory
gcc: /str.o,util/str_bn.o,util/linetoken.o,util/linetoken_bn.o,util/booltype.o,util/fdt.o,util/fdt_bn.o,util/pathex.o,util/pathex_bn.o,util/fileex.o,util/fileex_bn.o,util/macro.o,-ofbuild,-lc,-lphobos,-lm,: No such file or directory
gcc: no input files


I haven't navigated the source, but I imagine it's just a little fix somewhere.

Thanks for all your hard work.

-JJR
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