Issue 171034
Summary clang release tarball fails to build without giving an informative explanation why
Labels clang
Assignees
Reporter eyalroz
    I (or any user) want to download the clang compiler sources, build it and run it.

So, Ivisit the release page or the repository root to find a link to the latest release, currently [this one](https://github.com/llvm/llvm-project/releases/tag/llvmorg-21.1.7). On the release page, the user looks for the clang sources, and I [the source tarball](https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.7/clang-21.1.7.src.tar.xz). I then proceed to download it.

Now let's assume I use some Linux distribution, although that probably doesn't matter all that much. And - that my build prerequisites are met.

So, I expand the tarball, and invoke CMake:
```
cmake -B /path/to/build/dir -S /path/to/clang/src/dir
```
this is the first thing I get:
```
CMake Error at CMakeLists.txt:7 (include):
 include could not find requested file:

 /home/lh156516/src/local/clang-21.1.7.src/../cmake/Modules/CMakePolicy.cmake


```
it seems like clang can only be built from a subdirectory of another source repository. But - your `CMakeLists.txt` should check whether this requirement is observed, and if it isn't - explain that this is the case, and that the LLVM sources must reside in the parent directory. Assuming that is indeed what's missing. Don't let

You may also consider avoiding distributing the clang sources as a separate artifact, or at least renaming the tarball in a way which clarifies it belong in a subdirectory, e.g. `clang-subdirectory-21.1.7.src.tar.xz`
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to