intake / intake/python-snappy

Installation issue on Mac (libstdc++ vs libc++)

Đang mở
#92 0 bình luận 2 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
490
Fork
104
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

```
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`

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start with setup.py and the snappy/snappymodule.cc build path shown in the installation log, then reproduce the macOS pip install without the workaround. Done means the extension links against libc++ and python-snappy installs successfully without requiring CFLAGS="-stdlib=libc++".

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
cpp, macos, python
Lĩnh vực
build-system, operating-systems
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.