dev-lang/python-3.11.3: fix build on macOS.#29
dev-lang/python-3.11.3: fix build on macOS.#29biergaizi wants to merge 1 commit intogentoo:masterfrom
Conversation
|
hmmm, I'll rebuild on 13.3.1, but I'm sure this succeed fine yesterday |
|
ok, it still compiles for me |
How is it even possible when it has an unsatisfiable dependency |
|
you can just use |
|
I'm pretty sure that undefined I plan to rework on this pull request and update my patch to the upstream version. |
|
I think the difference is that I use a 12-based prefix on 13 still. |
Currently, dev-lang/python-3.11.3 is unbuildable on macOS due to GCC
incompatibility. There exists two "#ifdef" checks for the system calls
mkfifoat() and mknodat(), which are not compatible with GCC. Because
they're defined using the __builtin_available() function - specific to
clang without a fallback for GCC, they're never defined, thus creating
the following errors:
./Modules/posixmodule.c:15647:23: error: 'HAVE_MKFIFOAT_RUNTIME'
undeclared (first use in this function); did you mean
'HAVE_MKDIRAT_RUNTIME'?
./Modules/posixmodule.c:15651:22: error: 'HAVE_MKNODAT_RUNTIME'
undeclared (first use in this function); did you mean
'HAVE_MKDIRAT_RUNTIME'?
This bug [1] has already been reported to upstream with a patch [2]
waiting to be merged. This commit applies the upstream patch to add
the missing GCC fallbacks.
[1] python/cpython#104106
[2] python/cpython#104129
Closes: https://bugs.gentoo.org/905618
Signed-off-by: Yifeng Li <tomli@tomli.me>
I've updated the Pull Request with the new official upstream patch, please review the change again. |
|
I just realized that it has already been included into Gentoo Prefix Python patches-r1, no further change is needed. |
|
@grobian I found the patch you've just committed into the Prefix tree is broken, please fix it as soon as possible, see python/cpython#104129 (comment) for more information, thanks. The broken patch was committed into the Gentoo Prefix tree at 2023-05-04 07:33:30 UTC, meanwhile I already pointed out that the upstream patch is broken to the upstream Python developers at 2023-05-03 22:44:34 UTC, which was then fixed at 2023-05-04 01:17:25 UTC. It should've been preventable. |
Currently, dev-lang/python-3.11.3 is unbuildable on macOS for two reasons. First, due to a hardcoded dependency sys-apps/util-linux. This commit fixes it by conditionally requiring sys-apps/util-linux only on "kernel_linux".Another problem is that there exists two "#ifdef" checks for the system calls mkfifoat() and mknodat(), which are not compatible with GCC. Because they're defined using the __builtin_available() function - specific to clang without a fallback for GCC, they're never defined, thus creating the following errors:
These two checks were originally introduced to fix the problem that building Python on the macOS 13 SDK but running it on an earlier macOS version would result in a segfault. Since moving Gentoo Prefix in this manner is not supported, as a temporary fix, we simply revert this patch. Since this change only has an effect on macOS, it's safe to apply it without checking whether we're running on Darwin.
Closes: https://bugs.gentoo.org/905618