From e1f7fe2114739480a48fe12c39b23acf6fc86771 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Thu, 4 Jul 2019 18:32:36 +0100 Subject: 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. --- reproduce/software/make/python.mk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'reproduce/software') 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 -- cgit v1.2.1