Skip to content

bpo-44394: Ensure libexpat is linked against libm #28617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1767,7 +1767,9 @@ def detect_expat_elementtree(self):
('XML_POOR_ENTROPY', '1'),
]
extra_compile_args = []
expat_lib = []
# bpo-44394: libexpact uses isnan() of math.h and needs linkage
# against the libm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like it's a recent libexpact change, in version 2.4.0: libexpat/libexpat#511

I don't know if it's worth mentioning it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, I think is good since is the one we use currently in all branches

expat_lib = ['m']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind to add a comment mentioning "bpo-44394: " and explaining that libexpact uses isnan() of math.h?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

expat_sources = ['expat/xmlparse.c',
'expat/xmlrole.c',
'expat/xmltok.c']
Expand Down