[llvm-dev] llvm-6.0.0rc2: fatal error: clang/Basic/Version.h: No such file or directory
Andrew Kelley via llvm-dev
llvm-dev at lists.llvm.org
Thu Feb 15 11:35:02 PST 2018
What is the purpose of supporting this "copy directories around" sort
of build strategy anyway?
At the end of the day, the way these packages get installed is via
system package managers is independently, each project finding its
dependencies with the standard prefix path.
When I compile from source it's always like this:
$ cd llvm-6.0.0rc2.src/
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/local
-DCMAKE_PREFIX_PATH=$HOME/local -DCMAKE_BUILD_TYPE=Release
$ make install
$ cd cfe-6.0.0rc2.src/
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/local
-DCMAKE_PREFIX_PATH=$HOME/local -DCMAKE_BUILD_TYPE=Release
$ make install
$ cd lld-6.0.0rc2.src/
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/local
-DCMAKE_PREFIX_PATH=$HOME/local -DCMAKE_BUILD_TYPE=Release
$ make install
etc
This is how stuff gets installed on Debian, Ubuntu, NixOS, Arch,
Gentoo, etc. And it works for Windows too:
> mkdir C:\Users\Andy\llvm-6.0.0rc2.src\build-release
> cd C:\Users\Andy\llvm-6.0.0rc2.src\build-release
> "c:\Program Files\CMake\bin\cmake.exe" .. -Thost=x64 -G"Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=C:\Users\Andy\llvm+clang-6.0.0rc2-win64-msvc-release -DCMAKE_PREFIX_PATH=C:\Users\Andy\llvm+clang-6.0.0rc2-win64-msvc-release -DCMAKE_BUILD_TYPE=Release
> msbuild -p:Configuration=Release INSTALL.vcxproj
What are our use cases for the strategy where we move directories into
llvm to build?
On Thu, Feb 15, 2018 at 2:02 PM, Dimitry Andric via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> On 15 Feb 2018, at 15:45, Siegmar Gross via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>
>> today I've tried to build llvm-6.0.0rc2 using Cmake on my "SUSE Linux
>> Enterprise Server 12.3 (x86_64)" with the following commands (gcc-6.4.0
>> is necessary for CUDA-9.0).
>>
>>
>> wget http://prereleases.llvm.org/6.0.0/rc2/llvm-6.0.0rc2.src.tar.xz
>> wget http://prereleases.llvm.org/6.0.0/rc2/cfe-6.0.0rc2.src.tar.xz
>> wget http://prereleases.llvm.org/6.0.0/rc2/clang-tools-extra-6.0.0rc2.src.tar.xz
>> wget http://prereleases.llvm.org/6.0.0/rc2/compiler-rt-6.0.0rc2.src.tar.xz
>> wget http://prereleases.llvm.org/6.0.0/rc2/lldb-6.0.0rc2.src.tar.xz
>> wget http://prereleases.llvm.org/6.0.0/rc2/lld-6.0.0rc2.src.tar.xz
>> wget http://prereleases.llvm.org/6.0.0/rc2/polly-6.0.0rc2.src.tar.xz
>> wget http://prereleases.llvm.org/6.0.0/rc2/openmp-6.0.0rc2.src.tar.xz
>>
>>
>> tar xf llvm-6.0.0rc2.src.tar.xz
>> cd llvm-6.0.0rc2.src/tools
>> tar xf ../../cfe-6.0.0rc2.src.tar.xz
>> tar xf ../../polly-6.0.0rc2.src.tar.xz
>> tar xf ../../lldb-6.0.0rc2.src.tar.xz
>> tar xf ../../lld-6.0.0rc2.src.tar.xz
>> cd cfe-6.0.0rc2.src/tools
>> tar xf ../../../../clang-tools-extra-6.0.0rc2.src.tar.xz
>> cd ../../../projects
>> tar xf ../../compiler-rt-6.0.0rc2.src.tar.xz
>> tar xf ../../openmp-6.0.0rc2.src.tar.xz
>> cd ../..
>
> After this, the directory names will not be correct, unfortunately. You'll need to do this instead:
>
> tar xf llvm-6.0.0rc2.src.tar.xz
> tar xf cfe-6.0.0rc2.src.tar.xz
> tar xf polly-6.0.0rc2.src.tar.xz
> tar xf lldb-6.0.0rc2.src.tar.xz
> tar xf lld-6.0.0rc2.src.tar.xz
> tar xf clang-tools-extra-6.0.0rc2.src.tar.xz
> tar xf compiler-rt-6.0.0rc2.src.tar.xz
> tar xf openmp-6.0.0rc2.src.tar.xz
>
> mv cfe-6.0.0rc2.src llvm-6.0.0rc2.src/tools/clang
> mv polly-6.0.0rc2.src llvm-6.0.0rc2.src/tools/polly
> mv lldb-6.0.0rc2.src llvm-6.0.0rc2.src/tools/lldb
> mv lld-6.0.0rc2.src llvm-6.0.0rc2.src/tools/lld
> mv clang-tools-extra-6.0.0rc2.src llvm-6.0.0rc2.src/tools/clang/tools/extra
> mv compiler-rt-6.0.0rc2.src llvm-6.0.0rc2.src/projects/compiler-rt
> mv openmp-6.0.0rc2.src llvm-6.0.0rc2.src/projects/openmp
>
> I think it might be better to distribute the source tarballs all rooted at llvm-6.0.0rc2, with the correct subpaths already embedded. Hans, what are your thoughts about that?
>
> Hopefully this will become moot at some point, if the monorepo ever gets off the ground...
>
> -Dimitry
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
More information about the llvm-dev
mailing list