[vlc-devel] a pitfall when cross-compiling win32 build on 64bit machine

Naohiro KORIYAMA nkoriyama at gmail.com
Wed Dec 14 22:52:42 CET 2011


Rémi-san, ohayou gozaiamsu

2011/12/15 Rémi Denis-Courmont <remi at remlab.net>:
> Le mercredi 14 décembre 2011 17:12:49 Rafaël Carré, vous avez écrit :
>> Le Wed, 14 Dec 2011 09:05:39 +0100,
>>
>> Rémi Denis-Courmont <remi at remlab.net> a écrit :
>> >    Naohiro-san hello,
>> >
>> > On Wed, 14 Dec 2011 15:48:54 +0900, Naohiro KORIYAMA
>> > <nkoriyama at gmail.com>
>> >
>> > wrote:
>> > > I compile win32 build on OS X Lion.
>> > >
>> > > First, it seemed fine, but lua scripts didn't run at all.
>> > > I installed lua in /usr/local/bin, and it was built as 64bit
>> >
>> > application.
>> >
>> > > And, I found the following in the LUAC man page:
>> > > The binary files created by luac are portable only among architectures
>> > > with the same word size and byte order.
>> >
>> > Is that so? I thought it was only byte order.
>>
>> lua wiki says it doesn't depend on byte order (it's not in sync with
>> luac manpage at least)
>
> To be more precise, it depends on:
> - the endianess,
> - the size of 'int',
> - the size of 'size_t',
> - the size of 'double'.
>
> For the dirty little details, see lundump.c and ldump.c. Note that VLC assumes
> int has 32-bits, so 'Instruction' is always 'int' on VLC-supported platforms.
>
> Storing double precision values portably is not completely trivial.

Your patch works perfectly both on Win 32bit and on OS X 64bit.

Best regards,

-- 
KORIYAMA, Naohiro
nkoriyama at gmail.com



More information about the vlc-devel mailing list