Installation issue on Mac (libstdc++ vs libc++)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- build-system, operating-systems
Research direction
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++".
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 490
- Forks
- 104
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from intake/python-snappy
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
intake/python-snappy#152 · 3 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
intake/python-snappy#151 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
intake/python-snappy#150 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
intake/python-snappy#147 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
intake/python-snappy#140 · 1 comment · 1 reaction ·
All issues in intake/python-snappy
Similar issues
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DiamondLightSource/dodal#2211 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openml/openml-python#1749 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sipyourdrink-ltd/bernstein#6191 ·