-
-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package libffi #25900
Comments
This comment has been minimized.
This comment has been minimized.
Branch: u/jdemeyer/package_libffi |
Commit: |
New commits:
|
comment:4
ok, should be good. Tested on my machine with py2 (and py3 also). Let's ask the buildbots. |
Reviewer: Frédéric Chapoton |
comment:5
Afaik libffi has been a de facto dependency of ecl (and, therefore, Sage) for a long time. We could just document said dependency... On a side note, the cygwin patchbot is unhappy with it |
comment:6
The only problem with the patchbot is that it was unable to find the tarball. Normally, with tickets that add new packages, it's supposed to be able to parse out the path to the source tarball from the ticket description, but that seems to have failed in this case. I'll look into why. AFAIK libffi works fine on Cygwin--I have used it there plenty myself (and have even fixed some bugs in it :) |
comment:7
Let me test on Cygwin though before setting this to positive review. |
comment:9
Replying to @vbraun:
I'm fine with adding an spkg for it. I think there should be one as some libffi versions do have bugs that could theoretically affect us. But I do think there should be a configure-time check for it to avoid needlessly installing the spkg. I would like to start adding this for all new packages. For now it could go directly in |
comment:10
If ECL really required libffi, I'm sure that we would have noticed by now. For example, I have a system where Python 3.7 failed to build because libffi wasn't installed. But this problem did not occur for ECL. Erik: this ticket had positive_review and it's a dependency for Python 3.7. So it's fine if you want to add the logic to check for a system-wide install, but please don't stall this ticket. |
comment:11
I'm only stalling it to check that it actually works on Cygwin. I'm happy to add the system check either now, or as a separate ticket. I'd like to discuss making this required for adding any new spkgs, though since we haven't actually done that yet I won't hold this up over that. |
comment:12
Any news? |
comment:13
I'll try it today or tomorrow--soon as I'm done testing 8.4.beta1 on my Windows build. |
comment:14
Odd that libffi puts its headers in |
comment:15
Could you add something like: diff --git a/configure.ac b/configure.ac
index 5a830e5..a31b53b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -435,6 +435,12 @@ AC_CACHE_CHECK([for curl 7.22], [ac_cv_path_CURL], [
[need_to_install_curl=yes; ac_cv_path_CURL=no])])
+# Only install libffi if needed; if found, we also check for its headers
+# below
+need_to_install_libffi=no
+AC_SEARCH_LIBS([ffi_call], [ffi], [], [need_to_install_libffi=yes])
+
+
###############################################################################
# Check header files
###############################################################################
@@ -446,6 +452,12 @@ then
AC_CHECK_HEADER([curl/curl.h], [], [need_to_install_curl=yes])
fi
+# If libffi is installed, we need to check for the ffi.h header file too.
+if test $need_to_install_libffi = no;
+then
+ AC_CHECK_HEADERS([ffi.h ffi/ffi.h], [break], [need_to_install_libffi=yes])
+fi
+
# complex.h is one that might not exist on older systems.
AC_LANG(C++)
AC_CHECK_HEADER([complex.h],[],[ ? Otherwise, seems fine to me. I haven't tested this against Python 3.7 itself yet, but that has other build problems on Cygwin I need to work on. If any further libffi-related problems come up in the context of building Python we can deal with it there. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:18
Erik, I added the new-style configure check. Does this look correct to you? |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:20
Retargeting some of my tickets. |
comment:21
Replying to @jdemeyer:
Sorry, I didn't see your update before. I haven't tested, but it looks good to me in principle. If we need to make the check any more specific we can do that later (e.g. there could be bugs with older libffi versions, but I'm not worried about that unless it is found to actually affect someone's system). |
Changed reviewer from Frédéric Chapoton to Frédéric Chapoton, Erik Bray |
Changed branch from u/jdemeyer/package_libffi to |
comment:23
some issue arise from this ticket both on gentoo and ubuntu:
|
Changed commit from |
This is required for compiling Python 3.7
Tarball: ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz
CC: @embray
Component: packages: standard
Author: Jeroen Demeyer
Branch:
e45cf27
Reviewer: Frédéric Chapoton, Erik Bray
Issue created by migration from https://trac.sagemath.org/ticket/25900
The text was updated successfully, but these errors were encountered: