Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Prerequisites for Different Platforms #82

Merged
merged 20 commits into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 31 additions & 67 deletions building/prereq-centos7.md
Original file line number Diff line number Diff line change
@@ -1,108 +1,72 @@
aliBuild prerequisites for CentOS 7
MichaelLettrich marked this conversation as resolved.
Show resolved Hide resolved
aliBuild Prerequisites for CentOS 7
===================================

<!-- Dockerfile UPLOAD_NAME alisw/o2-cc7 -->
mpuccio marked this conversation as resolved.
Show resolved Hide resolved
<!-- Dockerfile FROM centos:7 -->
<!-- Dockerfile RUN rpmdb --rebuilddb && yum clean all -->
For ALICE O2, our policy is [to support CERN CentOS 7 as our official deployment
platform](https://indico.cern.ch/event/642232/#3-wp3-common-tools-and-softwar). CERN CentOS 7 is
essentially a CentOS 7 with some more CERN-specific packages, so these instructions apply to the
pristine CentOS 7 as well.
For ALICE O2, CERN CentOS 7 (CC7)is the [officialy supported target platform](https://indico.cern.ch/event/642232/#3-wp3-common-tools-and-softwar). Since CC7 is CentOS 7 with additional CERN packages, instructions apply to vanilla CentOS 7 as well.

As the primary supported platform, our [alidock](https://github.com/alidock/alidock/wiki)
installation method is based on it. If you use alidock, you don't need to follow those
prerequisites. The environment we provide is ready to use.
## Install or Upgrade the Required Packages


## Install or upgrade the required packages

Install packages (one long line, just copy and paste it), as **root user**:
With root permissions, i.e. `sudo` or as `root` install the prerequisites using:

<!-- Dockerfile RUN_INLINE -->
```bash
yum install -y python git mysql-devel curl curl-devel python python-devel python-pip bzip2 bzip2-devel unzip autoconf automake texinfo gettext gettext-devel libtool freetype freetype-devel libpng libpng-devel sqlite sqlite-devel ncurses-devel mesa-libGLU-devel libX11-devel libXpm-devel libXext-devel libXft-devel libxml2 libxml2-devel motif motif-devel kernel-devel pciutils-devel kmod-devel bison flex perl-ExtUtils-Embed environment-modules tk-devel
yum install -y git mysql-devel curl curl-devel bzip2 bzip2-devel unzip autoconf automake texinfo gettext gettext-devel libtool freetype freetype-devel libpng libpng-devel sqlite sqlite-devel ncurses-devel mesa-libGLU-devel libX11-devel libXpm-devel libXext-devel libXft-devel libxml2 libxml2-devel motif motif-devel kernel-devel pciutils-devel kmod-devel bison flex perl-ExtUtils-Embed environment-modules tk-devel
```

Now get a recent version of `pip` (the Python package manager): this is required for installing aliBuild and other Python dependencies. Do, always as **root user**:

<!-- Dockerfile RUN_INLINE -->
```
curl -o /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py
python /tmp/get-pip.py
```

Now get some Python dependencies (again **as root user**):

## Python and pip
AliBuild, our build tool, is installed via the python Package manager `pip`.
In case
```bash
pip3 show pip
```
returns `command not found` or similar, install `pip` with root permissions, i.e. `sudo` or as `root`:
<!-- Dockerfile RUN_INLINE -->
```bash
pip install matplotlib==2.0.2 numpy certifi ipython==5.1.0 ipywidgets ipykernel notebook metakernel pyyaml
yum install -y python3-pip
pip3 install --upgrade pip
```

## Get or Update Developer Toolset 7

## Get or update the compiler from Devtoolset
We require a more recent set of compilers than shipped by the OS. They can be obtained via [Softawre
Collections](https://www.softwarecollections.org/).

The default compiler on CentOS 7 is quite old. Luckily, [Softawre
Collections](https://www.softwarecollections.org/) has RPMs for recent versions of GCC.

{% callout "Developer Toolset version" %}
CC7 with the Developer Toolset is the default OS for ALICE O2 operations, therefore we take
particular care about compatibility and upgrading our recommendations. Our policy is to never
upgrade O2 to a newer compiler unless the corresponding Developer Toolset package is out and tested.

Every recommendation change concerning the Develpoer Toolset versions is reviewed, discussed and
voted. The **current situation (July 2018)** is:

* [devtoolset-7](https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/) (GCC v7.3.1) is
the currently **approved and working** version for O2.

**Please make sure your `devtoolset-7` is up-to-date!** Due to
[a bug](https://bugzilla.redhat.com/show_bug.cgi?id=1519073), versions of `devtoolset-7` with GCC
v7.2.1 do not work.

All versions other than the very latest `devtoolset-7` are to be considered unsupported.
{% endcallout %}

First off, enable Software Collections:
The only supported Developer Toolset for ALICE software is `devtoolset-7`.

With root permissions, i.e. `sudo` or as `root` enable software collections:
<!-- Dockerfile RUN_INLINE -->
```bash
yum install -y centos-release-scl
yum-config-manager --enable rhel-server-rhscl-7-rpms
```

Get the compiler with:

Then, still with `root` permissions install compilers and developer tools via:
<!-- Dockerfile RUN_INLINE -->
```bash
yum install -y devtoolset-7
```

Note that by default if you type now `gcc` at the prompt you will not see the new GCC! You need to
enable it explicitly:

<!-- Dockerfile RUN yum install -y vim-enhanced emacs-nox -->
<!-- Dockerfile RUN rpmdb --rebuilddb && yum clean all -->
<!-- Dockerfile RUN echo "source scl_source enable devtoolset-7" >> /etc/profile -->
<!-- Dockerfile RUN echo "source scl_source enable devtoolset-7" >> /etc/bashrc -->
<!-- Dockerfile RUN pip install alibuild -->
<!-- Dockerfile RUN mkdir /lustre /cvmfs -->
<!-- Dockerfile ENTRYPOINT ["/bin/bash"] -->
By design these tools do not replace the standard tools shipped by the system and have to be enabled explicitly for every new shell session you open:
```bash
source scl_source enable devtoolset-7
```

You can either do it in every shell manually, or add it to your `~/.bashrc` or `~/.bash_profile`. If
you do so, the new GCC will always be enabled in every shell. This might not be desirable in some
cases, so beware. Also, if you add this line to the shell configuration, this will be enabled in all
new terminals (not the current one).
If desired so, the above line can be added to your `~/.bashrc` or `~/.bash_profile`, so that tools shipped via devtoolset are automatically available in every shell. However beware that in some special cases that this might have undesired side effects.

You can check if you are running the correct version of GCC with:

```bash
gcc --version
```

It should report **GCC v7.3.1**.
It should report `GCC v7.3.1`.

You are now ready for [installing aliBuild and start building ALICE
software](README.md#get-or-upgrade-alibuild)

<!-- Dockerfile RUN yum install -y vim-enhanced emacs-nox -->
<!-- Dockerfile RUN rpmdb --rebuilddb && yum clean all -->
<!-- Dockerfile RUN echo "source scl_source enable devtoolset-7" >> /etc/profile -->
<!-- Dockerfile RUN echo "source scl_source enable devtoolset-7" >> /etc/bashrc -->
<!-- Dockerfile RUN pip install alibuild -->
<!-- Dockerfile RUN mkdir /lustre /cvmfs -->
<!-- Dockerfile ENTRYPOINT ["/bin/bash"] -->
62 changes: 24 additions & 38 deletions building/prereq-fedora.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,37 @@
aliBuild prerequisites for Fedora 27
====================================
aliBuild prerequisites for Fedora
=================================

We support on a best-effort basis recent versions of Fedora as development platform. Currently
supported version is Fedora 27. Other versions (older or newer) are to be considered not supported.
<!-- Dockerfile UPLOAD_NAME alisw/o2-fedora31 -->
<!-- Dockerfile FROM fedora:31 -->
ALICE software on Fedora is supported on a best effort basis. There is no guarantee that software builds or runs correctly. Support requests might have low priority.

{% callout "Fedora is bleeding-edge" %}
Note that in general it is not so easy to support a distribution like Fedora due to its "bleeding
edge" nature. Every new version tends to adopt new standards and packages very easily, requiring
adjustments in our software chain. Such adjustments are, as per our
[policy](https://indico.cern.ch/event/642232/#3-wp3-common-tools-and-softwar), are performed on a
best-effort basis.
## Install required system packages

If you are a Fedora user, let us remind you once again that any version different than Fedora 27 is
not supported at the moment. You might want to wait until we update our software chain and
documentation before upgrading to a newer Fedora version. If you are impatient, you might want to
use Docker with a supported OS (such as CentOS 7) as your development environment.
{% endcallout %}


## Corresponding Fedora container

You can use Docker to run a Fedora environment even if your OS is different. Check out the official
[Fedora images](https://hub.docker.com/_/fedora/). The image corresponding to a base Fedora 27
installation is `fedora:27`.


## Install or upgrade required packages

Install packages (one long line, just copy and paste it), as **root user**:
With root permissions, i.e. `sudo` or as `root` install the prerequisites using:

<!-- Dockerfile RUN_INLINE -->
```bash
dnf install -y git python mysql-devel curl curl-devel python python-devel python-pip bzip2 bzip2-devel unzip autoconf automake texinfo gettext gettext-devel libtool freetype freetype-devel libpng libpng-devel sqlite sqlite-devel ncurses-devel mesa-libGLU-devel libX11-devel libXpm-devel libXext-devel libXft-devel libxml2 libxml2-devel motif motif-devel kernel-devel pciutils-devel kmod-devel bison flex perl-ExtUtils-Embed environment-modules which gcc-gfortran gcc-c++ swig rsync
dnf install -y git python mysql-devel curl curl-devel bzip2 bzip2-devel unzip autoconf automake texinfo gettext gettext-devel libtool freetype freetype-devel libpng libpng-devel sqlite sqlite-devel ncurses-devel mesa-libGLU-devel libX11-devel libXpm-devel libXext-devel libXft-devel libxml2 libxml2-devel motif motif-devel kernel-devel pciutils-devel kmod-devel bison flex perl-ExtUtils-Embed environment-modules which gcc-gfortran gcc-c++ swig rsync make
```

**Note:** at the time of writing (February 2018), our current software does not support OpenSSL 1.1,
therefore it is necessary to install the following two compatibility packages with the
`--allowerasing` option:

## Python and pip
AliBuild, our build tool, is installed via the python Package manager `pip`.
In case
```bash
dnf install compat-openssl10-devel compat-openssl10 --allowerasing
```

Now get some Python dependencies (again **as root user**):

pip3 show pip
```
returns `command not found` or similar, install `pip` with root permissions, i.e. `sudo` or as `root`:
<!-- Dockerfile RUN_INLINE -->
```bash
pip install matplotlib numpy certifi ipython==5.1.0 ipywidgets ipykernel notebook metakernel pyyaml
dnf install -y python3-pip
pip3 install --upgrade pip
```

You are now ready for [installing aliBuild and start building ALICE
software](README.md#get-or-upgrade-alibuild)

<!-- Dockerfile RUN dnf install -y vim-enhanced emacs-nox -->
<!-- Dockerfile RUN dnf clean all -->
<!-- Dockerfile RUN pip install alibuild -->
<!-- Dockerfile RUN mkdir /lustre /cvmfs -->
<!-- Dockerfile ENTRYPOINT ["/bin/bash"] -->
Loading