python: disable _ssl.c build when --disable-ssl
PATCH 1/1 python: disable _ssl.c build when --disable-ssl
From: Adam <[email protected]>
When --disable-ssl is provided as an option,
prevent the building of _ssl.c.
Without this change, some GCC toolchains fail
to build the _ssl module depending on the
build configuration
(we observed 4.85 worked and 4.9.4).
--- package/python/111-optional-ssl.patch | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
package/python/111-optional-ssl.patch +19 -1
@@ -4,7 +4,8 @@ Signed-off-by: Thomas Petazzoni <[email protected]> --- configure.in | 6 ++++++ - 1 file changed, 6 insertions(+) + setup.py | 4 ++++ + 2 files changed, 10 insertions(+) Index: b/configure.ac ===================================================================
@@ -23,3 +24,20 @@ Index: b/configure.ac AC_ARG_ENABLE(dbm, AS_HELP_STRING([--disable-dbm], [disable DBM]), [ if test "$enableval" = "no"; then + +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -806,6 +806,10 @@ + '/usr/contrib/ssl/lib/' + ] ) + ++ if '--disable-ssl' in sysconfig.get_config_var("CONFIG_ARGS"): ++ ssl_incs = None ++ ssl_libs = None ++ + if (ssl_incs is not None and + ssl_libs is not None): + exts.append( Extension('_ssl', ['_ssl.c'], +
Signature · 1 line
1.9.1
PATCH 1/1 python: disable _ssl.c build when --disable-ssl
Quoted 9 lines · Matt Weber
From: Adam <[email protected]>
When --disable-ssl is provided as an option,
prevent the building of_ssl.c.
Without this change, some GCC toolchains fail
to build the_sslmodule depending on the
build configuration
(we observed 4.85 worked and 4.9.4).
Quoted 5 lines
Signed-off-by Adam Allison <[email protected]>Signed-off-by Matt Weber <[email protected]>--- package/python/111-optional-ssl.patch | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
I sent a patch doing the same thing, which was marked as superseeded in patchwork: https://patchwork.ozlabs.org/patch/696139/
PATCH 1/1 python: disable _ssl.c build when --disable-ssl
In reply to Matt WeberHello,
Quoted 11 lines · Matt Weber
From: Adam <[email protected]>
When --disable-ssl is provided as an option,
prevent the building of_ssl.c.
Without this change, some GCC toolchains fail
to build the_sslmodule depending on the
build configuration
(we observed 4.85 worked and 4.9.4).Signed-off-by Adam Allison <[email protected]>Signed-off-by Matt Weber <[email protected]>
Thanks for this patch. However I fixed it in a different/simpler way in commit
https://git.buildroot.org/buildroot/commit/package/python?id=3c98442669f173818a8cce9479ebb0806cb9f8a2
Let me know if that works for you.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 python: disable _ssl.c build when --disable-ssl
Adam
On Mar 9, 2017 5:04 PM, "Thomas Petazzoni" <
[email protected]> wrote:
Hello,
Quoted 11 lines · Matt Weber
From: Adam <[email protected]>
When --disable-ssl is provided as an option,
prevent the building of_ssl.c.
Without this change, some GCC toolchains fail
to build the_sslmodule depending on the
build configuration
(we observed 4.85 worked and 4.9.4).Signed-off-by Adam Allison <[email protected]>Signed-off-by Matt Weber <[email protected]>
Thanks for this patch. However I fixed it in a different/simpler way in commit
https://git.buildroot.org/buildroot/commit/package/python?id=3c98442669f173818a8cce9479ebb0806cb9f8a2
Let me know if that works for you.
Adam, do you have a test you could run? It looks fine to me but I can't
test.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170310/9309ed6b/attachment.html>
A message that is not in the archive (sent off-list or not yet received): CAO1odpw8E=b2eTsVX8vCjhUF_vpg34WJvUxCKGCm+p0OSMsdkw@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): CAO1odpzng87mcYwEFs72B9bRTdLgewtGscH1GsuEAyndOVuntw@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): CAO1odpzB59BT3cgh3AVznLzcWz+nShYsok1GqEv_SV9N3wXbLA@mail.gmail.com
PATCH 1/1 python: disable _ssl.c build when --disable-ssl
Hello,
Quoted 7 lines · Adam Allison
Ok, I guess my browser took a dump, and send the message early.
In
setup.py, it will pull in hashlib if 'have_any_openssl' and 'have_usable_openssl' is true.The old patch forced those to be false.
This one (cleaner), but thesetup.pywill have to change as well.
Could you explain in more details what Buildroot configuration you're using, the problem you're seeing, and what you're expecting to see instead?
Notice that there is a different option for hashlib, BR2_PACKAGE_PYTHON_HASHLIB, and it was very recently fixed to really disable hashlib when disabled (commit
https://git.buildroot.org/buildroot/commit/?id=bc3e1fb22ef641916938fff76bef10a1347ef0f7).
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com