On Thu, Jan 09, 2025, Adrien Nader wrote: > There is another FTBFS due to SWIG reading sys/select.h with openssl 3.4 > and for that I don't have a good solution but only a work-around to be > applied to openssl: > https://git.launchpad.net/ubuntu/+source/openssl/tree/debian/patches/Revert-When-defining-ossl_ssize_t-ssize_t-remember-t.patch
OK, I took another look and, as I mention in https://github.com/swig/swig/issues/2167#issuecomment-2579809596 , it's possible to shadow the system header that pulls everything else. The approach is: mkdir system_shadowing mkdir system_shadowing/sys touch system_shadowing/sys/types.h swig -Ishadowing ... And the way to change the swig invocation is with the diff below: diff --git a/setup.py b/setup.py index a5b6e96..e71ef0c 100644 --- a/setup.py +++ b/setup.py @@ -141,6 +141,8 @@ class _M2CryptoBuildExt(build_ext.build_ext): log.debug('self.openssl_path = %s', self.openssl_path) log.debug('self.bundledlls = %s', self.bundledlls) + self.swig_opts.append('-Isystem_shadowing') + # swig seems to need the default header file directories self.swig_opts.extend(['-I%s' % i for i in _get_additional_includes()]) I have several things on the backburner so I'm not preparing a full debdiff for now. -- Adrien