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

unable to compile jsonobject-0.9.10 for python 3.10 #184

Closed
mpavlase opened this issue Nov 16, 2021 · 3 comments · Fixed by #186
Closed

unable to compile jsonobject-0.9.10 for python 3.10 #184

mpavlase opened this issue Nov 16, 2021 · 3 comments · Fixed by #186

Comments

@mpavlase
Copy link

I'm not able to install jsonobject-0.9.10 at Windows 10 😞 for Python 3.10 (Python 3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)] on win32). I've tried it from venv (py -3.10 -m venv venv). Just note, there is no problem at Python 3.9.

(venv) c:\temp>python -m pip install jsonobject
Collecting jsonobject
  Using cached jsonobject-0.9.10.tar.gz (394 kB)
Requirement already satisfied: six in .\venv\lib\site-packages (from jsonobject) (1.16.0)
Building wheels for collected packages: jsonobject
  Building wheel for jsonobject (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\temp\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-6vbuiurz\\jsonobject_9ef8c7da9549402ba95a3094cde2fe11\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-6vbuiurz\\jsonobject_9ef8c7da9549402ba95a3094cde2fe11\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\user\AppData\Local\Temp\pip-wheel-1yolk631'
       cwd: C:\Users\user\AppData\Local\Temp\pip-install-6vbuiurz\jsonobject_9ef8c7da9549402ba95a3094cde2fe11\
  Complete output (35 lines):
  You are running without Cython installed. It is highly recommended to run
    pip install cython>=0.29.21,<1.0.0
  before you continue
  Warning: 'classifiers' should be a list, got type 'tuple'
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.10
  creating build\lib.win-amd64-3.10\jsonobject
  copying jsonobject\exceptions.py -> build\lib.win-amd64-3.10\jsonobject
  copying jsonobject\__init__.py -> build\lib.win-amd64-3.10\jsonobject
  running build_ext
  building 'jsonobject.api' extension
  creating build\temp.win-amd64-3.10
  creating build\temp.win-amd64-3.10\Release
  creating build\temp.win-amd64-3.10\Release\jsonobject
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\temp\venv\include -IC:\Python310\include -IC:\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /Tcjsonobject/api.c /Fobuild\temp.win-amd64-3.10\Release\jsonobject/api.obj
  api.c
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\temp\venv\libs /LIBPATH:C:\Python310\libs /LIBPATH:C:\Python310 /LIBPATH:C:\temp\venv\PCbuild\amd64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64 /EXPORT:PyInit_api build\temp.win-amd64-3.10\Release\jsonobject/api.obj /OUT:build\lib.win-amd64-3.10\jsonobject\api.cp310-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.10\Release\jsonobject\api.cp310-win_amd64.lib
     Creating library build\temp.win-amd64-3.10\Release\jsonobject\api.cp310-win_amd64.lib and object build\temp.win-amd64-3.10\Release\jsonobject\api.cp310-win_amd64.exp
  Generating code
  Finished generating code
  building 'jsonobject.base' extension
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\temp\venv\include -IC:\Python310\include -IC:\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /Tcjsonobject/base.c /Fobuild\temp.win-amd64-3.10\Release\jsonobject/base.obj
  base.c
  jsonobject/base.c(17142): warning C4013: '_PyGen_Send' undefined; assuming extern returning int
  jsonobject/base.c(17142): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
  jsonobject/base.c(17147): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
  jsonobject/base.c(17231): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\temp\venv\libs /LIBPATH:C:\Python310\libs /LIBPATH:C:\Python310 /LIBPATH:C:\temp\venv\PCbuild\amd64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64 /EXPORT:PyInit_base build\temp.win-amd64-3.10\Release\jsonobject/base.obj /OUT:build\lib.win-amd64-3.10\jsonobject\base.cp310-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.10\Release\jsonobject\base.cp310-win_amd64.lib
     Creating library build\temp.win-amd64-3.10\Release\jsonobject\base.cp310-win_amd64.lib and object build\temp.win-amd64-3.10\Release\jsonobject\base.cp310-win_amd64.exp
  base.obj : error LNK2001: unresolved external symbol _PyGen_Send
  build\lib.win-amd64-3.10\jsonobject\base.cp310-win_amd64.pyd : fatal error LNK1120: 1 unresolved externals
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\link.exe' failed with exit code 1120
  ----------------------------------------
  ERROR: Failed building wheel for jsonobject
  Running setup.py clean for jsonobject
Failed to build jsonobject
Installing collected packages: jsonobject
    Running setup.py install for jsonobject ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\temp\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-6vbuiurz\\jsonobject_9ef8c7da9549402ba95a3094cde2fe11\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-6vbuiurz\\jsonobject_9ef8c7da9549402ba95a3094cde2fe11\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\user\AppData\Local\Temp\pip-record-9ltgm6kh\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\temp\venv\include\site\python3.10\jsonobject'
         cwd: C:\Users\user\AppData\Local\Temp\pip-install-6vbuiurz\jsonobject_9ef8c7da9549402ba95a3094cde2fe11\
    Complete output (35 lines):
    You are running without Cython installed. It is highly recommended to run
      pip install cython>=0.29.21,<1.0.0
    before you continue
    Warning: 'classifiers' should be a list, got type 'tuple'
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.10
    creating build\lib.win-amd64-3.10\jsonobject
    copying jsonobject\exceptions.py -> build\lib.win-amd64-3.10\jsonobject
    copying jsonobject\__init__.py -> build\lib.win-amd64-3.10\jsonobject
    running build_ext
    building 'jsonobject.api' extension
    creating build\temp.win-amd64-3.10
    creating build\temp.win-amd64-3.10\Release
    creating build\temp.win-amd64-3.10\Release\jsonobject
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\temp\venv\include -IC:\Python310\include -IC:\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /Tcjsonobject/api.c /Fobuild\temp.win-amd64-3.10\Release\jsonobject/api.obj
    api.c
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\temp\venv\libs /LIBPATH:C:\Python310\libs /LIBPATH:C:\Python310 /LIBPATH:C:\temp\venv\PCbuild\amd64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64 /EXPORT:PyInit_api build\temp.win-amd64-3.10\Release\jsonobject/api.obj /OUT:build\lib.win-amd64-3.10\jsonobject\api.cp310-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.10\Release\jsonobject\api.cp310-win_amd64.lib
       Creating library build\temp.win-amd64-3.10\Release\jsonobject\api.cp310-win_amd64.lib and object build\temp.win-amd64-3.10\Release\jsonobject\api.cp310-win_amd64.exp
    Generating code
    Finished generating code
    building 'jsonobject.base' extension
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\temp\venv\include -IC:\Python310\include -IC:\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /Tcjsonobject/base.c /Fobuild\temp.win-amd64-3.10\Release\jsonobject/base.obj
    base.c
    jsonobject/base.c(17142): warning C4013: '_PyGen_Send' undefined; assuming extern returning int
    jsonobject/base.c(17142): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
    jsonobject/base.c(17147): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
    jsonobject/base.c(17231): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\temp\venv\libs /LIBPATH:C:\Python310\libs /LIBPATH:C:\Python310 /LIBPATH:C:\temp\venv\PCbuild\amd64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64 /EXPORT:PyInit_base build\temp.win-amd64-3.10\Release\jsonobject/base.obj /OUT:build\lib.win-amd64-3.10\jsonobject\base.cp310-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.10\Release\jsonobject\base.cp310-win_amd64.lib
       Creating library build\temp.win-amd64-3.10\Release\jsonobject\base.cp310-win_amd64.lib and object build\temp.win-amd64-3.10\Release\jsonobject\base.cp310-win_amd64.exp
    base.obj : error LNK2001: unresolved external symbol _PyGen_Send
    build\lib.win-amd64-3.10\jsonobject\base.cp310-win_amd64.pyd : fatal error LNK1120: 1 unresolved externals
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\link.exe' failed with exit code 1120
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\temp\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-6vbuiurz\\jsonobject_9ef8c7da9549402ba95a3094cde2fe11\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-6vbuiurz\\jsonobject_9ef8c7da9549402ba95a3094cde2fe11\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\user\AppData\Local\Temp\pip-record-9ltgm6kh\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\temp\venv\include\site\python3.10\jsonobject' Check the logs for full command output.
@th3hamm0r
Copy link
Contributor

I've also stumbled over this issue on ubuntu! The above error seems to be related to the fix from cython/cython#3876, which has been released with cython 0.29.22.
Using the latest master of jsonobject, which contains #183, fixes the issue for me with python 3.10.

@czue could you release a new version with the newly compiled c files? But I haven't run any tests, so maybe #185 should be merged first, to run the tests against 3.10?

@PeterJCLaw
Copy link
Contributor

This is fixed for me on master (CI fixed in #186), so I'm hopeful of a new release soon :)

@czue
Copy link
Member

czue commented Mar 14, 2022

Sorry I missed the above comment. I think @dannyroberts is on this now.

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

Successfully merging a pull request may close this issue.

4 participants