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

build fails with -DWITH_PYMALLOC_RADIX_TREE=0 #112867

Closed
doko42 opened this issue Dec 8, 2023 · 5 comments
Closed

build fails with -DWITH_PYMALLOC_RADIX_TREE=0 #112867

doko42 opened this issue Dec 8, 2023 · 5 comments
Assignees
Labels
build The build process and cross-build type-bug An unexpected behavior, bug, or error

Comments

@doko42
Copy link
Member

doko42 commented Dec 8, 2023

Bug report

Bug description:

bpo-37448 added a radix tree based memory map, also allowing to disable it:

To disable the radix tree map, set a preprocessor flag as follows:
-DWITH_PYMALLOC_RADIX_TREE=0.

However building with that fails:

In file included from ../Include/internal/pycore_interp.h:31,
                 from ../Include/internal/pycore_runtime.h:18,
                 from ../Include/internal/pycore_pystate.h:11,
                 from ../Modules/_asynciomodule.c:7:
../Include/internal/pycore_obmalloc.h:668:28: error: field 'usage' has incomplete type
  668 |     struct _obmalloc_usage usage;
      |                            ^~~~~

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Linked PRs

@doko42 doko42 added the type-bug An unexpected behavior, bug, or error label Dec 8, 2023
@AlexWaygood AlexWaygood added the build The build process and cross-build label Dec 8, 2023
@doko42
Copy link
Member Author

doko42 commented Dec 8, 2023

@ericsnowcurrently, this is probably not working since issue gh-81057

@doko42
Copy link
Member Author

doko42 commented Dec 8, 2023

looks like guarding the usage struct member with the same preprocessor define allows the build to succeed and also pass tests

nascheme added a commit to nascheme/cpython that referenced this issue Dec 8, 2023
The _obmalloc_usage structure is only defined if the obmalloc radix tree
is enabled.
nascheme added a commit that referenced this issue Dec 9, 2023
The _obmalloc_usage structure is only defined if the obmalloc radix tree
is enabled.
@hugovk
Copy link
Member

hugovk commented Dec 11, 2023

The PR has been merged 👍

Can we close this issue, or is there more to do? Do we need backports to 3.12 or 3.11?

@nascheme
Copy link
Member

It does not need a backport.

@nascheme
Copy link
Member

I'm wrong, needs backport to 3.12.

@nascheme nascheme reopened this Dec 13, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Dec 13, 2023
The _obmalloc_usage structure is only defined if the obmalloc radix tree
is enabled.
(cherry picked from commit 890ce43)

Co-authored-by: Neil Schemenauer <[email protected]>
nascheme added a commit to miss-islington/cpython that referenced this issue Dec 13, 2023
The _obmalloc_usage structure is only defined if the obmalloc radix tree
is enabled.
(cherry picked from commit 890ce43)

Co-authored-by: Neil Schemenauer <[email protected]>
nascheme added a commit that referenced this issue Dec 13, 2023
…3068)

gh-112867: fix for WITH_PYMALLOC_RADIX_TREE=0 (GH-112885)

The _obmalloc_usage structure is only defined if the obmalloc radix tree
is enabled.
(cherry picked from commit 890ce43)

Co-authored-by: Neil Schemenauer <[email protected]>
aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
The _obmalloc_usage structure is only defined if the obmalloc radix tree
is enabled.
Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
The _obmalloc_usage structure is only defined if the obmalloc radix tree
is enabled.
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 type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

4 participants