Installation issue on Mac (libstdc++ vs libc++)
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
调研方向
先从 setup.py 和安装日志中显示的 snappy/snappymodule.cc 构建路径入手,然后在不使用 workaround 的情况下重现 macOS 上的 pip 安装。完成的标准是扩展链接到 libc++,并且无需要求 CFLAGS="-stdlib=libc++" 即可成功安装 python-snappy。
由索引模型根据 Issue 内容生成。
描述
System Version: macOS 10.15.4 (19E287)
Kernel Version: Darwin 19.4.0
Xcode 11.4.1
Build version 11E503a
During pip install python-snappy, received:
Installing collected packages: python-snappy
Running setup.py install for python-snappy ... error
ERROR: Command errored out with exit status 1:
command: /Applications/miniconda3/envs/serialization-benchmarking/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/13/2dfbkf595fq1f1_5tjvzq35h0000gp/T/pip-install-nsuxlclp/python-snappy/setup.py'"'"'; __file__='"'"'/private/var/folders/13/2dfbkf595fq1f1_5tjvzq35h0000gp/T/pip-install-nsuxlclp/python-snappy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/13/2dfbkf595fq1f1_5tjvzq35h0000gp/T/pip-record-5g8l8mp0/install-record.txt --single-version-externally-managed --compile --install-headers /Applications/miniconda3/envs/serialization-benchmarking/include/python3.7m/python-snappy
cwd: /private/var/folders/13/2dfbkf595fq1f1_5tjvzq35h0000gp/T/pip-install-nsuxlclp/python-snappy/
Complete output (27 lines):
/Applications/miniconda3/envs/serialization-benchmarking/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'cffi_modules'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-3.7
creating build/lib.macosx-10.7-x86_64-3.7/snappy
copying snappy/snappy.py -> build/lib.macosx-10.7-x86_64-3.7/snappy
copying snappy/snappy_cffi.py -> build/lib.macosx-10.7-x86_64-3.7/snappy
copying snappy/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/snappy
copying snappy/hadoop_snappy.py -> build/lib.macosx-10.7-x86_64-3.7/snappy
copying snappy/snappy_formats.py -> build/lib.macosx-10.7-x86_64-3.7/snappy
copying snappy/__main__.py -> build/lib.macosx-10.7-x86_64-3.7/snappy
copying snappy/snappy_cffi_builder.py -> build/lib.macosx-10.7-x86_64-3.7/snappy
running build_ext
building 'snappy._snappy' extension
creating build/temp.macosx-10.7-x86_64-3.7
creating build/temp.macosx-10.7-x86_64-3.7/snappy
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Applications/miniconda3/envs/serialization-benchmarking/include -arch x86_64 -I/Applications/miniconda3/envs/serialization-benchmarking/include -arch x86_64 -I/Applications/miniconda3/envs/serialization-benchmarking/include/python3.7m -c snappy/snappymodule.cc -o build/temp.macosx-10.7-x86_64-3.7/snappy/snappymodule.o
clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Applications/miniconda3/envs/serialization-benchmarking/include -arch x86_64 -I/Applications/miniconda3/envs/serialization-benchmarking/include -arch x86_64 -I/Applications/miniconda3/envs/serialization-benchmarking/include/python3.7m -c snappy/crc32c.c -o build/temp.macosx-10.7-x86_64-3.7/snappy/crc32c.o
g++ -bundle -undefined dynamic_lookup -L/Applications/miniconda3/envs/serialization-benchmarking/lib -arch x86_64 -L/Applications/miniconda3/envs/serialization-benchmarking/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.7/snappy/snappymodule.o build/temp.macosx-10.7-x86_64-3.7/snappy/crc32c.o -lsnappy -o build/lib.macosx-10.7-x86_64-3.7/snappy/_snappy.cpython-37m-darwin.so
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'g++' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Applications/miniconda3/envs/serialization-benchmarking/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/13/2dfbkf595fq1f1_5tjvzq35h0000gp/T/pip-install-nsuxlclp/python-snappy/setup.py'"'"'; __file__='"'"'/private/var/folders/13/2dfbkf595fq1f1_5tjvzq35h0000gp/T/pip-install-nsuxlclp/python-snappy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/13/2dfbkf595fq1f1_5tjvzq35h0000gp/T/pip-record-5g8l8mp0/install-record.txt --single-version-externally-managed --compile --install-headers /Applications/miniconda3/envs/serialization-benchmarking/include/python3.7m/python-snappy Check the logs for full command output.
Fixed using: CFLAGS="-stdlib=libc++" pip install python-snappy
- 主要语言
- Python
- 星标
- 490
- 派生
- 104
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
intake/python-snappy 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
intake/python-snappy#152 · 3 条评论 ·
-
难度 5/5 一周以上 新手友好度 35/100
intake/python-snappy#151 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
intake/python-snappy#150 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
intake/python-snappy#147 · 3 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
intake/python-snappy#140 · 1 条评论 · 1 个 reaction ·
查看 intake/python-snappy 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
gradio-app/gradio#13895 ·
维护者通常 1 天内回复
-
build-error
难度 2/5 1-3 小时 新手友好度 76/100
spack/spack-packages#6713 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
ActivityWatch/activitywatch#1464 · 1 个 reaction ·
维护者通常 1 天内回复
-
[Bug]: The ckg tool drops the return type of every decorated Python method in class search results 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
bytedance/trae-agent#483 ·
维护者通常 1 天内回复