Created
August 14, 2022 17:57
-
-
Save karthicraghupathi/e656d3d8ba6e5ea0aae75afc2745bb10 to your computer and use it in GitHub Desktop.
Installing Python 3.6.15 on PopOS / Ubuntu 22.04 via pyenv - Segmentation fault (core dumped) make: *** [Makefile:1102: install] Error 139
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
--- Include/objimpl.h | |
+++ Include/objimpl.h | |
@@ -250,7 +250,7 @@ | |
union _gc_head *gc_prev; | |
Py_ssize_t gc_refs; | |
} gc; | |
- double dummy; /* force worst-case alignment */ | |
+ long double dummy; /* force worst-case alignment */ | |
} PyGC_Head; | |
extern PyGC_Head *_PyGC_generation0; | |
--- Objects/obmalloc.c | |
+++ Objects/obmalloc.c | |
@@ -643,8 +643,8 @@ | |
* | |
* You shouldn't change this unless you know what you are doing. | |
*/ | |
-#define ALIGNMENT 8 /* must be 2^N */ | |
-#define ALIGNMENT_SHIFT 3 | |
+#define ALIGNMENT 16 /* must be 2^N */ | |
+#define ALIGNMENT_SHIFT 4 | |
/* Return the number of bytes in size class I, as a uint. */ | |
#define INDEX2SIZE(I) (((uint)(I) + 1) << ALIGNMENT_SHIFT) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on the question and solution at pyenv/pyenv#1889 (comment).
To use this patch with
asdf-python
, run the following command: