Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: bro2baseball on December 31, 2006, 02:03:23 PM

Title: arm-elf-gcc problem
Post by: bro2baseball on December 31, 2006, 02:03:23 PM
When I try to compile rockbox, everything works fine except that the "arm-elf-gcc" is not found.

I've followed the directions here http://www.rockbox.org/twiki/bin/view/Main/CygwinDevelopment exactly. I reinstalled everything twice.

I replaced a line in /etc/profile with
Code: [Select]
PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/opt/sh/bin:/opt/m68k/bin:/opt/arm/bin:$PATH, as per the instructions in the link above, thinking that my problem was that the path wasn't correct. However, after doing that cygwin doesn't even let me do the
Code: [Select]
../tools/configure command.

Any help?

bro2
Title: Re: arm-elf-gcc problem
Post by: saratoga on December 31, 2006, 02:12:36 PM
Type echo $PATH and see what you got on your path.
Title: Re: arm-elf-gcc problem
Post by: bro2baseball on December 31, 2006, 02:22:52 PM
OK when I open cygwin and I type
Code: [Select]
echo $PATH I get

Code: [Select]
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Python22:/cygdrive/c/Program Files/Quicktime/QT System/
Does it matter what directory I type it in?

bro2
Title: Re: arm-elf-gcc problem
Post by: saratoga on December 31, 2006, 08:06:45 PM
Doesn't matter where.  However, none of those look like a place where you'd put your arm gcc compiler.  Are you sure you typed the export path command correctly?  It looks like it didn't work.
Title: Re: arm-elf-gcc problem
Post by: bro2baseball on December 31, 2006, 08:28:10 PM
What export command do you speak of? Like I said, I just followed the directions on the wiki.
(If you're talking about the path I replaced, yeah, I'm sure it's right. I copy and pasted.)

bro2

Title: Re: arm-elf-gcc problem
Post by: Sentertainment on December 31, 2006, 09:21:20 PM
here;s how ya do it...I had the same prob at first....
do windows search for the exe file, then once u find the directory use the path relative to the cygwin folder as the path.
(may be confusing, but if you can make sense of what I said....it works)
Title: Re: arm-elf-gcc problem
Post by: saratoga on December 31, 2006, 09:49:06 PM
What export command do you speak of?

http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler

Like I said, I just followed the directions on the wiki.
(If you're talking about the path I replaced, yeah, I'm sure it's right. I copy and pasted.)


Well your path is still wrong, so something is off.  Try again.  Either by editing the scrip as in the above quide, or by using the export command above.  
Title: Re: arm-elf-gcc problem
Post by: bro2baseball on December 31, 2006, 11:15:26 PM
This is what I get when I run the shell script detailed in the cross compiling wiki page

(http://i130.photobucket.com/albums/p260/bro2baseball/cygwinscreenie.jpg).

I can't figure this thing out! That's not what's supposed to happen is it? There's no arm-elf folder in /usr/local.

bro2
Title: Re: arm-elf-gcc problem
Post by: saratoga on January 01, 2007, 01:39:14 AM
Sorry I think I misread your what you wrote above.  It looks like the compiler was never installed.  I'm not sure why, but it sort of sounds like you don't have wget installed in your cygwin.  You can add it from the cygwin setup program.
Title: Re: arm-elf-gcc problem
Post by: decayed.cell on January 01, 2007, 03:10:56 AM
Try copying arm-elf-gcc.exe from cygwin\opt\arm\bin to cygwin\bin
Title: Re: arm-elf-gcc problem
Post by: bro2baseball on January 01, 2007, 03:47:10 PM
I feel dumb because my problem was so obvious. I was editing the ect/profile with Wordpad, and after saving it messed the file up. I used Notepad++ and now it works fine.

thanks for all your help!

bro2
Title: Re: arm-elf-gcc problem
Post by: Sentertainment on January 02, 2007, 06:25:25 PM
I feel dumb because my problem was so obvious. I was editing the ect/profile with Wordpad, and after saving it messed the file up. I used Notepad++ and now it works fine.

thanks for all your help!

bro2

that's pretty much what I tried to say...but it didnt exactly come out clear ;D
Title: Re: arm-elf-gcc problem
Post by: Job Van Dam on January 06, 2007, 06:00:18 PM
Quote from: Sentertainment
here;s how ya do it...I had the same prob at first....
do windows search for the exe file, then once u find the directory use the path relative to the cygwin folder as the path.
(may be confusing, but if you can make sense of what I said....it works)
Quote from: decayed.cell
Try copying arm-elf-gcc.exe from cygwin\opt\arm\bin to cygwin\bin
Greatest... pieces... of... advice.... ever...

I've been ripping out my pubic hair trying to get this blasted thing to compile. Two sentences change everything. Thanks tenfold guys.
Now I just gotta figure out how to fix this now:
Code: [Select]
CC target/arm/gigabeat/meg-fx/pcm-meg-fx.c
CONVBDF
CC sysfont.c
Header parsed
AR+RANLIB librockbox.a
make[1]: *** [/cygdrive/d/cygwin/home/griz/rockbox-devel/build/librockbox.a] Error 127
make: *** [all] Error 2
If anyone can help I'd appreciate it.
Again thank you so much Sentertainment & decayed.cell. You two... top of your game.
Title: Re: arm-elf-gcc problem
Post by: Bagder on January 06, 2007, 06:06:24 PM
If anyone can help I'd appreciate it.

If all you did before was to copy that gcc binary to your bin folder, then the problem is exactly the same: you don't have the necessary tool(s) in your path.

This is why the instructions for building a cross-compiler says change your PATH and not "copy files".

Also, you can use 'make V=1' to get more details printed in the console when you build.

I thought there were prebuilt cygwin packages already for this...
Title: Re: arm-elf-gcc problem
Post by: Sentertainment on January 07, 2007, 12:56:20 AM
Job Van Dam:  lol, I still have alot to learn about rockbox, I had the same trouble as you...luckily I've messed w/  linux b4 and figured it out fast.   Anyways, the copying part was bad advice, that can make more problems...just keep in mind you don't want to move files, you want to change the configuration saying where they are. ;)

Badger:  Yes, there are packages built on the server...just the PATH isn't set correctly by default it seems, I had the same problem myself.
Title: Re: arm-elf-gcc problem
Post by: bluebrother on January 07, 2007, 05:31:18 AM
why aren't you guys just using the vmware image? It's linux and that behaves pretty similar to cygwin. As this image is available I personally don't see a reason to use cygwin for that anymore (except if you already have it up an running).
Title: Re: arm-elf-gcc problem
Post by: Sentertainment on January 07, 2007, 12:07:36 PM
why aren't you guys just using the vmware image? It's linux and that behaves pretty similar to cygwin. As this image is available I personally don't see a reason to use cygwin for that anymore (except if you already have it up an running).

I prefer running things natively ;)
Title: Re: arm-elf-gcc problem
Post by: bluebrother on January 07, 2007, 12:47:14 PM
I prefer running things natively ;)
cygwin is not native :D
Title: Re: arm-elf-gcc problem
Post by: Llorean on January 07, 2007, 04:44:25 PM
I'd say the whole argument between VMWare and Cygwin is this:

VMWare:
Pro: Easy Setup, Compiling takes ~half the time.
Con: Takes up a lot of disk space. Sometimes unreliable network access to the files.

Cygwin:
Pro: Smaller footprint on disk space. Easier to access your files.
Con: Setup can go wrong in a myriad of ways. Compiling is measured in decades rather than minutes.


Okay, so I'm exaggerating very slightly on that final point, but it's really Space and direct filesystem access vs Speed and ease of setup.
Title: Re: arm-elf-gcc problem
Post by: Sentertainment on January 07, 2007, 10:06:40 PM
I prefer running things natively ;)
cygwin is not native :D

I thought only the command line was simulated...
It seems to be UNIX for DOS to me.
Title: Re: arm-elf-gcc problem
Post by: GodEater on January 08, 2007, 03:36:13 AM
I thought only the command line was simulated...
It seems to be UNIX for DOS to me.

Cygwin is a POSIX compatibility layer for Windows. This means that all the binaries that run in the cygwin environment get a lot of their API calls routed through the cygwin.dll which then has to translate them into windows calls. That's why it's not "native".