6.49. Libffi-3.3

#### Linux From Scratch - Version 9.1

### Chapter 6. Installing Basic System Software

- Prev

  Libelf from Elfutils-0.178

- Next

  OpenSSL-1.1.1d

- Up
- Home

# 6.49. Libffi-3.3

The Libffi library provides a portable, high level programming interface to various calling conventions. This allows a programmer to call any function specified by a call interface description at run time.

Approximate build time: 1.9 SBU
Required disk space: 10 MB

## 6.49.1. Installation of Libffi

### Note

Similar to GMP, libffi builds with optimizations specific to the proccesor in use. If building for another system, export CFLAGS and CXXFLAGS to specify a generic build for your architecture. If this is not done, all applications that link to libffi will trigger Illegal Operation Errors.

Prepare libffi for compilation:

    ./configure --prefix=/usr --disable-static --with-gcc-arch=native

The meaning of the configure option:

`--with-gcc-arch=native`

  Ensure gcc optimizes for the current system. If this is not specified, the system is guessed and the code generated may not be correct for some systems. If the generated code will be copied from the native system to a less capable system, use the less capable system as a parameter. For details about alternative system types, see the x86 options in the gcc manual.

Compile the package:

    make

To test the results, issue:

    make check

Six tests, all related to test-callback.c, are known to fail.

Install the package:

    make install

## 6.49.2. Contents of Libffi

Installed library: libffi.so

### Short Descriptions

`libffi` | contains the libffi API functions.

- Prev

  Libelf from Elfutils-0.178

- Next

  OpenSSL-1.1.1d

- Up
- Home