problem building libffi on x86-10 (fatal link error)

Laurent Blume laurent at opencsw.org
Thu Mar 5 14:58:46 CET 2015


Le 2015/03/05 12:11 +0100, Riccardo Mottola a écrit:
> Hi,
> 
> as Laurent suggested, I wanted to try to build libffi 5 with dfferent
> compilers.
> 
> The first thing I did is build the package "as is" on unstable10x
> 
> mgar fetch makesum configure build
> 
> <...>
> libtool: link: /opt/SUNWspro/bin/cc -G -h libffi.so.5 -o
> .libs/libffi.so.5.0.10  src/.libs/debug.o src/.libs/prep_cif.o
> src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o
> src/.libs/closures.o src/x86/.libs/ffi64.o src/x86/.libs/unix64.o
> src/x86/.libs/ffi.o src/x86/.libs/sysv.o   -L/opt/csw/lib/64 -lc -m64
> -xarch=sse2 -m64 -xarch=sse2
> ld: fatal: file src/x86/.libs/unix64.o: section [4].eh_frame: section
> type is SHT_PROGBITS: expected SHT_AMD64_UNWIND
> Makefile:790: recipe for target 'libffi.la' failed
> 
> May I assume that the standard recipe is broken? What could that be? I
> suppose the package at least used to build
> The build is happening with the Sun compiler, as expected.

Some recipes have been worked on, but never finalized, particularly
those of Dago and Maciej, who are overloaded, and this one is old, mgar
has much evolved.
Don't hesitate to start by removing stuff, like I said, get the latest
libffi version, remove the patches, use a recent compiler, check if it
builds.

> This comment in the Makefile is not reassuring:
> # Fix needed for amd64 using SOS compiler
> # found at http://software.intel.com/en-us/forums/showthread.php?t=56652
> # originally for icc, but at least get the stuff to compile
> 
> we are on amd64, aren't we?

Use GCC4, forget SOS.

> further question: the library is said to be "ELF 32-bit LSB dynamic lib
> 80386 Version 1 [FPU]'
> which I think is fie but I think is not amd64.
> In the makefile I find:
> BUILD64_LIBS_ONLY = 1

Remove that line. It's only a way to save a few bytes by including only
the libraries in a 64 bit build, but it's usually a little pointless IMO.

Laurent


More information about the maintainers mailing list