Skip to content

Commit

Permalink
Update prereqs.rst to for Python 3 dependency
Browse files Browse the repository at this point in the history
---
Signed-off-by: Michael Ferguson <mppf@users.noreply.github.com>
  • Loading branch information
mppf committed Oct 23, 2020
1 parent 4b195f5 commit d1cedf8
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions doc/rst/usingchapel/prereqs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,34 @@ about your environment for using Chapel:
* You are using an environment that supports standard UNIX commands
such as: ``cd, mkdir, rm, echo``

* You have the Bourne shell available at ``/bin/sh``, the C-shell
* You have a Bourne shell available at ``/bin/sh``, the C-shell
available at ``/bin/csh``, 'env' available at ``/usr/bin/env``, and
that 'env' can locate Perl and Python on your system.
that 'env' can locate ``python3`` or ``python`` on your system.

* You have Python 2.7 or newer.

* You have access to gmake or a GNU-compatible version of make.

* You have access to standard C and C++ compilers. We test our code
using a range of compilers on a nightly basis; these include
relatively recent versions of gcc/g++, clang, and compilers from
Allinea, Cray, Intel, and PGI.
Cray and Intel.

* Note that you will need a C++11 compiler to build LLVM or regular
expression support (i.e. CHPL_LLVM=llvm or CHPL_REGEXP=re2). If
GCC is used, we recommend GCC version 5 or newer for this purpose.

* Building GMP requires an M4 macro processor.

* Building LLVM requires cmake version 3.4.3 or later.
* Building LLVM requires cmake version 3.13.4 or later.

* If you wish to use chpldoc or Chapel's test system, ``curl`` and
python-devel (or equivalent packages for your platform) are required.
* If you wish to use chpldoc or Chapel's test system, Python 3.5 or
newer is required and the ``python3`` and ``pip3`` commands must be
available. Additionally, ``curl``, ``perl``, and ``python3-devel``
(or equivalent packages for your platform) are required.

* If you wish to use :ref:`readme-mason`, chapel's package manager, ``git`` is required.
* If you wish to use :ref:`readme-mason`, chapel's package manager,
``git`` is required.

* The ``mason system`` subcommands additionally require ``pkg-config``.

Expand All @@ -51,22 +56,14 @@ Installation

We have used the following commands to install the above prerequisites:

* CentOS::

sudo yum install gcc gcc-c++ m4 perl python python-devel python-setuptools bash make gawk git

* Fedora::

sudo dnf install gcc gcc-c++ m4 perl python python-devel python-setuptools bash make gawk git

* SLES, openSUSE::
* CentOS, Fedora::

sudo zypper install gcc gcc-c++ m4 perl python python-devel python-setuptools bash make gawk git
sudo dnf install gcc gcc-c++ m4 perl python3 python3-devel bash make gawk git

This comment has been minimized.

Copy link
@bradcray

bradcray Mar 31, 2022

@mppf / @lydia-duncan: A CentOS user on the Arkouda slack was tripping over a build problem and solved it using a yum command. This led me to ask and wonder why he hadn't just used the dnf command here instead. From what I can tell, it looks like dnf replaces yum and that CentOS7 used yum while CentOS 8+ uses dnf. That makes me wonder whether we should split the CentOS entry here into two entries, depending on the version used. Someone should check my work before taking this on, though.

This comment has been minimized.

Copy link
@lydia-duncan

lydia-duncan Mar 31, 2022

It looks like CentOS7 will reach EOL in June 2024, two years from now.

This comment has been minimized.

Copy link
@bradcray

bradcray Apr 1, 2022

Are you saying "therefore we shouldn't bother worrying about current CentOS7 users who are confused by our instructions and get compilation errors?" :D

(I would't think so, but since you didn't say anything else...)

This comment has been minimized.

Copy link
@mppf

mppf Apr 1, 2022

Author Owner

Getting Chapel to work on CentOS 7 is actually kindof hard. IMO the yum vs dnf issue is the easiest of the challenges.

Another alternative approach is that we could make an issue or document just about CentOS 7.

In my vagrant testing with CentOS 7 I used the following commands:

yum -y install centos-release-scl
yum -y install devtoolset-11-gcc*
scl enable devtoolset-11 bash
# make sure gcc 11 is the default for future log ins
echo source scl_source enable devtoolset-11 >> /home/vagrant/.bashrc

yum -y install git gcc gcc-c++ m4 perl tcsh bash gcc gcc-c++ perl python3 bash make gawk cmake

(Note in that testing, the current user's name is vagrant; you would have to replace that with your user name).

The devtoolset business is due to the fact that we require a C++14 compiler (to build chpl) but CentOS does not include one in the package repository. We are hardly the only project with this issue, though. See also https://chapel.discourse.group/t/build-of-1-25-1-with-bundled-llvm-on-system-with-multiple-gcc-g-installed/11179 for some discussion of what you can do if the updating-bashrc isn't good enough.

This comment has been minimized.

Copy link
@mppf

mppf Apr 1, 2022

Author Owner

Anyway, I think having a Spack chapel package would be the most appealing solution for people using CentOS 7. That way, we can reliably build a full-featured version and the dependencies are not such a big deal. At least I think Spack would enable that. Main downside to that vs. the devtoolset type approach is build time (e.g. Spack might build GCC) but IMO if you can launch it once and forget about it until it completes, build time is not so bad. Build time is problematic when you have to repeatedly build to troubleshoot. So I view a more reliable/reproducible environment as a worthwhile tradeoff.

This comment has been minimized.

Copy link
@lydia-duncan

lydia-duncan Apr 1, 2022

Are you saying "therefore we shouldn't bother worrying about current CentOS7 users who are confused by our instructions and get compilation errors?" :D

(I would't think so, but since you didn't say anything else...)

We definitely shouldn't ignore people pointing out problems :) my point was that the longer we delay taking on any fixes the less useful they will be, so we shouldn't drag our feet if we intend to do anything.

This comment has been minimized.

Copy link
@bradcray

bradcray Apr 1, 2022

Getting Chapel to work on CentOS 7 is actually kindof hard.

Ah, OK, I wasn't remembering that (names of OSes generally go in one ear and out the other until a problem catches my eye).

It looks like the approach the user ended up with was similar to yours (?), though with different versions:

so the sequence to fix it:

yum install centos-release-sci devtoolset-9-gcc-c++-9.1.1-2.6.el7.x86_64 -y
scl enable devtoolset-9 bash

This comment has been minimized.

Copy link
@mppf

mppf Apr 1, 2022

Author Owner

Right, that should work; it just uses GCC 9 vs GCC 11.


* Debian, Ubuntu::

sudo apt-get install gcc g++ m4 perl python python-dev python-setuptools bash make mawk git pkg-config
sudo apt-get install gcc g++ m4 perl python3 python3-pip python3-dev bash make mawk git pkg-config

* FreeBSD::

sudo pkg install gcc m4 perl5 python py27-setuptools bash gmake gawk git pkgconf
sudo pkg install gcc m4 perl5 python3 py37-pip bash gmake gawk git pkgconf

0 comments on commit d1cedf8

Please sign in to comment.