Skip to content

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

Merged
tiran merged 3 commits into
python:mainfrom
tiran:bpo-45582-getpath_h
Dec 3, 2021
Merged

tiran merged 3 commits into
python:mainfrom
tiran:bpo-45582-getpath_h

Conversation

@tiran

@tiran tiran commented Dec 3, 2021 •

Copy link
Copy Markdown
Member
  • 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

arhadthedev commented Dec 3, 2021 •

Copy link
Copy Markdown
Member

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

tiran commented Dec 3, 2021

Copy link
Copy Markdown
Member Author

@zooba Please take a look

@zooba

zooba commented Dec 3, 2021 •

Copy link
Copy Markdown
Member

@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

tiran commented Dec 3, 2021

Copy link
Copy Markdown
Member Author

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

tiran commented Dec 3, 2021

Copy link
Copy Markdown
Member Author
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 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
Copy Markdown

⚠️⚠️⚠️ 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

5 participants