From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73658 invoked by alias); 5 Jan 2017 23:53:29 -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 73639 invoked by uid 89); 5 Jan 2017 23:53:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy=H*Ad:U*libffi-discuss, xcode, H*r:sk:libffi-, settled X-HELO: mail-lf0-f44.google.com Received: from mail-lf0-f44.google.com (HELO mail-lf0-f44.google.com) (209.85.215.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Jan 2017 23:53:18 +0000 Received: by mail-lf0-f44.google.com with SMTP id d16so42980678lfb.1 for ; Thu, 05 Jan 2017 15:53:17 -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=XzhUBlvrt00Clb7QsuqQwu6hLhc0fBgqhDDSRbOJ/U0=; b=gFiDyOi+Kr8Alg6++hAXNNX0Dgvp1qVudCXgFm0NMBZTZxC+rZ0qEoyMA2Ilr9TL2X SkNi8pp98uZSLJRkwzsejHnM637KyH0wauy9XEVbGUVKAy6P4Skky4AfrdWf9S8EmuYY SeKODFElLP1gYTRk27Uepho4/tF72NIWIuDu7K4FQIXjs1Xzo+F1zGroiQ527ogGfCed 0WrXVhnJqeLLpO1ViMLOpokqB2NBXTPaxS1lQ2H+QkZGHkI6o7CjsHIHmaBR4FlAxLzu juHSxYSIf8i9ZUqvZ/uMQLpqmRPJU5e6FEr+ecB0wF8V+7tn1W7cxSwYuy0Dk4ySWsc6 MVPA== X-Gm-Message-State: AIkVDXJi6tIiHIxclqezg7qMXDIG2Qs3cgTe9KspesgguBANPgunIyvFGVFa2VHoK5yVlsUeXX1QugS1F1E2GA== X-Received: by 10.25.104.2 with SMTP id d2mr20862787lfc.95.1483660395885; Thu, 05 Jan 2017 15:53:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.24.78 with HTTP; Thu, 5 Jan 2017 15:53:15 -0800 (PST) In-Reply-To: References: From: Anthony Green Date: Thu, 05 Jan 2017 23:53:00 -0000 Message-ID: Subject: Re: Install public headers in the standard path? To: Chi-Hsuan Yen Cc: "libffi-discuss@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2017/txt/msg00000.txt.bz2 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. 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. 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