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

Issues with building #10

Open
4lekk opened this issue Feb 9, 2023 · 2 comments
Open

Issues with building #10

4lekk opened this issue Feb 9, 2023 · 2 comments

Comments

@4lekk
Copy link

4lekk commented Feb 9, 2023

Hello,

I tried building CU2CL and the associated version of LLVM and Clang using the provided install.sh script.
However, 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.

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
no
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
not found
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.

@psath
Copy link
Contributor

psath commented Feb 9, 2023

Thanks for the report!

CU2CL really needs to be updated to modern versions of LLVM, but alas our funding has moved on to other new and exciting things. We'd be happy to entertain a pull request if you are so inclined.

As for getting it working with LLVM 3.4... I'm suspecting that from that long ago, the LLVM installer is expecting the system python binary to point to python2, which was the standard on older GNU/Linuxes. (I'd guess either it is only checking that the minor version is sufficient, or it needs something that is deprecated by Python 3.) I don't remember exactly when Ubuntu shifted to python3 as the default... If you're game, try aliasing python to python2, which should still exist in the Ubuntu repos, but may not be installed by default.

@4lekk
Copy link
Author

4lekk commented Feb 9, 2023

Thanks for the reply.

I installed python 2.7.18 and created a "python" alias for it. However, I still get the same errors using both methods I mentioned in my original post. I was just wondering, perhaps renaming the python2 executable to python would help? I'm not sure this is a safe thing to do though as perhaps other programs requiring python 3 may pick up this new "python".

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

No branches or pull requests

2 participants