* Install public headers in the standard path?
@ 2016-11-15 12:10 Chi-Hsuan Yen
2017-01-05 23:53 ` Anthony Green
0 siblings, 1 reply; 3+ messages in thread
From: Chi-Hsuan Yen @ 2016-11-15 12:10 UTC (permalink / raw)
To: libffi-discuss
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Install public headers in the standard path?
2016-11-15 12:10 Install public headers in the standard path? Chi-Hsuan Yen
@ 2017-01-05 23:53 ` Anthony Green
2017-01-06 15:16 ` Chi-Hsuan Yen
0 siblings, 1 reply; 3+ messages in thread
From: Anthony Green @ 2017-01-05 23:53 UTC (permalink / raw)
To: Chi-Hsuan Yen; +Cc: libffi-discuss
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 <yan12125@gmail.com> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Install public headers in the standard path?
2017-01-05 23:53 ` Anthony Green
@ 2017-01-06 15:16 ` Chi-Hsuan Yen
0 siblings, 0 replies; 3+ messages in thread
From: Chi-Hsuan Yen @ 2017-01-06 15:16 UTC (permalink / raw)
To: Anthony Green; +Cc: libffi-discuss
On 6 January 2017 at 07:53, Anthony Green <green@moxielogic.com> 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 <yan12125@gmail.com> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-06 15:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-15 12:10 Install public headers in the standard path? Chi-Hsuan Yen
2017-01-05 23:53 ` Anthony Green
2017-01-06 15:16 ` Chi-Hsuan Yen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).