[WIP] Fix "spack install" when using Python 3.8 on macos#14187
Closed
scheibelp wants to merge 46 commits intospack:developfrom
Closed
[WIP] Fix "spack install" when using Python 3.8 on macos#14187scheibelp wants to merge 46 commits intospack:developfrom
scheibelp wants to merge 46 commits intospack:developfrom
Conversation
…ined function into a top-level function def
…e__ to be pickle-able
…to the child process
…le-level function
…ain__ from subprocess execution
|
Just got hit by this bug today... installed Python 3 because I thought I've been using Python 2 for too long, then I was thinking for a second whether to choose 3.7.x or 3.8.1, and I finally went for 3.8.1. Then you run spack, and it gives precedence to Python 3 over the older 2, so bang, I hit the bug hard 🤣 ...if at least there was a way for telling spack to use Python 2... |
This reverts commit 31373e7.
…gic from package.py to installer.py)
…t FD to child process FD table
…s to multiprocessing.Process
…aturely. Saving them in __init__ prevents this although I don't know why
…ferent entities attempt to close the same FD)
… the requirement to make Spec and all associated objects pickle-able)
…at the spec is passed as a dictionary rather than an object
This reverts commit 8a584d2.
This reverts commit 998acd3.
…e now that the spec is passed as a dictionary rather than an object" This reverts commit 1dfaeac.
…ll avoid the requirement to make Spec and all associated objects pickle-able)" This reverts commit 727e70c.
… log_output context manager
1d0c44b to
9c45c80
Compare
9c45c80 to
ea094d5
Compare
…nstances of write_fd should result in the termination of the read end of the pipe
…rk is still used)
…thout changing the config, so logic has been added to properly reconstruct the RepoPath after forking the build process (before deserializing the package)
This reverts commit b1133fa.
Member
Author
|
Closing this for now to avoid confusion with #18205 (a more up-to-date version of this). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See: #14102
pickle may not work on locally-defined functions, including those created when running "spack install". This appears to have worked for versions of python before 3.8.0 but does not appear to work any longer (as shown in #14102).
This PR fixes the initial pickle error observed in #14102 by extracting the locally-defined function into a top-level function def.
(UPDATE 8/14/20) this currently avoids most pickling errors by serializing a Spec and passing it to
build_environment.forkrather than passing the Spec object itself. This works for all cases except forspack dev-buildwhich replaces the associatedpackage.stage.TODOs:
spack dev-buildwork with new changes