Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Compiling rockbox using a mac?
« previous next »
  • Print
Pages: [1] 2

Author Topic: Compiling rockbox using a mac?  (Read 7737 times)

Offline brogan

  • Member
  • *
  • Posts: 17
Compiling rockbox using a mac?
« on: October 19, 2008, 09:48:19 PM »
I was wondering if someone can explain in detail how i could compile rockbox onto my nano using a macintosh(10.39)... I already have rockbox on my ipod, and i just figured out how to apply a patch to the source, but now im stuck on compiling, please help.. thanks
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Compiling rockbox using a mac?
« Reply #1 on: October 20, 2008, 10:18:34 AM »
http://www.rockbox.org/twiki/bin/view/Main/DevelopmentGuide
Logged

Offline brogan

  • Member
  • *
  • Posts: 17
Re: Compiling rockbox using a mac?
« Reply #2 on: October 20, 2008, 06:24:58 PM »
um... im still confused, it seems like everything is focused on compiling for windows or linux, and the linux part says.. "(or any unix based os)" .. or something like that so does that mean macs also.. or what.
and what exactly is a crosscompiler, what does that mean...
i tried following a simpleguidetocompiling, but i got stuck when it said to type make into terminal it. terminal said it wasn't a command, and apparrantly it's a linux command, and so how am i supposed to compile, if i don't know a compile command.... sorry if this didn't make sense, and i know i probably mixed things up, but thanks for your help


(*Chronon removed slang)
« Last Edit: October 20, 2008, 07:48:39 PM by Chronon »
Logged

Offline linuxstb

  • Developer
  • Member
  • *
  • Posts: 1163
Re: Compiling rockbox using a mac?
« Reply #3 on: October 20, 2008, 06:36:53 PM »
A compiler is a program that takes source code and compiles it into executable code for a specific processor/architecture.

A cross-compiler is simply a compiler that you run on one architecture (the "host" - e.g. your Mac) and compiles source code to run on another architecture (the "target" e.g. your Nano).  A normal compiler is one where host and target are the same.

Firstly, you'll need to make sure you have all the standard OS X development tools installed (this includes programs such as "make" - a standard Unix command, NOT specific to Linux).  To do this, install "xcode" from Apple - if a copy didn't come on the CD/DVDs with your Mac, you can download it from Apple.

After that, the Linux/Unix instructions should work.
Logged

Offline brogan

  • Member
  • *
  • Posts: 17
Re: Compiling rockbox using a mac?
« Reply #4 on: October 20, 2008, 07:17:20 PM »
thanks, that explained alot ...
alright, but i still want to make sure im doing this right...
so i followed the instructions here: http://www.rockbox.org/twiki/bin/view/Main/LinuxSimpleGuideToCompiling
after i dowloaded xcode legacy version(i have mac 10.39) from here: https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/304/wo/4l5Kl1PHgSVh2z60PUDKtFZmiGy/3.1.17.2.1.3.3.1.1.1.1.0.3.3.3.3.1

the problem was when the instructions said to type "make".. as before it said it wasn't a command
maybe i didn't download xcode right, but im pretty sure atleast i installed it right, jus maybe not the right version, please help
thanx
« Last Edit: October 20, 2008, 09:43:31 PM by brogan »
Logged

Offline brogan

  • Member
  • *
  • Posts: 17
Re: Compiling rockbox using a mac?
« Reply #5 on: October 23, 2008, 12:02:33 AM »
Alright... i figured out all those things from before with xcode etc..., but i now i have had a couple of more problems.. first i will show u what i did(ill skip the first couple steps....) i was following the instructions from here: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler, and here: http://www.rockbox.org/twiki/bin/view/Main/SimpleGuideToCompiling .. and the linux section as well...

ok so i ran the rockboxdev.sh file in the tools/ directory.. it ran for a while, and it seemed to have worked.
then i typed,     export PATH=$PATH:/usr/local/arm-elf/bin:/usr/local/m68k-elf/bin:/usr/local/sh-elf/bin        in terminal to set the path.... after that i  created a build directory (build) in the rockbox source directory and then i typed,    ../tools/configure    to run configure, i set it up for an ipod nano (21)with a normal build(N)....
then the problem came when it said:

../tools/configure: line 1: arm-elf-gcc: command not found
../tools/configure: line 1: 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.
Using arm-elf-ld
Created Makefile
......
and so i tried to just ignore it and i typed,    make    .. and it said( i used ___ for my username, in case u r wondering what ___ means..):

/Users/____/desktop/rockbox-18826/tools/svnversion.sh: line 1: svnversion: command not found
/Users/_____/desktop/rockbox-18826/tools/svnversion.sh: line 1: svnversion: command not found
make[1]: `rdf2binary' is up to date.
make[1]: `convbdf' is up to date.
/usr/bin/gcc     codepages.c   -o codepages
ld: Undefined symbols:
_cp1250_to_uni
_cp1251_to_uni
_cp1256_to_uni
_cp932_table
_cp936_table
_cp949_table
_cp950_table
_iso8859_2_to_uni
_iso8859_7_to_uni
make[1]: *** [codepages] Error 1
make: *** [tools] Error 2
localhost:~/desktop/rockbox-18826/build

after that i typed make zip just to see if anything would happen and a .rockbox directory was created, but lots of the files, esp. plugins were missing.... so
please help... and thanks to those who've helped me so far...
« Last Edit: October 23, 2008, 12:07:58 AM by brogan »
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Compiling rockbox using a mac?
« Reply #6 on: October 23, 2008, 12:24:52 AM »
Quote from: brogan on October 23, 2008, 12:02:33 AM
then i typed,     export PATH=$PATH:/usr/local/arm-elf/bin:/usr/local/m68k-elf/bin:/usr/local/sh-elf/bin        in terminal to set the path....

Quote from: brogan on October 23, 2008, 12:02:33 AM
../tools/configure: line 1: arm-elf-gcc: command not found

According to that error,  you did not successfully add the compiler to your PATH.  You can check your PATH by typing "echo PATH".  Confirm that the directory where your arm-elf-gcc was installed to is listed there.
Logged

Offline cool_walking_

  • Rockbox Expert
  • Member
  • *
  • Posts: 695
Re: Compiling rockbox using a mac?
« Reply #7 on: October 23, 2008, 01:18:15 AM »
Quote from: saratoga on October 23, 2008, 12:24:52 AM
"echo PATH"
That's "echo $PATH".
Logged

Offline brogan

  • Member
  • *
  • Posts: 17
Re: Compiling rockbox using a mac?
« Reply #8 on: October 23, 2008, 07:26:33 PM »
alright... so how do i change the path so it works.. and how do i find the directory that has arm-elf-gcc in it... i can't find it.. thanx
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Compiling rockbox using a mac?
« Reply #9 on: October 23, 2008, 08:57:02 PM »
Quote from: brogan on October 23, 2008, 07:26:33 PM
alright... so how do i change the path so it works.. and how do i find the directory that has arm-elf-gcc in it... i can't find it.. thanx

Did you not install it to /usr/local/arm-elf/ as you suggested above?
Logged

Offline brogan

  • Member
  • *
  • Posts: 17
Re: Compiling rockbox using a mac?
« Reply #10 on: October 23, 2008, 09:25:43 PM »
First of all, i just want to say that i really appreciate the help...... but I'm still confused on how to change the path...... and where to find /usr/local/arm-elf/  i tried to find a usr directory and couldn't find one.. i even searched.. and had no success.... so how exactly do i find arm-elf-gcc , and how do put it into the path.. thanks.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Compiling rockbox using a mac?
« Reply #11 on: October 23, 2008, 11:03:43 PM »
Quote from: brogan on October 23, 2008, 09:25:43 PM
so how exactly do i find arm-elf-gcc , and how do put it into the path.. thanks.

The command you used above should do it.  Since it did not, either you've put the compiler somewhere else, rockboxdev did not run, or you did not type the command correctly.  Since you can't find where it installed to, you could run it again, paying attention to the install directory and making sure the tool completes. 
Logged

Offline brogan

  • Member
  • *
  • Posts: 17
Re: Compiling rockbox using a mac?
« Reply #12 on: October 23, 2008, 11:34:47 PM »
I found a folder called usr/ and then i clicked on local/ but all the folders and next couple files and folders were font forge related ... then back in macintosh hd/ i saw a folder called tmp/ inside was rbdev-build/summary-a/ and rbdev-dl/binutils......bz2, gcc-core.... bz2, and rockbox-... arm-elf-gcc...dff/
what do u recomend that I do from here?
Logged

Offline GodEater

  • Member
  • *
  • Posts: 2829
Re: Compiling rockbox using a mac?
« Reply #13 on: October 24, 2008, 02:39:56 AM »
Try opening a terminal window, and doing the following :

Code: [Select]
find / -name "arm-elf-gcc" -print
Logged

Read The Manual Please

Offline robin0800

  • Member
  • *
  • Posts: 291
  • Freeman
Re: Compiling rockbox using a mac?
« Reply #14 on: October 24, 2008, 03:30:38 AM »
The  change to a later gcc means the linux instructions are now broken.

A work around is to use

sudo CPPFLAGS=-U_FORTIFY_SOURCE ./rockboxdev.sh


(information obtained from irc when trying to compile on Linux ubuntu 8.10)
« Last Edit: October 24, 2008, 03:36:47 AM by robin0800 »
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Compiling rockbox using a mac?
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.103 seconds with 14 queries.