This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: Error building libffi on x86_64
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: cygwin-developers at cygwin dot com
- Date: Wed, 13 Mar 2013 10:27:53 +0100
- Subject: Re: Error building libffi on x86_64
- References: <20130312232736.3f71531b@YAAKOV04>
Hi Jakoov,
2013/3/13 Yaakov schrieb:
> I have encountered the following error attempting to build
> libffi-3.0.12 on Cygwin:
>
> src/x86/.libs/win64.o:/usr/src/debug/libffi-3.0.12-1/src/x86/win64.S:298:(.text+0x69): relocation truncated to fit: R_X86_64_32S against symbol `ffi_closure_win64_inner' defined in .text section in src/x86/.libs/ffi.o
Hmm, I think the issue is here that the instruction used at this place
misses ip-relative addressing.
At line 298 we have mov $SYMBOL_NAME(ffi_closure_win64_inner), %rax
Could you try if you get same isse with that line replaced by lea
SYMBOL_NAME(ffi_closure_win64_inner)(%rip), %rax
> The only matches on Google for this sort of error were for >2GB code on
> Linux, but I suspect the problem here is with the medium code model.
Well, I am a bit in doubt about this due libffi is a static library,
which is always near to an image. But well ...
> Here's what I'm working with:
>
> http://cygwin-ports.git.sourceforge.net/git/gitweb.cgi?p=cygwin-ports/libffi
>
>
> Yaakov
Kai