Ticket #4496 (closed feature request: duplicate)

Opened 3 years ago

Last modified 6 months ago

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 Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

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

Changed 2 years ago by igloo

  • milestone set to 7.2.1

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

Changed 22 months ago by juhpetersen

  • version changed from 7.0.1 to 7.1
  • type changed from bug to feature request
  • summary changed from use system libffi on Linux to add a configure build option to use system libffi for Linux

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.)

Changed 15 months ago by igloo

  • priority changed from normal to low
  • milestone changed from 7.4.1 to 7.6.1

Changed 15 months 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.

Changed 15 months ago by simonmar

  • priority changed from low to normal
  • difficulty set to Unknown

Changed 15 months 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.

Changed 15 months ago by simonmar

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

Changed 8 months ago by igloo

  • milestone changed from 7.6.1 to 7.6.2

Changed 6 months ago by igloo

  • status changed from new to closed
  • resolution set to duplicate

Closing in favour of #5743

Changed 6 months 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.