Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd:4:18: error: unknown enumerated scalar #332

Closed
blazehu opened this issue Mar 29, 2019 · 1 comment

Comments

@blazehu
Copy link

blazehu commented Mar 29, 2019

I try to install ujson on my mac
Environment:
mac 10.14.3
python 3.7.2

Looking in indexes: http://pypi.douban.com/simple
Collecting ujson
  Downloading http://pypi.doubanio.com/packages/16/c4/79f3409bc710559015464e5f49b9879430d8f87498ecdc335899732e5377/ujson-1.35.tar.gz (192kB)
    100% |████████████████████████████████| 194kB 509kB/s
Installing collected packages: ujson
  Running setup.py install for ujson ... error
    Complete output from command /Users/huyuhan/.pyenv/versions/3.7.2/envs/sanic_demo/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/67/375276sx6hv0nln1whwm5syh0000gn/T/pip-install-ua8r4a3f/ujson/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/67/375276sx6hv0nln1whwm5syh0000gn/T/pip-record-ygmo4al4/install-record.txt --single-version-externally-managed --compile --install-headers /Users/huyuhan/.pyenv/versions/3.7.2/envs/sanic_demo/include/site/python3.7/ujson:
    Warning: 'classifiers' should be a list, got type 'filter'
    running install
    running build
    running build_ext
    building 'ujson' extension
    creating build
    creating build/temp.macosx-10.14-x86_64-3.7
    creating build/temp.macosx-10.14-x86_64-3.7/python
    creating build/temp.macosx-10.14-x86_64-3.7/lib
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I./python -I./lib -I/Users/huyuhan/.pyenv/versions/3.7.2/envs/sanic_demo/include -I/Users/huyuhan/.pyenv/versions/3.7.2/include/python3.7m -c ./python/ujson.c -o build/temp.macosx-10.14-x86_64-3.7/./python/ujson.o -D_GNU_SOURCE
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I./python -I./lib -I/Users/huyuhan/.pyenv/versions/3.7.2/envs/sanic_demo/include -I/Users/huyuhan/.pyenv/versions/3.7.2/include/python3.7m -c ./python/objToJSON.c -o build/temp.macosx-10.14-x86_64-3.7/./python/objToJSON.o -D_GNU_SOURCE
    ./python/objToJSON.c:154:11: warning: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        char *data = PyUnicode_AsUTF8AndSize(obj, &len);
              ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 warning generated.
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I./python -I./lib -I/Users/huyuhan/.pyenv/versions/3.7.2/envs/sanic_demo/include -I/Users/huyuhan/.pyenv/versions/3.7.2/include/python3.7m -c ./python/JSONtoObj.c -o build/temp.macosx-10.14-x86_64-3.7/./python/JSONtoObj.o -D_GNU_SOURCE
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I./python -I./lib -I/Users/huyuhan/.pyenv/versions/3.7.2/envs/sanic_demo/include -I/Users/huyuhan/.pyenv/versions/3.7.2/include/python3.7m -c ./lib/ultrajsonenc.c -o build/temp.macosx-10.14-x86_64-3.7/./lib/ultrajsonenc.o -D_GNU_SOURCE
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I./python -I./lib -I/Users/huyuhan/.pyenv/versions/3.7.2/envs/sanic_demo/include -I/Users/huyuhan/.pyenv/versions/3.7.2/include/python3.7m -c ./lib/ultrajsondec.c -o build/temp.macosx-10.14-x86_64-3.7/./lib/ultrajsondec.o -D_GNU_SOURCE
    creating build/lib.macosx-10.14-x86_64-3.7
    clang -bundle -undefined dynamic_lookup -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib -L/Users/huyuhan/.pyenv/versions/3.7.2/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib -L/Users/huyuhan/.pyenv/versions/3.7.2/lib build/temp.macosx-10.14-x86_64-3.7/./python/ujson.o build/temp.macosx-10.14-x86_64-3.7/./python/objToJSON.o build/temp.macosx-10.14-x86_64-3.7/./python/JSONtoObj.o build/temp.macosx-10.14-x86_64-3.7/./lib/ultrajsonenc.o build/temp.macosx-10.14-x86_64-3.7/./lib/ultrajsondec.o -o build/lib.macosx-10.14-x86_64-3.7/ujson.cpython-37m-darwin.so
    ld: malformed file
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd:4:18: error: unknown enumerated scalar
    platform:        zippered
                     ^~~~~~~~
     file '/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd'
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command 'clang' failed with exit status 1

    ----------------------------------------
Command "/Users/huyuhan/.pyenv/versions/3.7.2/envs/sanic_demo/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/67/375276sx6hv0nln1whwm5syh0000gn/T/pip-install-ua8r4a3f/ujson/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/67/375276sx6hv0nln1whwm5syh0000gn/T/pip-record-ygmo4al4/install-record.txt --single-version-externally-managed --compile --install-headers /Users/huyuhan/.pyenv/versions/3.7.2/envs/sanic_demo/include/site/python3.7/ujson" failed with error code 1 in /private/var/folders/67/375276sx6hv0nln1whwm5syh0000gn/T/pip-install-ua8r4a3f/ujson/
@ScienceIsNeato
Copy link

If you are running on Mojave, you will need to install the MacOS headers in the base system:

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants