[MacPorts] #71206: python313 fails to build: error: static assertion failed: "assuming large file"
MacPorts
noreply at macports.org
Sat Nov 2 04:41:50 UTC 2024
#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 barracuda156):
Replying to [comment:2 jmroot]:
> It built on 10.6 i386. I can't test anything on ppc but feel free to
take it up with upstream.
Okay, this fixed it:
{{{
#if defined(__i386__) || defined(__ppc__)
#define statfs statfs64
#define fstatfs fstatfs64
#endif
}}}
Warnings, as expected, are there, but no more errors (and no extra flags,
just the patch above):
{{{
/opt/local/bin/gcc-mp-14 -fno-strict-overflow -Wsign-compare -fno-common
-dynamic -DNDEBUG -g -O3 -Wall -pipe -Os -arch ppc -std=c11 -Wextra
-Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes
-Werror=implicit-function-declaration -fvisibility=hidden
-I./Include/internal -I./Include/internal/mimalloc -I. -I./Include
-I/opt/local/include -DPy_BUILD_CORE_BUILTIN -c
./Modules/_localemodule.c -o Modules/_localemodule.o
./Modules/posixmodule.c: In function 'os_fstatvfs_impl':
./Modules/posixmodule.c:13351:9: warning: 'fstatfs64' is deprecated
[-Wdeprecated-declarations]
13351 | result = fstatfs(fd, &st);
| ^~~~~~
In file included from ./Modules/posixmodule.c:61:
/usr/include/sys/mount.h:362:9: note: declared here
362 | int fstatfs64(int, struct statfs64 *)
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5,__MAC_10_6,__IPHONE_NA,__IPHONE_NA);
| ^~~~~~~~~
./Modules/posixmodule.c: In function 'os_statvfs_impl':
./Modules/posixmodule.c:13405:9: warning: 'fstatfs64' is deprecated
[-Wdeprecated-declarations]
13405 | result = fstatfs(path->fd, &st);
| ^~~~~~
/usr/include/sys/mount.h:362:9: note: declared here
362 | int fstatfs64(int, struct statfs64 *)
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5,__MAC_10_6,__IPHONE_NA,__IPHONE_NA);
| ^~~~~~~~~
./Modules/posixmodule.c:13408:9: warning: 'statfs64' is deprecated
[-Wdeprecated-declarations]
13408 | result = statfs(path->narrow, &st);
| ^~~~~~
/usr/include/sys/mount.h:376:9: note: declared here
376 | int statfs64(const char *, struct statfs64 *)
__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5,__MAC_10_6,__IPHONE_NA,__IPHONE_NA);
| ^~~~~~~~
}}}
Now, the question is: is this correct solution?
This is the relevant header in the OS:
https://github.com/barracuda156/10.6-PowerPC-
SDKs/blob/main/MacOSX10.6.sdk/usr/include/sys/mount.h
P. S. I am not gonna try submitting a PR for any of the pythons, but
having a better fix for myself will be nice.
--
Ticket URL: <https://trac.macports.org/ticket/71206#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list