You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I checked with buildbots that Python still builds successfully on FreeBSD. It did on the two FreeBSD buildbot workers. Problem: one FreeBSD worker failed to download code with Git and the build was marked as successful :-(
fatal: bad object refs/heads/refs/pull/28569
error: https://github.com/python/cpython.git did not send all necessary objects
(...)
fatal: failed to run reflog
error: task 'gc' failed
program finished with exit code 1
_POSIX_C_SOURCE=200809 sets __ISO_C_VISIBLE to 1999
<assert.h> does not define static_assert() if __ISO_C_VISIBLE is less than 2011 which is the case here!
In <sys/cdefs.h>, I don't see any value of _XOPEN_SOURCE or _POSIX_C_SOURCE which could give a C standard higher than 2008. It seems like _XOPEN_SOURCE and _POSIX_C_SOURCE should not be defined to get ISO C11 (which defines static_assert()).
But the Python build system is complex, and I'm not comfortable to remove _XOPEN_SOURCE and _POSIX_C_SOURCE from pyconfig.h on all BSD platforms. I don't know if it would drop support for old FreeBSD version or if it would break other BSD variants like OpenBSD and NetBSD.
An alternative would be to use _Static_assert(). It should work, but I like static_assert() syntax, and we may use other C11 features
tomorrow.
Another alternative is to define static_assert() in Python if it's not defined... but I dislike working around issues with system headers :-(
The text was updated successfully, but these errors were encountered:
Python 3.11 no longer builds on FreeBSD 12 since the commit 7cdaf87 that I made yesterday.
My change: #91730
I checked with buildbots that Python still builds successfully on FreeBSD. It did on the two FreeBSD buildbot workers. Problem: one FreeBSD worker failed to download code with Git and the build was marked as successful :-(
Successful build+test on FreeBSD:
git failed on the second job!
And now Python fails to build on "AMD64 FreeBSD Non-Debug 3.x" which runs FreeBSD 12.3: https://buildbot.python.org/all/#/builders/172/builds/1911
test.pythoninfo:
The problem is that `/usr/include/sys/cdefs.h
sets the ISO C standard to something older than
-std=c11`` command line.Reproducer, the 4 defines are copied from Python
pyconfig.h
:In <sys/cdefs.h>, I don't see any value of _XOPEN_SOURCE or _POSIX_C_SOURCE which could give a C standard higher than 2008. It seems like _XOPEN_SOURCE and _POSIX_C_SOURCE should not be defined to get ISO C11 (which defines static_assert()).
But the Python build system is complex, and I'm not comfortable to remove _XOPEN_SOURCE and _POSIX_C_SOURCE from pyconfig.h on all BSD platforms. I don't know if it would drop support for old FreeBSD version or if it would break other BSD variants like OpenBSD and NetBSD.
An alternative would be to use _Static_assert(). It should work, but I like static_assert() syntax, and we may use other C11 features
tomorrow.
Another alternative is to define static_assert() in Python if it's not defined... but I dislike working around issues with system headers :-(
The text was updated successfully, but these errors were encountered: