This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: undefined reference to _Py_ascii_whitespace
Type: compile error Stage:
Components: Windows Versions: Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: amaury.forgeotdarc Nosy List: amaury.forgeotdarc, schmir, vstinner
Priority: normal Keywords: patch

Created on 2008-10-14 13:39 by schmir, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
export_Py_ascii_whitespace.patch vstinner, 2008-10-14 14:26
Messages (5)
msg74743 - (view) Author: Ralf Schmitt (schmir) Date: 2008-10-14 13:39
unicodeobject.h contains the following code:

extern const unsigned char _Py_ascii_whitespace[];

#define Py_UNICODE_ISSPACE(ch) \
	((ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch))

When linking a module which uses the Py_UNICODE_ISSPACE macro, I get an
error "undefined reference to _Py_ascii_whitespace" (on windows using
the mingw compiler, linux works without problems).

The symbol should most probably be exported with the PyAPI_DATA macro...

This happens with python 2.6.
msg74744 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2008-10-14 14:26
You can try this patch for Python.
msg74748 - (view) Author: Ralf Schmitt (schmir) Date: 2008-10-14 15:04
I hope someone else can test this, as I don't feel like setting up a
windows build environment...
msg74771 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-10-14 21:39
This also happens with VS2008.
msg74772 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-10-14 22:01
Committed r66891 (trunk) and r66892 (release26-maint).
Thanks for the report and the patch!

In the meantime, you may use _PyUnicode_IsWhitespace(ch), like the 2.5 
version did.
History
Date User Action Args
2022-04-11 14:56:40adminsetgithub: 48372
2008-10-14 22:01:00amaury.forgeotdarcsetstatus: open -> closed
resolution: fixed
messages: + msg74772
2008-10-14 21:39:36amaury.forgeotdarcsetassignee: amaury.forgeotdarc
messages: + msg74771
nosy: + amaury.forgeotdarc
2008-10-14 15:04:11schmirsetmessages: + msg74748
2008-10-14 14:26:15vstinnersetfiles: + export_Py_ascii_whitespace.patch
keywords: + patch
messages: + msg74744
nosy: + vstinner
2008-10-14 13:39:08schmircreate