Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to crosscompile Newlib library for ARM devices using the arm-none-eabi-XXX from CodeSourcery but i am having some issues. When running ./configure and/or make its showing me messages that arm-none-eabi-cc cannot be found. My path is set up correctly. I can call arm-none-eabi-xxx from terminal as root and as user.

The command:

sudo ./configure --target=arm-none-eabi  --prefix=/usr/local/arm-eabi/bin --disable-newlib-supplied-syscalls


checking for arm-none-eabi-cc... no
checking for arm-none-eabi-gcc... no
checking for arm-none-eabi-c++... no
checking for arm-none-eabi-g++... no

sudo make:
/bin/sh: arm-none-eabi-cc: command not found

But path set up correctly...

kris@caspinol /usr/local/newlib $ arm
arm2hpdl                 arm-none-eabi-c++        arm-none-eabi-elfedit    arm-none-eabi-gcov       arm-none-eabi-ld         arm-none-eabi-ranlib     arm-none-eabi-sprite     
arm-none-eabi-addr2line  arm-none-eabi-cc         arm-none-eabi-g++        arm-none-eabi-gdb        arm-none-eabi-nm         arm-none-eabi-readelf    arm-none-eabi-strings    
arm-none-eabi-ar         arm-none-eabi-c++filt    arm-none-eabi-gcc        arm-none-eabi-gdbtui     arm-none-eabi-objcopy    arm-none-eabi-run        arm-none-eabi-strip      
arm-none-eabi-as         arm-none-eabi-cpp        arm-none-eabi-gcc-4.6.3  arm-none-eabi-gprof      arm-none-eabi-objdump    arm-none-eabi-size       
kris@caspinol /usr/local/newlib $ arm

Am I missing some arguments during configure stage??

Any help greatly appreciated.

Thanks in advance

share|improve this question

I'm very sorry for being this late. I just experienced this problem, and I tried solving it in all the ways people suggested on the net (hence I came across this question). The problem seems to be that 'sudo' does not pass the environment variables; the $PATH is (cleared and) re-initialized, so it's futile to set up $PATH before issuing sudo make install.

I did a man sudo... Didn't help me out. I also tried man su, and found su -m (or su -e). Those do not seem to work as advertised. So finally I found out that you can...

sudo env "PATH=$PATH" make install && echo "Success!"

If you do not see the "Success!" message, then it might be because you need to run make install TWICE! There seem to be a bug somewhere in the newlib distribution, which causes an error due to a missing directory; this is created on second try. I do not know why that is not fixed. My solution is...

make CFLAGS_FOR_TARGET="-D__IEEE_BIG_ENDIAN -D__IEEE_BYTES_LITTLE_ENDIAN -D__BUFSIZ__=64" && sudo env="PATH=$PATH" make install && sudo env="PATH=$PATH" make install && echo "Success!"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.