On 22/01/2020 22:37, Ken Moffat via blfs-support wrote:
On Wed, Jan 22, 2020 at 08:21:32PM +0000, Ken Moffat via blfs-support wrote:
On Wed, Jan 22, 2020 at 07:40:12PM +0000, Vaughan Butler via blfs-support wrote:
I'm trying to build LLVM-9.0.1 with the optional Clang package, which
appears to be required for Firefox to build.
This goes OK until invoking ninja, which immediately stops the build, with
the message
ninja: error: '../cmake/modules/Generate VersionFromVCS.cmake', needed by
'tools/clang/lib/Basic/VCSVersion.inc', missing and no known rule to make it
Update on this part: the file name does not have a space after
Generate, and it is extracted to
cmake/modules/GenerateVersionFromVCS.cmake within llvm. Did you
have a problem untarring llvm ?
In fact the error message did not have a space, must have happened during
copy/paste.
Don't think there was a problem untarring. Wondering how to read that error
message:
GenerateVersionFromVCS.cmake is present and in the correct location
VCSVersion.inc is not in the location in the error message, and nowhere else
I can only assume GenerateVersionFromVCS.cmake is needed to build VCSVersion.inc
I have seen some similar issues with cmake on the web, which seem to suggest
that
cmake can struggle with PATH issues in certain circumstances, but resolving
such an
issue is beyond me.
Building LLVM without the Clang package completes normally, but the Firefox
build will complain that it is needed. Curiously I built Firefox on LFS 8.4,
in the same way, without this problem.
After looking at the current deps (below), I took a look at the 8.4
book: That had firefox-65.0.1, required deps included cbindgen-0.8.0
AND clang (from LLVM-7.0.1).
So firefox has expected clang for a long time. But maybe I'm
misunderstanding what you are saying. Often it is best to stop at
the first error rather than try to work around it.
Hope someone can throw some light on this, as I've found nothing, other than
some similar PATH related issues with cmake, after searching the web.
For the llvm issue I have no idea. But for firefox needing clang
I'm surprised - in practice I _do_ build clang on all my systems,
but in the development book for firefox we use:
export CC=gcc CXX=g++ &&
export MOZBUILD_STATE_PATH=${PWD}/mozbuild &&
./mach build
and that first line is to ensure that gcc and g++ are used. Hmm, we
also did that back in 9.0 (but nobody should build old versions of
firefox).
Hmm, I can see that the python configury checks that clang is new
enough before adding some disable|without clang options, and then it
compiles rust crate clang-sys (cargo bindings).
So yes, you are right - it's part of mozilla's "use clang on all
platforms" (gcc tends to have better hardening flags available, and
to produce a smaller binary on linux x86_64).
I've now looked at the dependency chain, because the only explicit
reference to llvm in firefox is in the command explanation for doing
things the mozilla way.
The libclang dependency is for bindgen (part of stylo) and that uses
cbindgen. Cbindgen needs rust, obviously.
For rust we *recommend* clang :
| Recommended
|
| clang from LLVM-9.0.1 (built with -DLLVM_LINK_LLVM_DYLIB=ON so that
| rust can link to system LLVM instead of building its shipped
| version)
So, by building rust without clang you deviated from what the book
recommends. I have no idea whether or not you will need to rebuild
rust after sorting out why clang fails, but for firefox I would be
tempted to try without rebuilding rust (because rust takes much
longer than firefox).
I suggest that you remove the existing llvm directory tree if it is
still present, untar llvm afresh, check that the cmake file exists,
untar clang in tools/, and retry.
ĸen
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page