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

gh-112532: Fix peg generator build.py for mimalloc build #113492

Merged
merged 1 commit into from
Dec 26, 2023

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Dec 26, 2023

@corona10 corona10 requested a review from colesbury December 26, 2023 17:28
@corona10 corona10 changed the title gh-112532: Fix peg generator for mimalloc build gh-112532: Fix peg generator build.py for mimalloc build Dec 26, 2023
@corona10
Copy link
Member Author

@colesbury

AS-IS

➜  cpython git:(main) ✗ ./python.exe -m test test_peg_generator
Using random seed: 2669052678
Raised RLIMIT_NOFILE: 256 -> 1024
0:00:00 load avg: 3.38 Run 1 test sequentially
0:00:00 load avg: 3.38 [1/1] test_peg_generator
/Users/user/oss/cpython/build/test_python_worker_29863æ/tempcwd/venv/lib/python3.13/site-packages/pip/_internal/metadata/importlib/_envs.py:111: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pip._vendor.pkg_resources import find_distributions
Processing /Users/user/oss/cpython/Lib/test/setuptools-67.6.1-py3-none-any.whl
/Users/user/oss/cpython/build/test_python_worker_29863æ/tempcwd/venv/lib/python3.13/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
Processing /Users/user/oss/cpython/Lib/test/wheel-0.40.0-py3-none-any.whl
Installing collected packages: wheel, setuptools
/Users/user/oss/cpython/build/test_python_worker_29863æ/tempcwd/venv/lib/python3.13/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
Successfully installed setuptools-67.6.1 wheel-0.40.0
In file included from /Users/user/oss/cpython/Python/Python-ast.c:6:
In file included from /Users/user/oss/cpython/Include/internal/pycore_ceval.h:13:
In file included from /Users/user/oss/cpython/Include/internal/pycore_interp.h:32:
In file included from /Users/user/oss/cpython/Include/internal/pycore_tstate.h:11:
/Users/user/oss/cpython/Include/internal/pycore_mimalloc.h:32:10: fatal error: 'mimalloc.h' file not found
#include "mimalloc.h"
         ^~~~~~~~~~~~
1 error generated.
In file included from /Users/user/oss/cpython/Python/Python-ast.c:6:
In file included from /Users/user/oss/cpython/Include/internal/pycore_ceval.h:13:
In file included from /Users/user/oss/cpython/Include/internal/pycore_interp.h:32:
In file included from /Users/user/oss/cpython/Include/internal/pycore_tstate.h:11:
/Users/user/oss/cpython/Include/internal/pycore_mimalloc.h:32:10: fatal error: 'mimalloc.h' file not found
#include "mimalloc.h"
         ^~~~~~~~~~~~
1 error generated.
In file included from /Users/user/oss/cpython/Python/Python-ast.c:6:
In file included from /Users/user/oss/cpython/Include/internal/pycore_ceval.h:13:
In file included from /Users/user/oss/cpython/Include/internal/pycore_interp.h:32:
In file included from /Users/user/oss/cpython/Include/internal/pycore_tstate.h:11:
/Users/user/oss/cpython/Include/internal/pycore_mimalloc.h:32:10: fatal error: 'mimalloc.h' file not found
#include "mimalloc.h"
         ^~~~~~~~~~~~
1 error generated.
In file included from /Users/user/oss/cpython/Python/Python-ast.c:6:
In file included from /Users/user/oss/cpython/Include/internal/pycore_ceval.h:13:
In file included from /Users/user/oss/cpython/Include/internal/pycore_interp.h:32:
In file included from /Users/user/oss/cpython/Include/internal/pycore_tstate.h:11:
/Users/user/oss/cpython/Include/internal/pycore_mimalloc.h:32:10: fatal error: 'mimalloc.h' file not found
#include "mimalloc.h"
         ^~~~~~~~~~~~
1 error generated.
In file included from /Users/user/oss/cpython/Python/Python-ast.c:6:
In file included from /Users/user/oss/cpython/Include/internal/pycore_ceval.h:13:
In file included from /Users/user/oss/cpython/Include/internal/pycore_interp.h:32:
In file included from /Users/user/oss/cpython/Include/internal/pycore_tstate.h:11:
/Users/user/oss/cpython/Include/internal/pycore_mimalloc.h:32:10: fatal error: 'mimalloc.h' file not found
#include "mimalloc.h"
         ^~~~~~~~~~~~
1 error generated.
In file included from /Users/user/oss/cpython/Python/Python-ast.c:6:
In file included from /Users/user/oss/cpython/Include/internal/pycore_ceval.h:13:
In file included from /Users/user/oss/cpython/Include/internal/pycore_interp.h:32:
In file included from /Users/user/oss/cpython/Include/internal/pycore_tstate.h:11:
/Users/user/oss/cpython/Include/internal/pycore_mimalloc.h:32:10: fatal error: 'mimalloc.h' file not found
#include "mimalloc.h"
         ^~~~~~~~~~~~
1 error generated.
In file included from /Users/user/oss/cpython/Python/Python-ast.c:6:
In file included from /Users/user/oss/cpython/Include/internal/pycore_ceval.h:13:
In file included from /Users/user/oss/cpython/Include/internal/pycore_interp.h:32:
In file included from /Users/user/oss/cpython/Include/internal/pycore_tstate.h:11:
/Users/user/oss/cpython/Include/internal/pycore_mimalloc.h:32:10: fatal error: 'mimalloc.h' file not found
#include "mimalloc.h"
         ^~~~~~~~~~~~
1 error generated.
In file included from /Users/user/oss/cpython/Python/Python-ast.c:6:
In file included from /Users/user/oss/cpython/Include/internal/pycore_ceval.h:13:
In file included from /Users/user/oss/cpython/Include/internal/pycore_interp.h:32:
In file included from /Users/user/oss/cpython/Include/internal/pycore_tstate.h:11:
/Users/user/oss/cpython/Include/internal/pycore_mimalloc.h:32:10: fatal error: 'mimalloc.h' file not found
#include "mimalloc.h"
         ^~~~~~~~~~~~
1 error generated.
In file included from /Users/user/oss/cpython/Python/Python-ast.c:6:
In file included from /Users/user/oss/cpython/Include/internal/pycore_ceval.h:13:
In file included from /Users/user/oss/cpython/Include/internal/pycore_interp.h:32:
In file included from /Users/user/oss/cpython/Include/internal/pycore_tstate.h:11:
/Users/user/oss/cpython/Include/internal/pycore_mimalloc.h:32:10: fatal error: 'mimalloc.h' file not found
#include "mimalloc.h"

TO-BE

➜  cpython git:(gh-112532-fix) ✗ ./python.exe -m test test_peg_generator
Using random seed: 3314716989
Raised RLIMIT_NOFILE: 256 -> 1024
0:00:00 load avg: 3.00 Run 1 test sequentially
0:00:00 load avg: 3.00 [1/1] test_peg_generator
/Users/user/oss/cpython/build/test_python_worker_29244æ/tempcwd/venv/lib/python3.13/site-packages/pip/_internal/metadata/importlib/_envs.py:111: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pip._vendor.pkg_resources import find_distributions
Processing /Users/user/oss/cpython/Lib/test/setuptools-67.6.1-py3-none-any.whl
/Users/user/oss/cpython/build/test_python_worker_29244æ/tempcwd/venv/lib/python3.13/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
Processing /Users/user/oss/cpython/Lib/test/wheel-0.40.0-py3-none-any.whl
Installing collected packages: wheel, setuptools
/Users/user/oss/cpython/build/test_python_worker_29244æ/tempcwd/venv/lib/python3.13/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
Successfully installed setuptools-67.6.1 wheel-0.40.0
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: -undefined dynamic_lookup may not work with chained fixups

== Tests result: SUCCESS ==

1 test OK.

Total duration: 14.3 sec
Total tests: run=92
Total test files: run=1/1
Result: SUCCESS

@corona10 corona10 added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 26, 2023
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @corona10 for commit 3f91a0b 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 26, 2023
Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

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

I assume we can do this unconditionally on the mimalloc build no?

@corona10
Copy link
Member Author

I assume we can do this unconditionally on the mimalloc build no?

Or we can use support.with_mimalloc(), but not a good use case for this script.

@pablogsal
Copy link
Member

Nah is fine, just wanted to ensure that the header include is correct independently if we have mimalloc or not

Copy link
Contributor

@colesbury colesbury left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this.

Yeah, I think the include path is fine even if we are not compiling with mimalloc support.

@corona10
Copy link
Member Author

corona10 commented Dec 26, 2023

We always include mimalloc headers through makefile.pre.in, so it's technically fine.

cpython/Makefile.pre.in

Lines 1795 to 1800 in acf3bcc

$(srcdir)/Include/cpython/warnings.h \
$(srcdir)/Include/cpython/weakrefobject.h \
\
$(MIMALLOC_HEADERS) \
\
$(srcdir)/Include/internal/pycore_abstract.h \

@corona10 corona10 merged commit e5cce70 into python:main Dec 26, 2023
46 of 73 checks passed
@corona10 corona10 deleted the gh-112532-fix branch December 27, 2023 02:49
kulikjak pushed a commit to kulikjak/cpython that referenced this pull request Jan 22, 2024
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants