diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-07-04 18:32:36 +0100 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-07-04 18:32:36 +0100 |
commit | e1f7fe2114739480a48fe12c39b23acf6fc86771 (patch) | |
tree | 5de352c4f8494cfe6f54d82ff864221f9c43504a /reproduce | |
parent | 18075553ffe57be314b9f4804a56055acfdb3b48 (diff) |
libffi always installed in the lib directory
On some Fedora systems, libffi installs under `lib64', not `lib'. As a
result, Python's Setuptools can't find it and will not built (complaining
about not finding the `_ctypes' module).
With this commit, we fix this problem by explicitly putting a copy of
libffi's installed libraries within the `lib' directory.
This issue was found while testing the pipeline with Elham Saremi and Hamed
Altafi.
Diffstat (limited to 'reproduce')
-rw-r--r-- | reproduce/software/make/python.mk | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/reproduce/software/make/python.mk b/reproduce/software/make/python.mk index 65d28de..22b668f 100644 --- a/reproduce/software/make/python.mk +++ b/reproduce/software/make/python.mk @@ -225,8 +225,18 @@ $(pytarballs): $(tdir)/%: # While this Makefile is for Python programs, in some cases, we need # certain programs (like Python itself), or libraries for the modules. $(ibidir)/libffi: $(tdir)/libffi-$(libffi-version).tar.gz + + # On some Fedora systems, libffi installs in `lib64', not + # `lib'. This will cause problems when building setuptools + # later. To fix this problem, we'll first check if this has indeed + # happened (it exists under `lib64', but not under `lib'). If so, + # we'll put a copy of the installed libffi libraries in `lib'. $(call gbuild, $<, libffi-$(libffi-version)) \ - echo "Libffi $(libffi-version)" > $@ + && if [ -f $(idir)/lib64/libffi.a ] \ + && [ ! $(idir)/lib/libffi.a ]; then \ + cp $(idir)/lib64/libffi* $(ildir)/; \ + fi \ + && echo "Libffi $(libffi-version)" > $@ $(ibidir)/python: $(tdir)/python-$(python-version).tar.gz \ $(ibidir)/libffi |