Dear more experienced people,
I am trying to install Python on a Linux cluster, running RHEL7.
I need this to work two specific modules. One is Open3d, and the other is ctypes.
Open3d requires a Python version earlier than 3.8. Recommended is 3.7.7, so I am using that one.
I also really need the ctypes module for a specific user, so I need to link to libffi which contains ctypes.
I have compiled libffi-dev and get libraries and header files and everything.
When I try to compile Python, I use the following configure script to point to those libffi library and header files:
./configure \
--prefix=/trinity/opt/apps/software/python/open3D/Python-3.7.7/build \
--with-openssl=/trinity/opt/apps/software/openSSL/openssl-1.1.1u/build \
--with-libs=/trinity/opt/apps/software/libffi/libffi-3.4.2/build/lib64/libffi.a \
--without-system-ffi \
CFLAGS="-I/trinity/opt/apps/software/openSSL/openssl-1.1.1u/build/include \
-I/trinity/opt/apps/software/libffi/libffi-3.4.2/build/include" \
LDFLAGS="-L/trinity/opt/apps/software/openSSL/openssl-1.1.1u/build/lib \
-L/trinity/opt/apps/software/libffi/libffi-3.4.2/build/lib64"
(it also needs openSSL for pip to work, hence those extra paths). make gives among much else:
INFO: Could not locate ffi libs and/or headers
Failed to build these modules:
_ctypes
If I look in setup.py to see where this message comes from, I see:
def configure_ctypes(self, ext):
if not self.use_system_libffi:
if host_platform == 'darwin':
return self.configure_ctypes_darwin(ext)
print('INFO: Could not locate ffi libs and/or headers')
return False
return True
Which appears to hint that Python requires to have use_system_libffi on, and even though I do not have it explicitly enabled in my configure script, config.log says it is turned on:
configure:10351: checking for --with-system-ffi
configure:10375: result: yes
I am at a loss as to what else I can do to have Python locate the libffi stuff.
What is the standard way to do this? What am I doing wrong?
Thank you very much for your time and expertise.