From f02e26e023a6f4f598f39a4009c0e09251802e80 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Wed, 29 Sep 2021 13:22:27 +0100 Subject: [PATCH 1/2] bpo-44394: Ensure libexpat is linked against libm --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9e411cb35e00bd..8d00b08f78b841 100644 --- a/setup.py +++ b/setup.py @@ -1767,7 +1767,7 @@ def detect_expat_elementtree(self): ('XML_POOR_ENTROPY', '1'), ] extra_compile_args = [] - expat_lib = [] + expat_lib = ['m'] expat_sources = ['expat/xmlparse.c', 'expat/xmlrole.c', 'expat/xmltok.c'] From 121de762b9692100bb4da34fe63e5f1a83608d0a Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Wed, 29 Sep 2021 13:32:02 +0100 Subject: [PATCH 2/2] fixup! bpo-44394: Ensure libexpat is linked against libm --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 8d00b08f78b841..9e71a223c0aabd 100644 --- a/setup.py +++ b/setup.py @@ -1767,6 +1767,8 @@ def detect_expat_elementtree(self): ('XML_POOR_ENTROPY', '1'), ] extra_compile_args = [] + # bpo-44394: libexpact uses isnan() of math.h and needs linkage + # against the libm expat_lib = ['m'] expat_sources = ['expat/xmlparse.c', 'expat/xmlrole.c',