Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: Angyman on September 14, 2007, 10:16:20 AM

Title: Anz advice for compiling on OS X
Post by: Angyman on September 14, 2007, 10:16:20 AM
Hi all,
I am not totally new to compiling but also i am not an expert . I just was able to fix patches and make my own builds with cygwin. Now i moved to Spain and got nothing else with me than a Powerbook with OS X.

And i really have no idea how to compile on that system. It seems to be quite more difficult to setup than on XP.

So any advice would be appreciated.

Thank you!
Title: Re: Anz advice for compiling on OS X
Post by: nls on September 14, 2007, 10:41:43 AM
Really it's quite simple, the instructions for an automatic setup using the rockboxdev.sh script should work for osx, see http://www.rockbox.org/twiki/bin/view/Main/WebHome?topic=CrossCompiler
Title: Re: Anz advice for compiling on OS X
Post by: Angyman on September 19, 2007, 07:24:58 PM
I will give this a try ;-) Thank you
Title: Re: Anz advice for compiling on OS X
Post by: Heriver on January 10, 2008, 01:23:07 PM
Really it's quite simple, the instructions for an automatic setup using the rockboxdev.sh script should work for osx, see http://www.rockbox.org/twiki/bin/view/Main/WebHome?topic=CrossCompiler

When i invoke  "rockboxdev.sh" on my iMac (Leopard) it complain that gcc is not installed,
what is true. Why?
 So i'd move VMWare to iMac with Parallels Transporter so i can work with the Rockbox-image
(under Parallels) i have compiled the source without any error.
But only the "Rockbox-desktop" and Xterm is not there, i have only a terminal window,
thats all there is, in short, there is no GUI.

But it doesn't matter to me.
Title: Re: Anz advice for compiling on OS X
Post by: nls on January 11, 2008, 07:26:11 AM
When i invoke  "rockboxdev.sh" on my iMac (Leopard) it complain that gcc is not installed,
what is true. Why?

I'm not quite sure that i follow but you need gcc installed for rockboxdev.sh to be able to compile the crosscompiler. If you have gcc installed and rockboxdev.sh can't find it there could be some kind of path problem but I have no idea how to fix that on macos...
Title: Re: Anz advice for compiling on OS X
Post by: linuxstb on January 11, 2008, 11:44:51 AM
gcc is installed as part of XCode - which is freely available from Apple.  Just google for "xcode".

I quite often develop on my iBook, and it works fine - you don't need any vmware or similar kludges, Mac OS X is a full Unix operating system, and hence is natively capable of running the tools required to build Rockbox.
Title: Re: Anz advice for compiling on OS X
Post by: Heriver on January 11, 2008, 09:31:36 PM
gcc is installed as part of XCode - which is freely available from Apple.  Just google for "xcode".

After some google search i've read, that it was supplied on the Leopard installation disc.
After installing i invoke the the command gcc -v  and it shows up.
After this i ran in some more dificulties...See follow-up

Quote
I'm not quite sure that i follow but you need gcc installed for rockboxdev.sh to be able to compile the crosscompiler. If you have gcc installed and rockboxdev.sh can't find it there could be some kind of path problem but I have no idea how to fix that on macos...

Wel i invoke the ../tools/rockboxdev command, i 'll get permission acces denied,
some r/w rights.
I invoke the sudo ../tools... command, oke i'm back o track, but it ends with the Make error,
This are the last lines:

       FATAL:/usr/bin/../libexec/gcc/darwin/i386/as: I don't understand 'm' flag!
       make[1]: *** [crtbegin.o] Error 1
       make: *** [install-gcc] Error 2
       done

The ..toools/configure command stops, it can't find ggc,
in the dir   /usr/local/m68k-elf/  there is not any bin files at all , only some info files and language.  
I have saved the complete listing about 240kB
On request i will upload the listing
Maybe it isn't compatible with Darwin 9.1.0-gcc ??

Any ideas?


Title: Re: Anz advice for compiling on OS X
Post by: linuxstb on January 14, 2008, 10:41:27 AM
I'm using Tiger, so can't confirm that Apple haven't broken things with Leopard...

What does "gcc -v" display?
Title: Re: Anz advice for compiling on OS X
Post by: Heriver on January 14, 2008, 07:38:16 PM
I'm using Tiger, so can't confirm that Apple haven't broken things with Leopard...

What does "gcc -v" display?

Well i have try this before to be sure,  i could also make mistakes, but no doubt about it.

Screen-output:

gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man    --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0  --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9    --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)


It should work with Rockbox, but maybe the gcc compiler have not the 'right' lib's or settings, but i can not explain this,
with minor knowledge about LInux and gcc.