Chi-Hsuan Yen
2016-11-15 12:10:29 UTC
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
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