Cannot install it on Mac OSX (10.14.3 (18D109) Mojave)
m00zi opened this issue · 3 comments
does anyone knows how to install the japronto on MacOSX (10.14.3 (18D109) Mojave) ,
I am using Python 3.7.2, pip 19.0.3
I have tried the followings but all failed:
python3 -m pip install japronto
python3 -m pip3 install japronto
pip3 install japronto
pip install japronto
pip3 install japronto==0.1.2
pip install japronto==0.1.2
Output:
Collecting japronto
Could not find a version that satisfies the requirement japronto (from versions: )
No matching distribution found for japronto
pip3 install git+git://github.com/squeaky-pl/japronto.git@master
copying src/japronto/router/match_dict.c -> build/lib.macosx-10.9-x86_64-3.7/japronto/router
running build_ext
building 'src/picohttpparser/ssepicohttpparser.o'
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -msse4.2 -c -o src/picohttpparser/ssepicohttpparser.o src/picohttpparser/picohttpparser.c
src/picohttpparser/picohttpparser.c:224:13: warning: code will never be executed [-Wunreachable-code]
*ret = -2;
^
1 warning generated.
building 'src/picohttpparser/picohttpparser.o'
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -c -o src/picohttpparser/picohttpparser.o src/picohttpparser/picohttpparser.c
src/picohttpparser/picohttpparser.c:224:13: warning: code will never be executed [-Wunreachable-code]
*ret = -2;
^
1 warning generated.
building 'japronto.response.cresponse' extension
creating build/temp.macosx-10.9-x86_64-3.7
creating build/temp.macosx-10.9-x86_64-3.7/src
creating build/temp.macosx-10.9-x86_64-3.7/src/japronto
creating build/temp.macosx-10.9-x86_64-3.7/src/japronto/response
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DRESPONSE_OPAQUE=1 -DRESPONSE_CACHE=1 -I/private/var/folders/mb/2k8f_2k14sb1lfl8q0glbrx80000gn/T/pip-req-build-kfzao8b2/src/japronto -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/japronto/response/cresponse.c -o build/temp.macosx-10.9-x86_64-3.7/src/japronto/response/cresponse.o -std=c99 -UNDEBUG -D_GNU_SOURCE -frecord-gcc-switches
clang: error: unknown argument: '-frecord-gcc-switches'
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/mb/2k8f_2k14sb1lfl8q0glbrx80000gn/T/pip-req-build-kfzao8b2/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/mb/2k8f_2k14sb1lfl8q0glbrx80000gn/T/pip-record-jpfd1_3a/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/mb/2k8f_2k14sb1lfl8q0glbrx80000gn/T/pip-req-build-kfzao8b2/```
There are no binary wheels for OSX because I don't have access to OSX machine and it was impossible to build them on Travis last time.
From what I see here, seems that clang removed -frecord-gcc-switches
, this switch does not affect anything important (it just stored compiler switches in the binary). You can just clone the repository and edit it out and see if it compiles.
I have successfully build it by changing the if condition to add -frecord-gcc-switches
using sys.platform == 'darwin'.
I notice you had a "osx" branch, should I place pull request on that branch?
Btw, I am developing in MacOS ( Sierra 10.13.6 ), I would be able to help you compile binary wheels for MacOS if you still need it.
Thank you @theblackcat102.
It's fine on master, OSX branch was only for building wheels.