[mythtv] Linux to MacOSX cross compilation

Emlyn Bolton emlyn.bolton at gmail.com
Thu Mar 3 17:54:10 UTC 2011


On 3 March 2011 03:23, Lawrence Rust <lvr at softsystem.co.uk> wrote:

> On Wed, 2011-03-02 at 18:15 -0800, Emlyn Bolton wrote:
> [snip]
> > 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.
>
> Thanks for the feedback - fixed.
>
> > I also discovered that you need to have both bison and flex installed
> > to get compilation to happen.
>
> OK, I've added bison & flex to the installation tests.
>
> > 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?
>
> I'm running Ubuntu 10.10 with latest updates.
>
> gcc --version
> gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5
> Copyright (C) 2010 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is
> NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
> PURPOSE.
>
> > 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
>
> After a successful build, the file tm-preds.h looks like this:
>
> /* Generated automatically by the program 'build/genpreds'
>   from the machine description file
> '../../gcc-5247.i686-apple-darwin8/gcc/config/i386/i386.md'.  */
>
> #ifndef GCC_TM_PREDS_H
> #define GCC_TM_PREDS_H
> ...
>
> So it must be gcc that's taken exception to the comment spanning lines 1
> to 2, particularly the quoted string on line 2; strange.  The file is
> generated by gcc/genpreds.c, which if you look at it seems quite
> innocuous.  Perhaps you could confirm what the first few lines of
> build-gcc-5247.i686-apple-darwin8/gcc/tm-preds.h contain?  Maybe this is
> a file system problem or a race condition.  Perhaps try mkodcctools
>
> I have updated the cross compiler build script with your suggestions and
> added support for more versions of XCode, SDK and gcc.  It's available
> as a direct download from here:
> http://www.softsystem.co.uk/download/mythtv/mkodcctools
> or with git from here:
> git clone http://www.softsystem.co.uk/git/mythbuilder.git
>
>
Just used the updated version (git repo) to sucessfully build the tools.  I
removed ccache (I've had problems with that in the past).  Also, I noticed
you changed the default xcode tools to 2.2.1. Now onto the build of
0.24/fixes and then see if this will actually work on my ATV!  That is the
goal for me....  I can't build on 10.6 for 10.4...

Thanks for the updates!

Emlyn


>
> -- Lawrence
>
>
> _______________________________________________
> 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/20110303/b0867ce8/attachment.html 


More information about the mythtv-dev mailing list