From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50507 invoked by alias); 6 Jan 2017 15:16:50 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 50417 invoked by uid 89); 6 Jan 2017 15:16:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:U*libffi-discuss, xcode, H*r:sk:libffi-, settled X-HELO: mail-qk0-f179.google.com Received: from mail-qk0-f179.google.com (HELO mail-qk0-f179.google.com) (209.85.220.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Jan 2017 15:16:39 +0000 Received: by mail-qk0-f179.google.com with SMTP id a20so78037824qkc.1 for ; Fri, 06 Jan 2017 07:16:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yEooG42J1cnz96rvA2r4ul97/MreYcqqBWGv7gcNZqQ=; b=VMQNgcRVdjtteFto+XsUM2feJOpPZ8qx81sU689Xzcbf+cPSNwH90FobdRARxMOwBN qwYxzjw/KU2/4OjvF6pRZmWXPrYcX8SNf8ayPOefYV4d39rWjG2s8IceHSAgMgGnjW/C Qde98qi9o0lIiosdApgwUE5z3VDzmOiOaGECDvcR5kyos7eur22wvgmRzXPI8c2DMmPP z8cd0Hlkgwu6Kaxkgdfausxet/Z1nIwzlGhIeDNSV0eHwxg9n4hP/ZTqzboNQN1/VsvH VJPXMqIc/zCN79QlgVF3nxJk4C3M9sbJIInjiwxlw5JT1e29gkojtMrhjqat+yhpZt89 Dfdw== X-Gm-Message-State: AIkVDXIEzdFQFKPr/rUokjmYGogciN8g8VAPEnOMwkflPC0jlowI4+P+DI0lruoXvcTx0EHuqRpcIP04j7BilQ== X-Received: by 10.55.107.4 with SMTP id g4mr41035625qkc.75.1483715797188; Fri, 06 Jan 2017 07:16:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.144.99 with HTTP; Fri, 6 Jan 2017 07:16:36 -0800 (PST) In-Reply-To: References: From: Chi-Hsuan Yen Date: Fri, 06 Jan 2017 15:16:00 -0000 Message-ID: Subject: Re: Install public headers in the standard path? To: Anthony Green Cc: "libffi-discuss@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2017/txt/msg00001.txt.bz2 On 6 January 2017 at 07:53, Anthony Green wrote: > Thanks for your patch. > > If you can believe it, installing certain headers under /usr/lib was a > thing back in the mid/late 90s (gnome, or gtk, or similar did this as > well). libffi headers are modified at configure time, and the > thinking back then was that the contents of /usr/include should not > vary based on configuration changes (or even on per-host basis). > Also, using pkg-config made it easy to install multiple versions of > libffi as the ABI hadn't settled down yet. > Thanks for clarification. The original decision looks much reasonable now! > A few years ago I sat down to rewrite the headers to depend solely on > compiler-defined macros, but got lost in the maze of Power > alternatives. Every other port was fairly straight forward - but > Power was a mess. > > I'm OK with moving the headers to /usr/include now, although it would > have been nice to remove the configure-time dependencies from them > first. > Did you mean eliminating the process of ffi.h.in -> ffi.h? I guess it can be resolved by distributing fficonfig.h as well. Lots of autotools-based projects do similar. For example, CPython distributes /usr/include/python3.6m/pyconfig.h. > AG > > > > On Tue, Nov 15, 2016 at 7:10 AM, Chi-Hsuan Yen wrote: >> Hello libffi enthusiasts, >> >> Currently libffi public headers are installed in >> $PREFIX/lib/libffi-3.x.y/include. The only reliable approach to get >> the include path is via pkg-config. There are some disadvantages: >> >> 1. pkg-config is tricky in terms of cross-compilation. To cross-build >> libffi clients, PKG_CONFIG_LIBDIR, PKG_CONFIG_SYSROOT_DIR, >> PKG_CONFIG_ALLOW_SYSTEM_{CFLAGS,LIBS} may be involved to make it >> working >> >> 2. pkg-config does not come with macOS. Recently CPython is seeking >> for chances to drop bundled libffi copy. [1] However, CPython core >> developers are against including additional tools other than >> XCode/Command Line Tools in CPython build time requirements >> >> There are some more discussions here: >> https://github.com/libffi/libffi/issues/258 >> >> As a result, I suggest to move header files to conventional >> $PREFIX/include, so that libffi clients can have simpler build >> systems. >> >> Here's my implementation: https://github.com/libffi/libffi/pull/288 >> >> Any ideas? >> >> Best, >> >> Yen, Chi-Hsuan >> >> [1] http://bugs.python.org/issue28491