Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python wheel's macOS deployment target is incorrect #10799

Closed
bwoodsend opened this issue Oct 20, 2022 · 0 comments · Fixed by #10802
Closed

Python wheel's macOS deployment target is incorrect #10799

bwoodsend opened this issue Oct 20, 2022 · 0 comments · Fixed by #10802
Assignees
Labels
mac packaging & distribution platform related Any issue releated to specific platform or OS python

Comments

@bwoodsend
Copy link

What version of protobuf and what language are you using?
Version: 4.21.8
Language: Python

What operating system (Linux, Windows, ...) and version?
macOS 12.6 with M1 chip

What runtime / compiler are you using (e.g., python version or gcc version)
Python 3.9.9

What did you do?
Steps to reproduce the behavior:

# Download the latest protobuf wheel and unpack it 
$ pip download --no-deps protobuf
$ unzip protobuf-4.21.8-cp37-abi3-macosx_10_9_universal2.whl
# Check the deployment target of the x86_64 slice of the one compiled file it contains
$ otool -mcpu=x86_64 -l google/_upb/_message.abi3.so | grep minos 
    minos 11.3
    minos 11.3

What did you expect to see

The macOS deployment target (a.k.a. the minimum supported version of macOS that this library supports - -mmacosx-version-min parameter to clang) of the compiled extension module should match that which the .whl file's filename declares.

What did you see instead?

The wheel declares support for macOS >= 10.9 but google/_upb/_message.abi3.so is compiled only for macOS >= 11.3. This means that for any macOS user with macOS version >=10.9 and <11.3 who runs pip install protobuf, pip will happily install this wheel thinking that it's compatible when it might not be, potentially leading to messy symbol load errors or crashes at runtime.

Anything else we should know about your project / environment

Nope.

@bwoodsend bwoodsend added the untriaged auto added to all issues by default when created. label Oct 20, 2022
@zhangskz zhangskz added python mac packaging & distribution platform related Any issue releated to specific platform or OS labels Oct 20, 2022
deannagarcia added a commit that referenced this issue Oct 20, 2022
Update toolchain to target macosx 10.9 to fix #10799
@zhangskz zhangskz removed the untriaged auto added to all issues by default when created. label Oct 21, 2022
haberman pushed a commit that referenced this issue Oct 21, 2022
Update toolchain to target macosx 10.9 to fix #10799
haberman pushed a commit to haberman/protobuf that referenced this issue Oct 21, 2022
Update toolchain to target macosx 10.9 to fix protocolbuffers#10799
haberman added a commit that referenced this issue Oct 24, 2022
Update toolchain to target macosx 10.9 to fix #10799

Co-authored-by: deannagarcia <69992229+deannagarcia@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mac packaging & distribution platform related Any issue releated to specific platform or OS python
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants