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

[cmake] Force Python version to 2.7 #9818

Merged
merged 1 commit into from May 19, 2016
Merged

Conversation

neo1973
Copy link
Member

@neo1973 neo1973 commented May 16, 2016

When I try to build Kodi with CMake on Arch Linux, CMake finds version 3.5 of Python and tries to use it. The build then fails with this error:

/home/mark/Coding/Repos/kodi-git/src/xbmc/xbmc/interfaces/python/LanguageHook.cpp: In member function 'virtual XBMCAddon::String XBMCAddon::Python::PythonLanguageHook::GetAddonId()': /home/mark/Coding/Repos/kodi-git/src/xbmc/xbmc/interfaces/python/LanguageHook.cpp:140:38: error: 'PyString_AsString' was not declared in this scope return PyString_AsString(pyid); ^ /home/mark/Coding/Repos/kodi-git/src/xbmc/xbmc/interfaces/python/LanguageHook.cpp: In member function 'virtual XBMCAddon::String XBMCAddon::Python::PythonLanguageHook::GetAddonVersion()': /home/mark/Coding/Repos/kodi-git/src/xbmc/xbmc/interfaces/python/LanguageHook.cpp:155:43: error: 'PyString_AsString' was not declared in this scope return PyString_AsString(pyversion); ^ build/interfaces/python/CMakeFiles/python_interface.dir/build.make:134: recipe for target 'build/interfaces/python/CMakeFiles/python_interface.dir/LanguageHook.cpp.o' failed make[2]: *** [build/interfaces/python/CMakeFiles/python_interface.dir/LanguageHook.cpp.o] Error 1 CMakeFiles/Makefile2:3066: recipe for target 'build/interfaces/python/CMakeFiles/python_interface.dir/all' failed

If I force the Python version to 2.7 in FindPython.cmake, everything builds fine.

@fetzerch
Copy link
Member

Thanks! Looks good to me, will merge once the travis build succeeds.

@wsnipex
Copy link
Member

wsnipex commented May 16, 2016

jenkins build this please.

@wsnipex wsnipex merged commit f72fafc into xbmc:master May 19, 2016
@neo1973 neo1973 deleted the fix_python_version branch May 19, 2016 15:14
@hudokkow hudokkow added Type: Fix non-breaking change which fixes an issue CMake labels May 24, 2016
@hudokkow hudokkow added this to the Krypton 17.0-alpha2 milestone May 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake Type: Fix non-breaking change which fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants