CodeLite fails to build but shell make works fine

CodeLite installation/troubleshooting forum
StevoGTA
CodeLite Curious
Posts: 2
Joined: Wed Oct 28, 2009 3:48 am
Genuine User: Yes
IDE Question: C++
Contact:

CodeLite fails to build but shell make works fine

Post by StevoGTA »

Hello,

I am just getting started using CodeLite. I want to use it to create/debug ARM code for Beagleboard. I have set up my compiler and project settings and looking at the auto-generated makefiles, everything seems great. However, when I build the project in CodeLite, I get the following:

----------Build Started--------
"make" -j 1 -f "Hello_wsp.mk"
----------Building project:[ Hello - Debug ]----------
/bin/sh: arm-none-linux-gnueabi-gcc: not found
arm-none-linux-gnueabi-gcc -c "/home/stevo/Projects/Hello/main.c" -g -o ./Debug/main.o "-I." "-I."
make[1]: *** [Debug/main.o] Error 127
make: *** [All] Error 2
----------Build Ended----------
0 errors, 0 warnings


However, if I go out to the shell and run
"make" -j 1 -f "Hello_wsp.mk"
everything builds just fine.

I see that the internal build is running /bin/sh while I am running bash.

What do I need to do to get CodeLite to build?

-Stevo
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite fails to build but shell make works fine

Post by eranif »

StevoGTA wrote:I see that the internal build is running /bin/sh while I am running bash.
codelite is *not* using bash. It is your 'make' command who does that.

Which toolchain do you have installed? cygwin? MinGW? MinGW + MSYS?

Since your make is using bash, then the answer is simple:
you got two 'make' commands on your systems. One with MSYS (or maybe cygwin) and one without

You need to make sure that codelite picks up the correct toolchain.

The toolchain settings can be changed at: Settings > Build Settings > Compilers (and choose the one you use), the tools under the 'Tools' node of the tree.

Which shell did you use to run the command line by hand? (MSYS or cmd.exe)

Eran
Make sure you have read the HOW TO POST thread
StevoGTA
CodeLite Curious
Posts: 2
Joined: Wed Oct 28, 2009 3:48 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite fails to build but shell make works fine

Post by StevoGTA »

Hi Eran,

Thanks for the response. I'm on Ubuntu Linux 8.04. Your reply triggered some checking. It looks like this is what's going on - when launching CodeLite from the menu, it is launched via /bin/sh. However, if I launch it from a Terminal already running bash (codelite&), then everything works fine.

-Stevo
Post Reply