infra
infra copied to clipboard
[WIP] Notes on full reinstall
(without system compiler)
sudo apt install make
sudo apt install libc6-dev
sudo apt install python3-venv
sudo apt install zlib1g-dev
sudo apt install m4
sudo mkdir /opt/compiler-explorer
sudo chown user:user /opt/compiler-explorer
cd /opt/compiler-explorer
git clone https://github.com/compiler-explorer/infra
git clone https://github.com/compiler-explorer/compiler-explorer ce
cd infra
make ce
bin/ce_install install 'gcc 10.1.0'
bin/ce_install install 'clang 8.0.0'
export CC=/opt/compiler-explorer/gcc-10.1.0/bin/gcc
export CXX=/opt/compiler-explorer/gcc-10.1.0/bin/g++
export LD=/opt/compiler-explorer/gcc-10.1.0/bin/ld
export AR=/opt/compiler-explorer/gcc-10.1.0/bin/ar
update_compilers/install_binaries.sh
sudo ln -s /opt/compiler-explorer/gcc-10.1.0/bin/strip /usr/bin/strip
sudo ln -s /opt/compiler-explorer/gcc-10.1.0/bin/c++filt /usr/bin/c++filt
bin/ce_install install all the things!
bin/ce_install --enable nightly install 'gcc trunk'
TLDR takeaways: install_binaries depends on Clang 8, and most ce_install's depend on strip, which is part of gcc binutils
Also if you do make ce before python3-venv is installed, you need to do make clean first before being able to call make ce again
If something goes wrong during install_binaries, the folder for pahole will be empty and will not be built. You have to remove it every time before retrying install_binaries.
Gcc trunk is needed for readelf
You need c++filt for the unit tests
FPC needs AS to be in the path, so eventually it's unavoidable to install the system's gcc.
This is great! Thanks. One day we might have a CI build to ensure we install well from a freshly-minted OS.
Was testing installing Swift 5.3 locally and finding out it (swiftc) needs libtinfo.so.5 I assumed it would be in libtinfo-dev, but that didn't help for some reason.
partouf@ceub20:/opt/compiler-explorer/infra$ locate libtinfo.so
/snap/core18/1880/lib/x86_64-linux-gnu/libtinfo.so.5
/snap/core18/1880/lib/x86_64-linux-gnu/libtinfo.so.5.9
/snap/core18/1885/lib/x86_64-linux-gnu/libtinfo.so.5
/snap/core18/1885/lib/x86_64-linux-gnu/libtinfo.so.5.9
/usr/lib/x86_64-linux-gnu/libtinfo.so
/usr/lib/x86_64-linux-gnu/libtinfo.so.6
/usr/lib/x86_64-linux-gnu/libtinfo.so.6.2
partouf@ceub20:/opt/compiler-explorer/infra$ bin/ce_install install 'swift 5.3'
2020-09-17 09:21:41,495 lib.installation INFO Making uncached requests
Installing compilers/swift 5.3
/opt/compiler-explorer/swift-5.3/usr/bin/swiftc: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
Installing via sudo apt install libtinfo5 does work