compiler-explorer / compiler-explorer/infra

[WIP] Notes on full reinstall

Open
#388 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
434
Forks
429
Avg merge
4d 21h
Merged PRs (30d)
38

Description

(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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.