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

Add debian/fedora/arch/conda package information to build/pkgs, generate Dockerfiles and installation help; add tox.ini #29053

Closed
mkoeppe opened this issue Jan 20, 2020 · 107 comments

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Jan 20, 2020

https://doc.sagemath.org/html/en/installation/source.html#linux-recommended-installation
gives apt-get install and yum install command lines to install system packages that will be recognized by build/pkgs/SPKG/spkg-configure.m4.

Several packages are missing, see comments in
https://github.com/sagemath/sage-prod/files/10659286/Dockerfile-ubuntu-minimal.gz

This ticket puts this information on a per-package basis into build/pkgs/SPKG/distros/debian.txt, .../fedora.txt, .../arch.txt for the following purposes:

  • sage -info SPKG prints out this information.

  • Provide a tox.ini that generates and runs Dockerfiles that test the installation on various systems. Example (running 3 builds in parallel):

       $ tox -p auto -e archlinux-latest,ubuntu-focal-minimal,debian-buster-maximal
    ⠸
    

Incidental change on this ticket:


Possible follow-up and related tickets:

Resources:

CC: @dimpase @embray @antonio-rojas @isuruf @timokau

Component: build

Author: Matthias Koeppe

Branch: 23c6334

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/29053

@mkoeppe mkoeppe added this to the sage-9.1 milestone Jan 20, 2020
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 21, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

3a5cfb7build/pkgs/*/debian.txt: Add optional packages

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 21, 2020

Commit: 3a5cfb7

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 25, 2020

Changed commit from 3a5cfb7 to 79d912e

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 25, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

79d912ebuild/pkgs/*/fedora.txt: New, from installation manual 9.0

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 25, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

8a739b1sage -info: Print info on equivalent system packages

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 25, 2020

Changed commit from 79d912e to 8a739b1

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 25, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

3ef64c4Document the debian.txt, fedora.txt files.
ebee631Add build/pkgs/gcc/fedora.txt
221c344Strip comments from debian.txt, fedora.txt files

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 25, 2020

Changed commit from 8a739b1 to 221c344

@mkoeppe

This comment has been minimized.

@dimpase
Copy link
Member

dimpase commented Jan 25, 2020

comment:7

how do you generate these per package?

by the way, Arch has namewise
a naming scheme close to Gentoo and Homebrew.

@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 25, 2020

comment:8

Replying to @dimpase:

how do you generate these per package?

I created these files by manual copy-paste from the installation manual.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 25, 2020

Changed commit from 221c344 to ff4a551

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 25, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

46957b4tox.ini: New - test spkg-configure on ubuntu docker images
ce99fadMerge tag '9.1.beta1' into t/29053/installation_manual__generate__apt_get_install__and__yum_install__lines_from_build_pkgs_at___bootstrap_time
0dd2c03build/bin/sage-spkg: Reformat the install command to 1 line
b5abc8bbuild/bin/sage-spkg: fixup
97b09deMake gfortran a standard package - it is a prereq of standard package numpy
ff4a551Fix typo

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title Installation manual: Generate 'apt-get install' and 'yum install' lines from build/pkgs at ./bootstrap time Add debian/fedora package information to build/pkgs, generate Dockerfiles and installation help Jan 25, 2020
@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 26, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

a472a9aAdd fedora and debian Docker tests
1a31b40src/doc/en/installation/{debian|fedora}[-optional].txt
0c2148emore envs

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 26, 2020

Changed commit from ff4a551 to 0c2148e

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 26, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

e38dd8esrc/doc/en/installation/source.rst: Use literalinclude

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 26, 2020

Changed commit from 0c2148e to e38dd8e

@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 26, 2020

Author: Matthias Koeppe

@embray
Copy link
Contributor

embray commented Feb 5, 2020

comment:71

Somehow missed this in the fervor over other issues, but this kicks ass, thank you! I'll open a ticket to adding cygwin to this as well. repology.org also just recently added Cygwin.

@embray
Copy link
Contributor

embray commented Feb 5, 2020

comment:72

One thing I might suggest is that rather than having the distro-specific commands hard-coded in sage-spkg, they could go in a text file or something, with the option to override and/or add support for other distros without having to patch sage-spkg.

That could be done in a follow-up though.

@dimpase
Copy link
Member

dimpase commented Feb 5, 2020

comment:73

Replying to @embray:

Somehow missed this in the fervor over other issues, but this kicks ass, thank you! I'll open a ticket to adding cygwin to this as well. repology.org also just recently added Cygwin.

see, mkoeppe practically buried me under his tickets, and then came you with #29118 :P

@mkoeppe
Copy link
Member Author

mkoeppe commented Feb 5, 2020

comment:74

Replying to @embray:

I'll open a ticket to adding cygwin to this as well. repology.org also just recently added Cygwin.

The cygwin ticket is #29106 (Add cygwin package information). It would be great if also corresponding CI scripts could be added, to help elevate the cygwin platform to a first class target for sage.

@mkoeppe
Copy link
Member Author

mkoeppe commented Feb 5, 2020

comment:75

Replying to @embray:

One thing I might suggest is that rather than having the distro-specific commands hard-coded in sage-spkg, they could go in a text file or something, with the option to override and/or add support for other distros without having to patch sage-spkg.

That could be done in a follow-up though.

Thanks, I have added this suggestion to #29146, which already has a number of ideas for improvements.

@mkoeppe
Copy link
Member Author

mkoeppe commented Feb 16, 2020

Changed branch from 23c6334 to u/mkoeppe/23c6334cf2927a4d917a27b3963471e8242d86a3

@mkoeppe
Copy link
Member Author

mkoeppe commented Feb 16, 2020

comment:77

(sorry, pushed to the wrong ticket by accident)

@mkoeppe
Copy link
Member Author

mkoeppe commented Feb 16, 2020

Changed branch from u/mkoeppe/23c6334cf2927a4d917a27b3963471e8242d86a3 to 23c6334

@kiwifb
Copy link
Member

kiwifb commented Feb 28, 2020

comment:78

Somehow in recent merges I experienced failure to build the documentation in sage-on-gentoo. It seems the literalinclude are causing me trouble.

[installat] The HTML pages are in ../../build_doc/html/en/installation.
Error building the documentation.
Traceback (most recent call last):
  File "sage_setup/docbuild/__main__.py", line 2, in <module>
    main()
  File "/dev/shm/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_7/sage_setup/docbuild/__init__.py", line 1720, in main
    builder()
  File "/dev/shm/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_7/sage_setup/docbuild/__init__.py", line 336, in _wrapper
    build_many(build_other_doc, L)
  File "/dev/shm/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_7/sage_setup/docbuild/__init__.py", line 280, in build_many
    _build_many(target, args, processes=NUM_THREADS)
  File "/dev/shm/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_7/sage_setup/docbuild/utils.py", line 283, in build_many
    raise worker_exc.original_exception
OSError: /dev/shm/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_7/doc/en/installation/source.rst:228: WARNING: Include file '/dev/shm/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_7/doc/en/installation/debian.txt' not found or reading it failed

I am thinking of removing the installation instruction from sage-on-gentoo but I am curious at what could have caused this. Especially when you consider that it started happening sometime after this ticket was merged. My last successful build of volker's branch is dated 20th of February and would corresponding to the first merging attempt of #21785.

@mkoeppe
Copy link
Member Author

mkoeppe commented Feb 28, 2020

comment:79

Replying to @kiwifb:

Somehow in recent merges I experienced failure to build the documentation in sage-on-gentoo. It seems the literalinclude are causing me trouble.

[installat] The HTML pages are in ../../build_doc/html/en/installation.
Error building the documentation.
...
OSError: /dev/shm/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_7/doc/en/installation/source.rst:228: WARNING: Include file '/dev/shm/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_7/doc/en/installation/debian.txt' not found or reading it failed

Yes, as of #26964, these files are being generated by bootstrap and are not sources in the git tree any more.

Distributors should build either from a bootstrapped source tree or from a sagelib sdist (see ticket #21516 - Fix sagelib sdist (src/setup.py sdist); which needs help).

I am thinking of removing the installation instruction from sage-on-gentoo

Yes, there's no point in shipping the installation manual with a distribution package.

@kiwifb
Copy link
Member

kiwifb commented Feb 28, 2020

comment:80

I see, a sagelib sdist is a good development as it makes it more like a regular python package I guess. But right now I am missing the ability to build sagelib directly from git head. Thanks for explanation.

@dimpase
Copy link
Member

dimpase commented Mar 3, 2020

comment:81

This has missed build/pkgs/r/ from #28884.
I've opened #29273 to deal with it.

@isuruf
Copy link
Member

isuruf commented Mar 11, 2020

comment:82

Replying to @mkoeppe:

Replying to @isuruf:

Replying to @mkoeppe:

@isuruf: Compiling python3 on conda-forge gives me an error that looks like it's related to ffi - https://github.com/mkoeppe/sage/runs/410329852

Looks like you are not activating the conda environment.

Thank you! That helped.
But now (https://github.com/mkoeppe/sage/runs/412042067), still in the python3 build, I am hitting again #29012:

Testing importing of various modules...
ctypes module imported OK
math module imported OK
hashlib module imported OK
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/sage/local/var/tmp/sage/build/python3-3.7.3.p1/src/Lib/crypt.py", line 3, in <module>
    import _crypt
ModuleNotFoundError: No module named '_crypt'
crypt module failed to import

This patch might help https://github.com/conda-forge/python-feedstock/blob/master/recipe/patches/0014-Fix-cross-compilation-on-Debian-based-distros.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants