Opened 6 years ago

Closed 4 years ago

Last modified 4 years ago

#4496 closed feature request (duplicate)

add a configure build option to use system libffi for Linux

Reported by: juhpetersen Owned by:
Priority: normal Milestone: 7.6.2
Component: Build System Version: 7.1
Keywords: Cc:
Operating System: Linux Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

ghc should not use its own internal copy of libffi on Linux at least. Copy libs are frowned on by Linux distros. Debian has a patch to use system libffi on ghc-6.12.3 which I am now porting to ghc-7.0.1. I can attach it here but it probably needs to be a build option and/or detected by configure.

Change History (10)

comment:1 Changed 6 years ago by igloo

Milestone: 7.2.1

We should look into whether it's feasible to use the system libffi on all platforms.

comment:2 Changed 6 years ago by juhpetersen

Summary: use system libffi on Linuxadd a configure build option to use system libffi for Linux
Type: bugfeature request
Version: 7.0.17.1

The current patch for ghc-7.0.4 to use system libffi in Debian and Fedora looks like this: http://pkgs.fedoraproject.org/gitweb/?p=ghc.git;a=blob;f=ghc-use-system-libffi.patch

(The patch needs reformatting for 7.2.1: I can attach a newer patch, but anyway I think the current form needs more work if this is going to be build option.)

comment:3 Changed 5 years ago by igloo

Milestone: 7.4.17.6.1
Priority: normallow

comment:4 Changed 5 years ago by juhpetersen

Disappointed to see the priority of this being lowered...

Lack of system libffi support in ghc is currently blocking me from building ghc-7.4.1 for Fedora. (There were quite a lot of changes in handling of libffi from 7.2 to 7.4.)

Debian and Fedora are both keen to see support for system libffi integrated into ghc's buildsystem.

comment:5 Changed 5 years ago by simonmar

difficulty: Unknown
Priority: lownormal

comment:6 Changed 5 years ago by igloo

On the Mac I have /usr/lib/libffi.dylib and /usr/include/ffi/*.h.

However, I can't see any mingw tarballs that seem likely to include it.

comment:7 Changed 5 years ago by simonmar

I think we would have to keep the in-tree libffi and make it optional to use an external one.

comment:8 Changed 4 years ago by igloo

Milestone: 7.6.17.6.2

comment:9 Changed 4 years ago by igloo

Resolution: duplicate
Status: newclosed

Closing in favour of #5743

comment:10 Changed 4 years ago by ian@…

commit 3005e90936c47c1f71672bf6c84fff20cb14014b

Author: Ian Lynagh <ian@well-typed.com>
Date:   Thu Nov 29 22:22:39 2012 +0000

    Add configure option to use system provided libffi; fixes #5743
    
    Based on patch from Peter Trommler:
    
        From 293495d40f62e691520331a41c6d85d82e120169 Mon Sep 17 00:00:00 2001
        From: Peter Trommler <ptrommler@acm.org>
        Date: Sun, 21 Oct 2012 18:47:01 +0200
        Subject: [PATCH] Add configure option to use system provided libffi This
         fixes track # 5743 and #4496.

 configure.ac        |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++
 ghc.mk              |   11 ++++++++-
 mk/config.mk.in     |    7 ++++++
 rts/ghc.mk          |   42 ++++++++++++++++++++++++++++++++++----
 rts/package.conf.in |    3 ++
 5 files changed, 111 insertions(+), 7 deletions(-)
Note: See TracTickets for help on using tickets.