Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
8c6ba15 to
1e20c6f
Compare
0d98044 to
c0ee532
Compare
79e21bd to
a294ae1
Compare
c02be2c to
0ef4ea9
Compare
|
@Cyan4973 there is a musl workaround patch in this PR that may interest you. Our build environment is quite esoteric though (clang on ancient Debian), so please apply scrutiny. |
| pushd cpython-source-deps-zstd-${ZSTD_VERSION}/lib | ||
|
|
||
| if [ "${CC}" = "musl-clang" ]; then | ||
| # In order to build the library with SSE2, BMI, and AVX2 intrinstics, we need musl-clang to find |
There was a problem hiding this comment.
This is modeled off of
python-build-standalone/cpython-unix/build-cpython.sh
Lines 410 to 422 in 13731b0
There was a problem hiding this comment.
Annoyingly, I didn't realize this was the problem until I was pretty far in. We might want to generalize this at some point, e.g., by fixing musl-clang or rolling our own.
There was a problem hiding this comment.
Yeah I've been wanting to do that, filed #684.
On a separate note - I assume zstd is smart enough to correctly detect availability of the intrinsics and we don't need to patch these out for x86-64-v1? I guess put another way, do we have tests that our x86-64-v1 builds don't include things that aren't supported on that microarch? If not we should add some (either with objdump or I think qemu can do it with machine options).
There was a problem hiding this comment.
I assume zstd is smart enough to correctly detect availability of the intrinsics and we don't need to patch these out for x86-64-v1?
Things looked properly gated from the poking around I did to get this working. I don't know of explicit test coverage.
| pushd cpython-source-deps-zstd-${ZSTD_VERSION}/lib | ||
|
|
||
| if [ "${CC}" = "musl-clang" ]; then | ||
| # In order to build the library with SSE2, BMI, and AVX2 intrinstics, we need musl-clang to find |
There was a problem hiding this comment.
Yeah I've been wanting to do that, filed #684.
On a separate note - I assume zstd is smart enough to correctly detect availability of the intrinsics and we don't need to patch these out for x86-64-v1? I guess put another way, do we have tests that our x86-64-v1 builds don't include things that aren't supported on that microarch? If not we should add some (either with objdump or I think qemu can do it with machine options).
| done | ||
| EXTRA_TARGET_CFLAGS="${EXTRA_TARGET_CFLAGS} -I${TOOLS_PATH}/host/include/" | ||
|
|
||
| # `qsort_r` is not available in musl and the zstd source provides a fallback implementation, but |
There was a problem hiding this comment.
It's in 1.2.3, but I guess we're on 1.2.2 for compatibility with older systems of some sort?
There was a problem hiding this comment.
That's funny. Yeah we're on the oldest version we can use for compatibility with old systems since we dynamically link now. We can probably upgrade at some point though.
|
I guess the trouble here is that musl (intentionally) does not expose any sort of version information in headers, and so if you want to figure out whether the target musl supports |
This task was deferred from the initial Python 3.14 support. There's already support on Windows.