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

bpo-45582: Fix out-of-tree build issues with new getpath (GH-29902) #29902

Merged
merged 3 commits into from
Dec 3, 2021

Conversation

tiran
Copy link
Member

@tiran tiran commented Dec 3, 2021

  • Create getpath.h in builddir tree instead of srcdir tree
  • Move getpath.h to Python/frozen_modules so it gets removed on
    make clean and to make it more obvious that it is a frozen file.
  • Add dependency on header files
  • Remove target body from getpath_noop.o so it uses the .c.o:
    template

https://bugs.python.org/issue45582

* Create getpath.h in builddir tree instead of srcdir tree
* Move getpath.h to Python/frozen_modules so it gets removed on
 ``make clean`` and to make it more obvious that it is a frozen file.
* Add dependency on header files
* Remove target body from getpath_noop.o so it uses the ``.c.o:``
  template
@arhadthedev
Copy link
Member

arhadthedev commented Dec 3, 2021

Since getpath.h is moved to Python/frozen_modules, the following .gitignore line should be updated accordingly:

Modules/getpath.h

Edit: or removed since the directory is already covered by

Python/frozen_modules/*.h

@tiran tiran force-pushed the bpo-45582-getpath_h branch from f86d836 to d97c697 Compare December 3, 2021 08:58
@tiran tiran requested a review from a team as a code owner December 3, 2021 09:04
@tiran tiran force-pushed the bpo-45582-getpath_h branch from 784e107 to cd85c8f Compare December 3, 2021 09:21
@tiran
Copy link
Member Author

tiran commented Dec 3, 2021

@zooba Please take a look

@zooba
Copy link
Member

zooba commented Dec 3, 2021

@tiran Looks fine. Out of interest, which bit fixes the out-of-tree issues? I only see changes moving where the generated file goes (which in my defence, changed three times while I was working on that PR 😆 )


Edit Found it - removing the $(srcdir) in the output of the freeze_module call

@tiran
Copy link
Member Author

tiran commented Dec 3, 2021

Edit Found it - removing the $(srcdir) in the output of the freeze_module call

Yes, the getpath.h is no longer in $srcdir.

I'm working on CI for OOT builds: #29904

@tiran
Copy link
Member Author

tiran commented Dec 3, 2021

Programs/_freeze_module getpath /home/runner/work/cpython/cpython-ro-srcdir/Modules/getpath.py /home/runner/work/cpython/cpython-ro-srcdir/Modules/getpath.h
cannot open '/home/runner/work/cpython/cpython-ro-srcdir/Modules/getpath.h' for writing

@tiran tiran changed the title bpo-45582: Fix out-of-tree build issues with new getpath bpo-45582: Fix out-of-tree build issues with new getpath (GH-29902) Dec 3, 2021
@tiran tiran merged commit ccb73a0 into python:main Dec 3, 2021
@tiran tiran deleted the bpo-45582-getpath_h branch December 3, 2021 13:47
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Arch Linux Asan 3.x has failed when building commit ccb73a0.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/582/builds/780) and take a look at the build logs.
  4. Check if the failure is related to this commit (ccb73a0) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/582/builds/780

Summary of the results of the build (if available):

Click to see traceback logs
Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.asan/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_94cc1f9a'


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.asan/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_eb85fb01'


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.asan/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_cae77419'

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.

5 participants