This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: Building on Mingw64
- From: Luis Lavena <luislavena at gmail dot com>
- To: Daniel Holden <theonlydancingbanana at hotmail dot com>
- Cc: libffi-discuss at sourceware dot org
- Date: Fri, 9 Nov 2012 09:04:28 -0300
- Subject: Re: Building on Mingw64
- References: <BLU0-SMTP30892275F67EF7BA576F961C9680@phx.gbl>
On Fri, Nov 9, 2012 at 8:56 AM, Daniel Holden
<theonlydancingbanana@hotmail.com> wrote:
> Hi all,
>
> I'm having a little trouble building libffi on Windows 7 64 bit using
> Mingw64 (http://mingw-w64.sourceforge.net/).
>
> Here is the error message on compile:
>
> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude
> -I..
> src -DFFI_BUILDING -I. -I../include -Iinclude -I../src -DFFI_BUILDING -g -MT
> sr
> /x86/win32.lo -MD -MP -MF src/x86/.deps/win32.Tpo -c ../src/x86/win32.S
> -DDLL_
> XPORT -DPIC -o src/x86/.libs/win32.o
> ../src/x86/win32.S: Assembler messages:
> ../src/x86/win32.S:486: Error: invalid instruction suffix for `push'
> ../src/x86/win32.S:497: Error: invalid instruction suffix for `push'
> ../src/x86/win32.S:498: Error: invalid instruction suffix for `push'
> ../src/x86/win32.S:643: Error: invalid instruction suffix for `pop'
> ../src/x86/win32.S:652: Error: invalid instruction suffix for `push'
> ../src/x86/win32.S:669: Error: invalid instruction suffix for `push'
> ../src/x86/win32.S:768: Error: invalid instruction suffix for `pop'
> ../src/x86/win32.S:780: Error: invalid instruction suffix for `pop'
> ../src/x86/win32.S:797: Error: invalid instruction suffix for `push'
> ../src/x86/win32.S:799: Error: invalid instruction suffix for `push'
> ../src/x86/win32.S:814: Error: invalid instruction suffix for `push'
> ../src/x86/win32.S:818: Error: invalid instruction suffix for `push'
> ../src/x86/win32.S:918: Error: invalid instruction suffix for `pop'
> ../src/x86/win32.S:919: Error: invalid instruction suffix for `pop'
> ../src/x86/win32.S:934: Error: invalid instruction suffix for `push'
> ../src/x86/win32.S:1032: Error: invalid instruction suffix for `pop'
> make[3]: *** [src/x86/win32.lo] Error 1
>
> I know very little about assembly but this looks like a 32/64 bit issue. Is
> MinGW64 supported as a compiler?
>
Did you use the configure script and provided the host?
configure --host=x86_64-w64-mingw32?
Because that is required to enable the 64bits mode on my end.
I've compiled libffi in 64bits mode without troubles with mingw-w64
compiler, see binary packages mentioned here:
https://groups.google.com/forum/?fromgroups=#!topic/rubyinstaller/Lp-OukkdGQE
The 64bits version was obtained using tdm64 variant of mingw-w64, but
is mingw-w64 at the end. The trick is always configure with the right
host flag.
Let us know if that helps.
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry