[vlc-devel] a pitfall when cross-compiling win32 build on 64bit machine
remi at remlab.net
Wed Dec 14 18:02:00 CET 2011
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.
More information about the vlc-devel