[mythtv] Linux to MacOSX cross compilation

Emlyn Bolton emlyn.bolton at gmail.com
Thu Mar 3 02:15:18 UTC 2011


On 1 March 2011 00:27, Lawrence Rust <lvr at softsystem.co.uk> wrote:

> On Tue, 2011-03-01 at 10:26 +1100, Jean-Yves Avenard wrote:
> > On 1 March 2011 07:18, Lawrence Rust <lvr at softsystem.co.uk> wrote:
> > > OK, just confirmed that the 10.6 SDK requires a later gcc and probably
> > > cctools too; the Apple supplied libs in 10.6 are incompatible with the
> > > earlier ld.  However, I can build with 10.5 and the current gcc 4.0.1
> >
> > This is really cool.
> >
> > Does the 10.5 compiled tool works on a 10.6 machine ?
>
> I see no reason why not - there's nothing Linux specific about the cross
> tools or compiler.  It would be perfectly feasible to build cctools and
> the C cross compiler on a 10.6 machine using the mkodcctools script to
> target 10.3, 10.4 or 10.5.
>
> >From what I understand these tools are mainly used to cross compile (on
> a Mac) to iPad and iPhone.
>
> -- Lawrence
>
>
>
Thanks for the script Lawrence, I have found a small bug.  Once you build
xar, it needs to change back to the main working directory or else it will
fail to find the xcode dmg.
I also discovered that you need to have both bison and flex installed to get
compilation to happen.

Once those issues were resolved, I ran into some problems compiling gcc.  It
looks like a combination between some code generation and the compiler not
behaving properly.  The gcc on my gentoo box and unbuntu 10.10 don't like
the comments inserted by the gcc code generation tools, causing the build to
fail.  What is your build machine's gcc version?

make[2]: Entering directory
`/home/mythtv/mythbuilder/build-gcc-5247.i686-apple-darwin*/gcc'
gcc -c   -g -O2 -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long
-Wno-variadic-macros -Wold-style-definition  -Wno-error  -DHAVE_CONFIG_H
-DGENERATOR_FILE    -I. -Ibuild -I../../gcc-5247.i686-apple-darwin*/gcc
-I../../gcc-5247.i686-apple-darwin*/gcc/build
-I../../gcc-5247.i686-apple-darwin*/gcc/../include
-I../../gcc-5247.i686-apple-darwin*/gcc/../libcpp/include  \
 -o build/insn-conditions.o insn-conditions.c
In file included from tm_p.h:6,
                 from insn-conditions.c:22:
tm-preds.h:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'/' token
In file included from tm_p.h:6,
                 from insn-conditions.c:22:
tm-preds.h:2:96: warning: missing terminating ' character
tm-preds.h:2: error: missing terminating ' character
insn-conditions.c:1706: warning: string length '597' is greater than the
length '509' ISO C90 compilers are required to support





>  _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mythtv.org/pipermail/mythtv-dev/attachments/20110302/564ffaf9/attachment.html 


More information about the mythtv-dev mailing list