[MacPorts] #71206: python313 fails to build: error: static assertion failed: "assuming large file"
MacPorts
noreply at macports.org
Sat Jan 4 23:09:41 UTC 2025
#71206: python313 fails to build: error: static assertion failed: "assuming large
file"
---------------------------+-------------------------------------
Reporter: barracuda156 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.10.2
Resolution: | Keywords: tiger, leopard, powerpc
Port: python313 |
---------------------------+-------------------------------------
Comment (by kencu):
working around the missing {{{<libproc.h}}} turned out to be quite easy:
{{{
$ port -v installed python313
The following ports are currently installed:
python313 @3.13.1_0 (active) requested_variants='' platform='darwin 8'
archs='ppc' date='2025-01-04T14:42:56-0800'
}}}
but needs some testing.
Here is the patch:
{{{
$ cat patch-python313-tiger.diff
diff --git Modules/_testexternalinspection.c
Modules/_testexternalinspection.c
index 2a665af..fb584f8 100644
--- Modules/_testexternalinspection.c
+++ Modules/_testexternalinspection.c
@@ -17,10 +17,18 @@
#if defined(__APPLE__)
# include <TargetConditionals.h>
+# include <AvailabilityMacros.h>
// Older macOS SDKs do not define TARGET_OS_OSX
# if !defined(TARGET_OS_OSX)
# define TARGET_OS_OSX 1
# endif
+
+// Tiger does not have libproc, so use the non-osx fallback
+# if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
+# undefine TARGET_OS_OSX
+# define TARGET_OS_OSX 0
+# endif
+
# if TARGET_OS_OSX
# include <libproc.h>
# include <mach-o/fat.h>
diff --git Modules/posixmodule.c Modules/posixmodule.c
index 42efe4b..21e1ebf 100644
--- Modules/posixmodule.c
+++ Modules/posixmodule.c
@@ -13238,7 +13238,7 @@ _pystatvfs_fromstructstatfs(PyObject *module,
struct statfs st) {
flags |= ST_NOSUID;
}
- _Static_assert(sizeof(st.f_blocks) == sizeof(long long), "assuming
large file");
+ /* _Static_assert(sizeof(st.f_blocks) == sizeof(long long), "assuming
large file"); */
#define SET_ITEM(SEQ, INDEX, EXPR) \
do { \
}}}
--
Ticket URL: <https://trac.macports.org/ticket/71206#comment:13>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list