Skip to content

Docs: Getting Started Dependencies#32480

Merged
ax3l merged 3 commits intospack:developfrom
ax3l:doc-build-matrix-started
Oct 10, 2022
Merged

Docs: Getting Started Dependencies#32480
ax3l merged 3 commits intospack:developfrom
ax3l:doc-build-matrix-started

Conversation

@ax3l
Copy link
Copy Markdown
Member

@ax3l ax3l commented Sep 1, 2022

Finally document what one needs to install to use Spack on Linux and Mac :-)

With <3 for minimal container users (e.g., issues like #32479) and my colleagues with their fancy Macs.
Screenshot from 2022-09-01 12-03-42

@ax3l ax3l added the documentation Improvements or additions to documentation label Sep 1, 2022
@spackbot-app spackbot-app bot added the core PR affects Spack core functionality label Sep 1, 2022
@ax3l ax3l force-pushed the doc-build-matrix-started branch 2 times, most recently from 2b1603c to 44f3b2e Compare September 1, 2022 18:33
ax3l added a commit to ax3l/spack that referenced this pull request Sep 1, 2022
@ax3l ax3l mentioned this pull request Sep 1, 2022
ax3l added a commit to ax3l/spack that referenced this pull request Sep 1, 2022
ax3l added a commit to ax3l/spack that referenced this pull request Sep 1, 2022
@ax3l ax3l force-pushed the doc-build-matrix-started branch from 21752b3 to a5fc5c9 Compare September 1, 2022 18:56
ax3l added a commit that referenced this pull request Sep 1, 2022
* Add: py-sphinx-design

Needed for #32480
@ax3l ax3l marked this pull request as ready for review September 1, 2022 19:59
@ax3l ax3l force-pushed the doc-build-matrix-started branch 2 times, most recently from 659c932 to 893d489 Compare September 1, 2022 20:00
.. code-block:: console

apt update
apt install build-essential ca-certificates coreutils curl environment-modules gcc gfortran g++ git gpg lsb-release python3 unzip zip
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gcc and g++ are part of build-essential, so they don't need to be listed separately. I also always install python3-distutils. I can't remember why, but I recall it being necessary on occasion...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spack used to use distutils but no longer does. Some packages depends on distutils, but I believe pip patches those out so distutils doesn't actually get used. @pradyunsg?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. I know why. spack style will fail without python3-distutils python3-dev.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the error message?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without python3-distutils:

==> Installing py-pip-22.1.2-rltemoksgf7tbslmak4yztuqseppc724
==> No binary for py-pip-22.1.2-rltemoksgf7tbslmak4yztuqseppc724 found: installing from source
==> Using cached archive: /root/spack/var/spack/cache/_source-cache/archive/a3/a3edacb89022ef5258bf61852728bf866632a394da837ca49eb4303635835f17
==> No patches needed for py-pip
==> py-pip: Executing phase: 'install'
==> Error: ProcessError: Command exited with status 1:
    '/usr/bin/python3.8' '/tmp/root/spack-stage/spack-stage-py-pip-22.1.2-rltemoksgf7tbslmak4yztuqseppc724/spack-src/pip-22.1.2-py3-none-any.whl/pip' '-vvv' '--no-input' '--no-cache-dir' '--disable-pip-version-check' 'install' '--no-deps' '--ignore-installed' '--no-build-isolation' '--no-warn-script-location' '--no-index' '--prefix=/root/.spack/bootstrap/store/linux-ubuntu20.04-x86_64/gcc-9.4.0/py-pip-22.1.2-rltemoksgf7tbslmak4yztuqseppc724' '/tmp/root/spack-stage/spack-stage-py-pip-22.1.2-rltemoksgf7tbslmak4yztuqseppc724/spack-src/pip-22.1.2-py3-none-any.whl'
See build log for details:
  /tmp/root/spack-stage/spack-stage-py-pip-22.1.2-rltemoksgf7tbslmak4yztuqseppc724/spack-build-out.txt

Without python3-dev:

==> Error: cannot bootstrap any of the isort executables from spec "[email protected]: %gcc target=x86_64" due to the following failures:
github-actions-v0.3 raised FileNotFoundError: [Errno 2] No such file or directory: '/root/spack/share/spack/bootstrap/github-actions-v0.3/py-isort.json'
github-actions-v0.2 raised ValueError: source is not trusted
github-actions-v0.1 raised ValueError: source is not trusted
spack-install raised NoHeadersError: Unable to locate python headers in any of these locations:
    /usr/include/python3.8
/usr/include/3.8
/usr/Headers
Run `spack --debug ...` for more detailed errors

Copy link
Copy Markdown

@pradyunsg pradyunsg Sep 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Debian and friends, you should include python3-venv and python3-distutils in the set of packages to be installed — Debian breaks up the Python standard library for some reason that I don’t fully understand and that breaks various packages and pip’s install mechanisms prior to Python 3.10, even though pip uses setuptools’ injection of distutils to ensure that packages with import distutils do the right thing in their build.

IIRC, there’s also a python3-full on newer versions of Debian but I’m not sure about the availability story if that in Debian/Ubuntu (i.e. versions).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you all!

What's the result on python3-dev - do we need that too or is python3-distutils sufficient?

Copy link
Copy Markdown
Member Author

@ax3l ax3l Oct 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debian/Ubuntu: Should we also add for S3 support the

... python3-pip python3-setuptools
python3 -m pip install boto3

as in our docker images? https://github.com/spack/spack/actions/runs/3216648825

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-dev provides headers, which you need for compiling c extensions.

Copy link
Copy Markdown
Member Author

@ax3l ax3l Oct 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I don't think we need that in bootstrapping Spack... When a Python package is built in Spack, we first build a full Python itself again.

@alalazo alalazo force-pushed the doc-build-matrix-started branch from 893d489 to c3ebf67 Compare September 5, 2022 12:39
ma595 pushed a commit to ma595/spack that referenced this pull request Sep 13, 2022
* Add: py-sphinx-design

Needed for spack#32480
@alalazo alalazo self-assigned this Sep 14, 2022
@alalazo alalazo force-pushed the doc-build-matrix-started branch from c3ebf67 to 81d15de Compare September 14, 2022 12:28
Copy link
Copy Markdown
Member

@alalazo alalazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the CSV table at the beginning of the section in favor of this matrix?

@ax3l
Copy link
Copy Markdown
Member Author

ax3l commented Oct 10, 2022

I thought the CSV table is a platform agnostic dependency overview... Thus I kept it for now.

ax3l added 2 commits October 10, 2022 09:57
Finally document what one needs to install to use Spack on
Linux and Mac :-)

With <3 for minimal container users and my colleagues with
their fancy Macs.
- build-essential: includes gcc, g++ (thx Cory)
- Python: add python3-venv, python3-distutils (thx Pradyun)
@ax3l ax3l force-pushed the doc-build-matrix-started branch from af9539f to 7f3e4aa Compare October 10, 2022 16:57
@ax3l ax3l enabled auto-merge (squash) October 10, 2022 17:24
@ax3l ax3l merged commit 9d89dba into spack:develop Oct 10, 2022
@ax3l ax3l deleted the doc-build-matrix-started branch October 11, 2022 23:25
luke-dt pushed a commit to dantaslab/spack that referenced this pull request Oct 12, 2022
* Docs: Getting Started Dependencies

Finally document what one needs to install to use Spack on
Linux and Mac :-)

With <3 for minimal container users and my colleagues with
their fancy Macs.

* Debian Update Packages: GCC, Python

- build-essential: includes gcc, g++ (thx Cory)
- Python: add python3-venv, python3-distutils (thx Pradyun)

* Add RHEL8 Dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core PR affects Spack core functionality documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants