Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: MkFly on June 25, 2010, 07:50:25 PM

Title: [SOLVED] Compiling Rockbox on Arch Linux x86_64
Post by: MkFly on June 25, 2010, 07:50:25 PM
I'm trying to compile Rockbox on Arch Linux (https://www.archlinux.org/) x86_64, the problem I am running into during compile:

Code: [Select]
LD bootloader.elf
/usr/bin/arm-elf-ld: skipping incompatible /usr/lib/gcc/arm-elf/4.5.0/libgcc.a when searching for -lgcc
/usr/bin/arm-elf-ld: cannot find -lgcc

I have installed:
cross-arm-elf-binutils-sysroot 2.20
cross-arm-elf-gcc-base 4.5.0
gcc 4.5.0


I've tried with gcc-multilib (http://supraverse.net/arch) as well as compiling from a 32-bit chroot (http://xyne.archlinux.ca/projects/arch32-light).

Anybody here compiled Rockbox on Arch Linux?  If so, what am I missing?
Title: Re: Compiling Rockbox on Arch Linux x86_64
Post by: Piki on June 25, 2010, 07:53:27 PM
I thought Rockbox was for digital audio players? Why do you want to compile on Arch 64bit anyways?
Title: Re: Compiling Rockbox on Arch Linux x86_64
Post by: funman on June 25, 2010, 08:04:40 PM
You should use our tools/rockboxdev.sh to build the right cross compiler with the right patches and the right options (hint: select the arm eabi cross compiler for arm targets).

Cross compilers from distros are not supported, use at your own risk and don't report bugs if you didn't build with our cross compiler.
Title: Re: Compiling Rockbox on Arch Linux x86_64
Post by: MkFly on June 25, 2010, 10:12:54 PM
I thought Rockbox was for digital audio players? Why do you want to compile on Arch 64bit anyways?
I'm trying to compile Rockbox on Arch Linux, not for Arch Linux.  :D

You should use our tools/rockboxdev.sh to build the right cross compiler with the right patches and the right options (hint: select the arm eabi cross compiler for arm targets).

Cross compilers from distros are not supported, use at your own risk and don't report bugs if you didn't build with our cross compiler.
Ah ha, thank you.  I didn't know that, this is the first time I've tried compiling Rockbox outside of Cygwin.  I built an arm toolchain, the bootloader just compiled fine now, Rockbox itself is up next.

Thank you for the help.  ;D

EDIT: Is *everything* installed to /usr/local?

EDIT 2: With arm-eabi, I get:
Code: [Select]
Bootloader build selected
../tools/configure: line 2800: arm-elf-gcc: command not found
../tools/configure: line 2807: arm-elf-ld: command not found
[WARNING] The compiler you must use (arm-elf-gcc) is not in your path!
[WARNING] this may cause your build to fail since we cannot do the
[WARNING] checks we want now.
I'm assuming that this is because it's looking for arm-elf-gcc, but I have arm-elf-eabi-gcc installed?  Will symlinks be all that is needed? (yes, I set PATH, before anybody asks)
Title: Re: Compiling Rockbox on Arch Linux x86_64
Post by: Piki on June 25, 2010, 11:17:54 PM
Ah, sorry for the misinterpretation, the way I read the post made me think you were trying to make a multimedia system out of your computer.
Title: Re: Compiling Rockbox on Arch Linux x86_64
Post by: saratoga on June 25, 2010, 11:25:55 PM
EDIT 2: With arm-eabi, I get:
Code: [Select]
Bootloader build selected
../tools/configure: line 2800: arm-elf-gcc: command not found
../tools/configure: line 2807: arm-elf-ld: command not found
[WARNING] The compiler you must use (arm-elf-gcc) is not in your path!
[WARNING] this may cause your build to fail since we cannot do the
[WARNING] checks we want now.
I'm assuming that this is because it's looking for arm-elf-gcc, but I have arm-elf-eabi-gcc installed?  Will symlinks be all that is needed? (yes, I set PATH, before anybody asks)

A few devices and maybe some bootloaders still need arm-elf-gcc.  Things are being switched over as its confirmed that they work as expected.

That said, compiling bootloaders is not recommended unless you absolutely must.  Are you sure you didn't mean to build a normal rockbox build?
Title: Re: Compiling Rockbox on Arch Linux x86_64
Post by: MkFly on June 25, 2010, 11:35:41 PM
A few devices and maybe some bootloaders still need arm-elf-gcc.  Things are being switched over as its confirmed that they work as expected.

That said, compiling bootloaders is not recommended unless you absolutely must.  Are you sure you didn't mean to build a normal rockbox build?
Nah, I was just building the bootloader as a test before the main event, since it builds quick.

Okay, well I think I'll just keep on with arm-elf-gcc for now, and wait for everything to be supported by arm-eabi.  I found right after my posting though that my issue was forgetting to run tools/configure with --eabi.

How often should I rebuild the toolchains?  Do they get updated often?  It took a while to build.
Title: Re: Compiling Rockbox on Arch Linux x86_64
Post by: saratoga on June 25, 2010, 11:54:10 PM
How often should I rebuild the toolchains?  Do they get updated often?  It took a while to build.

This is the first time we've ever updated ARM compilers.
Title: Re: Compiling Rockbox on Arch Linux x86_64
Post by: funman on June 26, 2010, 01:01:43 AM
--eabi should only be needed for the Ipod4G, that's the only model left which is built without eabi by default
Title: Re: Compiling Rockbox on Arch Linux x86_64
Post by: MkFly on June 26, 2010, 03:34:07 AM
--eabi should only be needed for the Ipod4G, that's the only model left which is built without eabi by default
Hmm, I ran tools/configure and selected 52 (Sansa c200), and it defaulted to arm-elf-gcc.  Not a problem at the moment though, since I compiled both arm and arm-eabi.

tools/configure
Code: [Select]
52
Platform set to sansac200

Normal build selected
Using source code root directory: /media/external/rockbox
Using arm-elf-gcc 4.0.3 (400)
Using arm-elf-ld 2.16.1
Created Makefile
Title: Re: Compiling Rockbox on Arch Linux x86_64
Post by: AlexP on June 26, 2010, 06:04:37 AM
How old is your checkout?  Try a svn up
Title: Re: Compiling Rockbox on Arch Linux x86_64
Post by: MkFly on June 26, 2010, 07:43:18 PM
How old is your checkout?  Try a svn up
Ah.  tools/configure sets arm-eabi by default now.  Thanks.