Skip to content
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

undefined reference to _Py_ascii_whitespace #48372

Closed
schmir mannequin opened this issue Oct 14, 2008 · 5 comments
Closed

undefined reference to _Py_ascii_whitespace #48372

schmir mannequin opened this issue Oct 14, 2008 · 5 comments
Assignees
Labels
build The build process and cross-build OS-windows

Comments

@schmir
Copy link
Mannequin

schmir mannequin commented Oct 14, 2008

BPO 4122
Nosy @amauryfa, @vstinner
Files
  • export_Py_ascii_whitespace.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/amauryfa'
    closed_at = <Date 2008-10-14.22:01:00.965>
    created_at = <Date 2008-10-14.13:39:08.257>
    labels = ['build', 'OS-windows']
    title = 'undefined reference to _Py_ascii_whitespace'
    updated_at = <Date 2008-10-14.22:01:00.964>
    user = 'https://bugs.python.org/schmir'

    bugs.python.org fields:

    activity = <Date 2008-10-14.22:01:00.964>
    actor = 'amaury.forgeotdarc'
    assignee = 'amaury.forgeotdarc'
    closed = True
    closed_date = <Date 2008-10-14.22:01:00.965>
    closer = 'amaury.forgeotdarc'
    components = ['Windows']
    creation = <Date 2008-10-14.13:39:08.257>
    creator = 'schmir'
    dependencies = []
    files = ['11789']
    hgrepos = []
    issue_num = 4122
    keywords = ['patch']
    message_count = 5.0
    messages = ['74743', '74744', '74748', '74771', '74772']
    nosy_count = 3.0
    nosy_names = ['amaury.forgeotdarc', 'vstinner', 'schmir']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue4122'
    versions = ['Python 2.6']

    @schmir
    Copy link
    Mannequin Author

    schmir mannequin commented Oct 14, 2008

    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.

    @schmir schmir mannequin added OS-windows build The build process and cross-build labels Oct 14, 2008
    @vstinner
    Copy link
    Member

    You can try this patch for Python.

    @schmir
    Copy link
    Mannequin Author

    schmir mannequin commented Oct 14, 2008

    I hope someone else can test this, as I don't feel like setting up a
    windows build environment...

    @amauryfa
    Copy link
    Member

    This also happens with VS2008.

    @amauryfa amauryfa self-assigned this Oct 14, 2008
    @amauryfa
    Copy link
    Member

    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    build The build process and cross-build OS-windows
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants