On Tue, Nov 10, 2020 at 10:43:49AM -0600, Bruce Dubbs via blfs-dev wrote: > On 11/10/20 6:43 AM, Tim Tassonis via blfs-dev wrote: > > Hi all > > > > I'm just about to build llvm 11 as in current blfs, and wondered if it > > would be better to install it in /opt/llvm11, instead of /usr. > > > > The reason I'm asking is that llvm seems to be updated quite often and > > I'm not sure about the compatibility of different versions with mesa, > > rustc and firefox. > > > > Any thoughts on this? > > You can do this, but I have not run into any problems with llvm in /usr in > the past. > > -- Bruce
In the past there have been several times where newer versions of llvm and rust have not played well together. The development book has missed most of those problems. At one time (April 2017) the book had moved to llvm-4 and I was building llvm-3 in /opt to use system llvm with whatever version of rust I was using. LLVM gets a major version update twice a year, gcc seems to typically have a major version update once a year. So in terms of things changing in packages which require or prefer llvm/clang there is more scope for breakage in a maintained system. ISTR that Tim keeps systems supported for long times. In the past I've tried to keep my own past desktop systems minimally supported for a year or two (i.e. only updating packages with vulnerabilities) but that has become increasingly troublesome. For the moment I have systems back to LFS-9.0 which should be usable (multiple systems on same machine, with /home shared between them), but I had to scrap 8.3 and 8.4 a little sooner than I had expected. Where people are trying to keep older versions in use, multiple versions of toolchains can be useful, and for LFS-style builds that means using /opt and fixing up the PATH during the build. For rust, the alternative is to build it with its shipped llvm. For firefox, using a newer version (e.g. current is 82.0.3 as of yeasterday) tends to be required from time to time. On one of my development machines (when the book had rustc-1.42.0) I had several newer versions of rust so that I could build firefox beta. For mesa, I don't recall any problems with llvm versions. For packages which prefer to use clang I generally do my best endeavours to use g++ (not sure what current libreoffice is using). Summary: Multiple versions of llvm/clang in /opt should be fine. I ignore all the BLFS files for setting PATH and use my own approach. In buildscripts, that can come down to: remove current symlink (e.g. for rust), create new symlink to different version, ldconfig set PATH and I see no reason why that would not work for llvm. Not directly related to this, but I've had various problems trying to update nodejs (I only do that if there are vulnerabilities, or if firefox requires a newer version). The problems seemed to be C++ version issues - on one system I had to use clang, the version of g++ (8.something, I think) could not build the latest version of the same stable series. That might be another candidate for building in /opt. ĸen -- Brave Sir Nigel ran away! When reality reared its ugly head, Sir Nigel turned his tail and fled. Brave brave brave Sir Nigel. -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page