diff options
author | Kai Kang <kai.kang@windriver.com> | 2021-06-24 16:32:04 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-06-28 09:02:47 -0700 |
commit | cff3116f665c2d17f6a6ae9bbe61025c88da99c0 (patch) | |
tree | 02fccc2ac1bc74c19208fb71611aa0891eb5931d /meta-python/recipes-devtools/python/python3-m2crypto | |
parent | 264616fa0d735d0ee5b0c7f461c80cee0453fda4 (diff) | |
download | meta-openembedded-cff3116f665c2d17f6a6ae9bbe61025c88da99c0.tar.gz |
python3-m2crypto: avoid host contamination for swig
If the version of libssl-dev is not match the version of libssl on the
build machine, it fails to compile SWIG/_m2crypto_wrap.c which is
created by swig for python3-m2crypto-native:
| SWIG/_m2crypto_wrap.c:9757:19: error: dereferencing pointer to
incomplete type 'struct stack_st'
| if (arg1) (arg1)->num = arg2;
| ^~
But it works if no libssl-dev installed on the build machine.
Export STAGING_DIR to make existing patch
0001-setup.py-link-in-sysroot-not-in-host-directories.patch work. And
filter out '/usr/inlucde' from include pathes of swig.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-m2crypto')
-rw-r--r-- | meta-python/recipes-devtools/python/python3-m2crypto/avoid-host-contamination.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto/avoid-host-contamination.patch b/meta-python/recipes-devtools/python/python3-m2crypto/avoid-host-contamination.patch new file mode 100644 index 0000000000..9d9b8449ba --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-m2crypto/avoid-host-contamination.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Filter out '/usr/include' for swig to avoid host contamination issue. | ||
2 | |||
3 | Upstream-Status: Upstream-Status: Inappropriate [cross compile specific] | ||
4 | |||
5 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
6 | --- | ||
7 | setup.py | 3 ++- | ||
8 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
9 | |||
10 | diff --git a/setup.py b/setup.py | ||
11 | index 5a12981..389d49f 100644 | ||
12 | --- a/setup.py | ||
13 | +++ b/setup.py | ||
14 | @@ -153,7 +153,8 @@ class _M2CryptoBuildExt(build_ext.build_ext): | ||
15 | self.swig_opts.append('-py3') | ||
16 | |||
17 | # swig seems to need the default header file directories | ||
18 | - self.swig_opts.extend(['-I%s' % i for i in _get_additional_includes()]) | ||
19 | + self.swig_opts.extend(['-I%s' % i for i in _get_additional_includes() | ||
20 | + if i != '/usr/include']) | ||
21 | |||
22 | log.debug('self.include_dirs = %s', self.include_dirs) | ||
23 | log.debug('self.library_dirs = %s', self.library_dirs) | ||