I’m trying to build LLVM and Clang version 3.4, for compatibility with an older project. I’m following the project’s instructions and using the script (install.sh) provided at
But executing the script gives me a CMake error:
CMake Error at CMakeLists.txt:43 (message):
Please set CU2CL_PATH_TO_CLANG_BUILD to a directory containing a Clang build.
The script actually sets the value of this variable, to …/llvm-build, which is the same as the value for CU2CL_PATH_TO_LLVM_BUILD, which seems like it shouldn’t be.
Alternatively, I tried installing LLVM + Clang 3.4 myself, downloading the source of both using wget and the same URLs as the install.sh script of CU2CL, but otherwise following the instructions in the GettingStarted.rst file in the docs directory of the LLVM source (so I also installed the corresponding version of Compiler RST). However, I got the following error after invoking …/llvm-3.4/configure
checking for python… …/llvm-3.4/configure: line 11792: result:: command not found
checking for python >= 2.5… …/llvm-3.4/configure: line 11818: test: line: integer expression expected
…/llvm-3.4/configure: line 11819: test: line: integer expression expected
configure: error: found python line (); required >= 2.5
See `config.log’ for more details.
Though I do not have a command named “python”, I have python3. I also tried aliasing “python” to “python3” but to no avail.
I’m on an Ubuntu 22.04 LTS.
I’m new to building projects from source and sorry if I’m missing an obvious solution.