[mythtv-users] Cross-compiled win32 binaries failing to run

Markus Mattinen thechoris at gmail.com
Sun Jan 8 13:31:20 UTC 2012


2012/1/8 Lawrence Rust <lvr at softsystem.co.uk>:
> On Sat, 2012-01-07 at 21:19 +0200, Markus Mattinen wrote:
>> 2011/12/21 Lawrence Rust <lvr at softsystem.co.uk>:
>> >
>> > This leads me to believe that it's a 64-bit issue - the patch is not
>> > necessary on a 64-bit system.  However, if the target is 32-bit (which
>> > it should be here) then a conforming cross compiler should issue a
>> > diagnostic (error).  So maybe it's the 64-bit mingw tools that are
>> > producing incorrect output.  I'm sticking with a 32-bit PAE system for
>> > the present because of these niggles.  It might prove useful to setup a
>> > 32-bit VirtualBox (or similar) environment to cross compile, which is a
>> > known good route.
>> >
>> > Have you tried setting the cpu type i.e. adding "-c i686" to the
>> > mythbuild.sh invocation?  Maybe that might provide a solution.
>> >
>> > --
>> > Lawrence
>> > _______________________________________________
>> > mythtv-users mailing list
>> > mythtv-users at mythtv.org
>> > http://www.mythtv.org/mailman/listinfo/mythtv-users
>>
>> I tried it on a 32-bit Arch Linux installation within Virtualbox, and
>> got the same results - compiling worked fine but the output
>> executables would just not run.
>> Then I installed Ubuntu within the same Virtualbox, did the exact same
>> thing, and this time they work just fine!
>> Wonder what the problem on Arch could be? i686 optimizations?
>> mingw32/gcc version?
>
> This is the most likely cause.  These are the mingw packages that I'm
> using:
>
> mingw32                 4.2.1.dfsg-2ubuntu1
> mingw32-binutils        2.20-0.1
> mingw32-runtime         3.15.2-0ubuntu1
>
> /usr/bin/i586-mingw32msvc-gcc --version
> i586-mingw32msvc-gcc (GCC) 4.2.1-sjlj (mingw32-2)
>
> /usr/bin/i586-mingw32msvc-as --version
> GNU assembler (GNU Binutils) 2.20
>
> /usr/i586-mingw32msvc/bin/ld --version
> GNU ld (GNU Binutils) 2.20
>
> How does that compare to the Arch Linux versions?
>
>> Now that I think of it, there were also some other problems under Arch
>> Linux, like not all the files ending up in the correct folders
>> (mythinstall/win32 only had half of the required files, so I'd have to
>> copy some over from mythinstall/bin, and I think the installer never
>> got properly created either).
>
> Might be a good idea to build the mingw cross tools yourself for Arch
> Linux.  See http://www.mingw.org/wiki/LinuxCrossMinGW
>
> --
> Lawrence
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users

mingw32-binutils 2.21.53-1
mingw32-gcc 4.6.1-2
mingw32-pthreads 2.8.0-2
mingw32-runtime 3.20-2
mingw32-w32api 3.17-1

/usr/bin/i486-mingw32-gcc --version
i486-mingw32-gcc (GCC) 4.6.1

/usr/bin/i486-mingw32-as --version
Gnu assembler (GNU Binutils) 2.21.53.20110804
This assembler was configured for a target of `i486-mingw32`.

/usr/i486-mingw32/bin/ld --version
GNU ld (GNU Binutils) 2.21.53.20110804

I'll try to compile them myself later to see if that helps.


More information about the mythtv-users mailing list