Skip to content

cant install on OSX Maverick (10.9.5) python 3.4.3 #69

Closed

Description

@sejans

After pip install python-rapidjson
The following output happens
Collecting python-rapidjson
Using cached python-rapidjson-0.0.11.tar.gz
Installing collected packages: python-rapidjson
Running setup.py install for python-rapidjson ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 -u -c "import setuptools, tokenize;file='/private/var/folders/cm/dwsx5_yn5p92nzfyrn8g68wr0000gn/T/pip-build-4fiy0ttq/python-rapidjson/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /var/folders/cm/dwsx5_yn5p92nzfyrn8g68wr0000gn/T/pip-8yx2m6bb-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'rapidjson' extension
creating build
creating build/temp.macosx-10.6-intel-3.4
creating build/temp.macosx-10.6-intel-3.4/python-rapidjson
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I./rapidjson/include -I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -c ./python-rapidjson/rapidjson.cpp -o build/temp.macosx-10.6-intel-3.4/./python-rapidjson/rapidjson.o -pedantic
In file included from /Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/Python.h:78,
from ./python-rapidjson/rapidjson.cpp:1:
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/longobject.h:88: error: ISO C++ does not support 'long long'
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/longobject.h:89: error: ISO C++ does not support 'long long'
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/longobject.h:90: error: ISO C++ does not support 'long long'
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/longobject.h:91: error: ISO C++ does not support 'long long'
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/longobject.h:92: error: ISO C++ does not support 'long long'
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/longobject.h:93: error: ISO C++ does not support 'long long'
In file included from ./rapidjson/include/rapidjson/writer.h:21,
from ./python-rapidjson/rapidjson.cpp:11:
./rapidjson/include/rapidjson/internal/dtoa.h:32: warning: unknown option after '#pragma GCC diagnostic' kind
In file included from /Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/Python.h:78,
from ./python-rapidjson/rapidjson.cpp:1:
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/longobject.h:88: error: ISO C++ does not support 'long long'
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/longobject.h:89: error: ISO C++ does not support 'long long'
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/longobject.h:90: error: ISO C++ does not support 'long long'
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/longobject.h:91: error: ISO C++ does not support 'long long'
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/longobject.h:92: error: ISO C++ does not support 'long long'
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/longobject.h:93: error: ISO C++ does not support 'long long'
In file included from ./rapidjson/include/rapidjson/writer.h:21,
from ./python-rapidjson/rapidjson.cpp:11:
./rapidjson/include/rapidjson/internal/dtoa.h:32: warning: unknown option after '#pragma GCC diagnostic' kind
fatal error: /Library/Developer/CommandLineTools/usr/bin/lipo: can't figure out the architecture type of: /var/folders/cm/dwsx5_yn5p92nzfyrn8g68wr0000gn/T//cccQX3Nv.out
error: command 'gcc-4.2' failed with exit status 1

----------------------------------------

Command "/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 -u -c "import setuptools, tokenize;file='/private/var/folders/cm/dwsx5_yn5p92nzfyrn8g68wr0000gn/T/pip-build-4fiy0ttq/python-rapidjson/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /var/folders/cm/dwsx5_yn5p92nzfyrn8g68wr0000gn/T/pip-8yx2m6bb-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/cm/dwsx5_yn5p92nzfyrn8g68wr0000gn/T/pip-build-4fiy0ttq/python-rapidjson/


Have tried to uninstall XCode and install Command Line tools, didnt help.
Currently

gcc --version

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix

Activity

  1. sejans commented on Mar 19, 2017

    @sejans
    Author

    I added in setup.py the following line, and it installed - but is it correct way?
    extension_options['extra_compile_args'] = ['-pedantic', '-Wno-long-long']

    If yes - the issue can be closed

  2. lelit commented on Mar 20, 2017

    @lelit
    Contributor

    I do not have Macs around to test, so I'd say that option should not have nasty side effects.
    Does the compiled library works as expected? It would be great if you could execute the test suite to assert that...

    If it help, I can easily add the -Wno-long-long option, maybe conditionated by sys.platform: what does the following emit on that system?

    >>> import sys
    >>> print(sys.platform)
    

    I guess darwin, am I correct?

  3. sejans commented on Mar 21, 2017

    @sejans
    Author

    Very similar error happened on Linux as well
    Ubuntu 14.04.5 LTS (GNU/Linux 2.6.32-26-pve x86_64)

    Here is output
    `Downloading/unpacking python-rapidjson
    Downloading python-rapidjson-0.0.11.tar.gz (154kB): 154kB downloaded
    Running setup.py (path:/tmp/pip_build_root/python-rapidjson/setup.py) egg_info for package python-rapidjson
    /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'
    warnings.warn(msg)

    warning: no previously-included files found matching '.gitmodules'
    warning: no files found matching '*.png' under directory 'docs'
    warning: no files found matching '*.bat' under directory 'docs'
    warning: no files found matching '*.sh' under directory 'docs'
    warning: no files found matching '*.css' under directory 'docs'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'rapidjson'
    

    Installing collected packages: python-rapidjson
    Running setup.py install for python-rapidjson
    building 'rapidjson' extension
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I./rapidjson/include -I/usr/include/python3.4m -c ./python-rapidjson/rapidjson.cpp -o build/temp.linux-x86_64-3.4/./python-rapidjson/rapidjson.o -pedantic
    cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]
    In file included from /usr/include/python3.4m/Python.h:50:0,
    from ./python-rapidjson/rapidjson.cpp:1:
    /usr/include/python3.4m/pyport.h:58:27: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
    #define PY_LONG_LONG long long
    ^
    /usr/include/python3.4m/longobject.h:88:44: note: in expansion of macro 'PY_LONG_LONG'
    PyAPI_FUNC(PyObject *) PyLong_FromLongLong(PY_LONG_LONG);
    ^
    /usr/include/python3.4m/pyport.h:58:27: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
    #define PY_LONG_LONG long long
    ^
    /usr/include/python3.4m/longobject.h:89:61: note: in expansion of macro 'PY_LONG_LONG'
    PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLongLong(unsigned PY_LONG_LONG);
    ^
    In file included from /usr/include/python3.4m/Python.h:50:0,
    from ./python-rapidjson/rapidjson.cpp:1:
    /usr/include/python3.4m/pyport.h:58:27: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
    #define PY_LONG_LONG long long
    ^
    /usr/include/python3.4m/pyport.h:771:34: note: in definition of macro 'PyAPI_FUNC'
    # define PyAPI_FUNC(RTYPE) RTYPE
    ^
    /usr/include/python3.4m/longobject.h:90:12: note: in expansion of macro 'PY_LONG_LONG'
    PyAPI_FUNC(PY_LONG_LONG) PyLong_AsLongLong(PyObject *);
    ^
    /usr/include/python3.4m/pyport.h:58:27: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
    #define PY_LONG_LONG long long
    ^
    /usr/include/python3.4m/pyport.h:771:34: note: in definition of macro 'PyAPI_FUNC'
    # define PyAPI_FUNC(RTYPE) RTYPE
    ^
    /usr/include/python3.4m/longobject.h:91:21: note: in expansion of macro 'PY_LONG_LONG'
    PyAPI_FUNC(unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLong(PyObject *);
    ^
    /usr/include/python3.4m/pyport.h:58:27: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
    #define PY_LONG_LONG long long
    ^
    /usr/include/python3.4m/pyport.h:771:34: note: in definition of macro 'PyAPI_FUNC'
    # define PyAPI_FUNC(RTYPE) RTYPE
    ^
    /usr/include/python3.4m/longobject.h:92:21: note: in expansion of macro 'PY_LONG_LONG'
    PyAPI_FUNC(unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLongMask(PyObject *);
    ^
    /usr/include/python3.4m/pyport.h:58:27: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
    #define PY_LONG_LONG long long
    ^
    /usr/include/python3.4m/pyport.h:771:34: note: in definition of macro 'PyAPI_FUNC'
    # define PyAPI_FUNC(RTYPE) RTYPE
    ^
    /usr/include/python3.4m/longobject.h:93:12: note: in expansion of macro 'PY_LONG_LONG'
    PyAPI_FUNC(PY_LONG_LONG) PyLong_AsLongLongAndOverflow(PyObject , int );
    ^
    x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/./python-rapidjson/rapidjson.o -o build/lib.linux-x86_64-3.4/rapidjson.cpython-34m.so
    /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'
    warnings.warn(msg)

    warning: no previously-included files found matching '.gitmodules'
    warning: no files found matching '*.png' under directory 'docs'
    warning: no files found matching '*.bat' under directory 'docs'
    warning: no files found matching '*.sh' under directory 'docs'
    warning: no files found matching '*.css' under directory 'docs'
    no previously-included directories found matching 'docs/_build'
    

    Successfully installed python-rapidjson
    Cleaning up...`

    However as you can see the last lines tell that package successfully installed, so in Linux case these were warning, but on OSX case they were errors.

    sys.platform is darwin!
    currently package is working well on OSX and Linux

    p.s. on OSX El Capitan and OSX Sierra - there were no problems installing package (no long long warnings)

  4. added a commit that references this issue on Mar 21, 2017
  5. lelit commented on Mar 21, 2017

    @lelit
    Contributor

    Since apparently it does not hurt, I added the option unconditionally, let's see.

  6. lelit commented on Mar 21, 2017

    @lelit
    Contributor

    Thank you!

  7. sejans commented on Mar 25, 2017

    @sejans
    Author

    ok then i close the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions