You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Gentoo Linux cffi recipe host install fails with the error below:
c/_cffi_backend.c:13:17: fatal error: ffi.h: No such file or directory
Detailed description
This is because ffi.h is installed in /usr/lib64/libffi-3.2.1/include/ffi.h which is not part of gcc default include paths.
Here is where ffi.h is installed (equery f is the Gentoo equivalent to Debian-like dpkg -L):
$ equery f dev-libs/libffi | grep ffi.h
/usr/lib64/libffi-3.2.1/include/ffi.h
We could update current disable-pkg-config.patch to try to run, but except silently. That way if dpkg-config is available on the host, we can use it, but it won't fail if not.
dpkg-config recipe
Since cffi is not the first package, nor the last needing dpkg-config, we could create a recipe for it to make it available for the target architecture. https://autotools.io/pkgconfig/cross-compiling.html
Install libffi recipe for the host
I'm not too sure about that one, but the idea would be to update the libffi recipe so it also makes the library/headers available for the host so we could point to it. But it could be a mess.
Final word
I have a preference for the "dpkg-config when possible (i.e. host)" solution. It seems easy enough to implement and it would fix the issue. For the long run I prefer if we had dpkg-config available for the target, but I'm not sure how achievable it is.
I would be glad to contribute more to python-for-android, so please let me know which solution you prefer and I could work on a pull request when I get time.
The text was updated successfully, but these errors were encountered:
Problem summary
On Gentoo Linux
cffi
recipe host install fails with the error below:Detailed description
This is because
ffi.h
is installed in/usr/lib64/libffi-3.2.1/include/ffi.h
which is not part of gcc default include paths.Here is where
ffi.h
is installed (equery f
is the Gentoo equivalent to Debian-likedpkg -L
):Or with
dpkg-config
:And here are the gcc default include paths:
Complete error output
Below is the detailed
buildozer android debug
(cffi) output log:Solutions / workarounds
Below are few solutions/workarounds I had in mind.
Quick'n dirty
Symlink libffi includes to gcc default include path:
While it works it's an unsatisfying solution.
dpkg-config
when possible (i.e. host)We could update current disable-pkg-config.patch to
try
to run, butexcept
silently. That way ifdpkg-config
is available on the host, we can use it, but it won't fail if not.dpkg-config
recipeSince
cffi
is not the first package, nor the last needingdpkg-config
, we could create a recipe for it to make it available for the target architecture.https://autotools.io/pkgconfig/cross-compiling.html
Install
libffi
recipe for the hostI'm not too sure about that one, but the idea would be to update the
libffi
recipe so it also makes the library/headers available for the host so we could point to it. But it could be a mess.Final word
I have a preference for the "
dpkg-config
when possible (i.e. host)" solution. It seems easy enough to implement and it would fix the issue. For the long run I prefer if we haddpkg-config
available for the target, but I'm not sure how achievable it is.I would be glad to contribute more to python-for-android, so please let me know which solution you prefer and I could work on a pull request when I get time.
The text was updated successfully, but these errors were encountered: