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

bind.py: upgrade llvm version #268

Open
masinag opened this issue Oct 2, 2023 · 3 comments
Open

bind.py: upgrade llvm version #268

masinag opened this issue Oct 2, 2023 · 3 comments

Comments

@masinag
Copy link
Contributor

masinag commented Oct 2, 2023

bind.py downloads llvm version 6.0.1 that forces the usage of Python 2 (see, e.g., this post)

In fact, by compiling the library I get

CMake Error at CMakeLists.txt:606 (if):
  if given arguments:

    "VERSION_LESS" "2.7"

  Unknown arguments specified

That is originated from the following lines in build/llvm-6.0.1/CMakeLists.txt:

# Verify that we can find a Python 2 interpreter.  Python 3 is unsupported.
# FIXME: We should support systems with only Python 3, but that requires work
# on LLDB.
set(Python_ADDITIONAL_VERSIONS 2.7)
include(FindPythonInterp)
if( NOT PYTHONINTERP_FOUND )
  message(FATAL_ERROR
"Unable to find Python interpreter, required for builds and testing.

Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
endif()

if( ${PYTHON_VERSION_STRING} VERSION_LESS 2.7 )
  message(FATAL_ERROR "Python 2.7 or newer is required")
endif()

@lyskov
Copy link
Member

lyskov commented Oct 2, 2023

Hm... unfortunately I have to keep LLVM-6 as default since that the last LLVM version that can be build on CentOS-7 with default compiler. How about adding command line flag to the build script that will allow user to specify LLVM version to use?

@masinag
Copy link
Contributor Author

masinag commented Oct 3, 2023

I can open a PR trying to add a command line flag.
I would raise an error if the version is not specified when using python3, since the error message given by CMake is not clear at all and I had to dig into LLVM source files to understand the origin of the error :)

@lyskov
Copy link
Member

lyskov commented Oct 3, 2023

I can open a PR trying to add a command line flag. I would raise an error if the version is not specified when using python3, since the error message given by CMake is not clear at all and I had to dig into LLVM source files to understand the origin of the error :)

-- sounds good, - thank you!

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