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

alpine linux: Add system package information / tox.ini, fix flint, giac, cvxopt #33083

Closed
mkoeppe opened this issue Dec 26, 2021 · 75 comments · Fixed by #35285
Closed

alpine linux: Add system package information / tox.ini, fix flint, giac, cvxopt #33083

mkoeppe opened this issue Dec 26, 2021 · 75 comments · Fixed by #35285

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 26, 2021

To test: tox -e docker-alpine-standard

Depends on #33070
Depends on #33138

Upstream: Reported upstream. No feedback yet.

CC: @dimpase @slel @frederichan-IMJPRG @sagetrac-parisse @dkwo @tornaria @orlitzky

Component: porting

Author: Matthias Koeppe, Dima Pasechnik

Reviewer: Dima Pasechnik

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

@mkoeppe mkoeppe added this to the sage-9.5 milestone Dec 26, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 26, 2021

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 26, 2021

Commit: 1a49d24

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 26, 2021

New commits:

1a49d24tox.ini, build/bin/write-dockerfile.sh, build/bin/sage-print-system-package-command: Add alpine

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 26, 2021

Author: Matthias Koeppe

@mkoeppe

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 26, 2021

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

d1a9266Add more alpine.txt

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 26, 2021

Changed commit from 1a49d24 to d1a9266

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 27, 2021

comment:5
  [r-3.6.3]   ********************************************************************************
  [r-3.6.3]   /sage/build/bin/sage-dist-helpers: line 143: fmt: command not found
  [r-3.6.3]   ********************************************************************************

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 27, 2021

Changed commit from d1a9266 to 522c452

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 27, 2021

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

522c452build/pkgs/_prereq/distros/alpine.txt: Add coreutils

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 27, 2021

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

f3e59a6build/pkgs/{graphviz,qhull,r}/distros/alpine.txt: Add non-dev packages

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 27, 2021

Changed commit from 522c452 to f3e59a6

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 27, 2021

comment:8

flint

In file included from /sage/local/var/tmp/sage/build/flint-2.7.1/src/thread_support.h:16,
                 from /sage/local/var/tmp/sage/build/flint-2.7.1/src/nmod_mat.h:35,
                 from /sage/local/var/tmp/sage/build/flint-2.7.1/src/nmod_poly.h:34,
                 from /sage/local/var/tmp/sage/build/flint-2.7.1/src/fmpz_poly.h:35,
                 from /sage/local/var/tmp/sage/build/flint-2.7.1/src/aprcl.h:18,
                 from config_gauss.c:12:
/sage/local/var/tmp/sage/build/flint-2.7.1/src/thread_pool.h:55:5: error: unknown type name 'cpu_set_t'
   55 |     cpu_set_t original_affinity;
      |     ^~~~~~~~~

giac:

In file included from History.cc:8:
first.h: In function 'float fgamma(float)':
first.h:546:39: error: 'gammaf' was not declared in this scope; did you mean 'tgammaf'?
  546 | inline float fgamma(float f1){ return gammaf(f1); } // or tgammaf(f1) on some versions of emscripten
      |                                       ^~~~~~
      |                                       tgammaf
make[5]: *** [Makefile:976: History.lo] Error 1

@dimpase
Copy link
Member

dimpase commented Dec 27, 2021

comment:9

there is also mpfr-dev for mpfr.

@dimpase
Copy link
Member

dimpase commented Dec 27, 2021

comment:10

see flintlib/flint#1054 for Flint error

Probably as a workaround on can put -D_GNU_SOURCE into CFLAGS.

@dimpase
Copy link
Member

dimpase commented Dec 27, 2021

Upstream: Reported upstream. No feedback yet.

@dkwo
Copy link

dkwo commented Dec 27, 2021

comment:12

That's indeed what we do on Void linux, see https://github.com/void-linux/void-packages/blob/master/srcpkgs/flintlib/template

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 27, 2021

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

095569bbuild/pkgs/mpfr/distros/alpine.txt: New
d7b89f1build/pkgs/flint/spkg-install.in: Use -D_GNU_SOURCE

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 27, 2021

Changed commit from f3e59a6 to d7b89f1

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 27, 2021

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 27, 2021

comment:15

From https://www.gnu.org/software/libc/manual/html_node/Special-Functions.html:

Function: double gamma (double x)
Function: float gammaf (float x)
Function: long double gammal (long double x)
Preliminary: | MT-Unsafe race:signgam | AS-Unsafe | AC-Safe | See POSIX Safety Concepts.

These functions exist for compatibility reasons. They are equivalent to lgamma etc. It is better to use lgamma since for one the name reflects better the actual computation, and moreover lgamma is standardized in ISO C99 while gamma is not.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 27, 2021

comment:16

Has this patch been submitted to upstream giac?

@mkoeppe mkoeppe changed the title System package information / tox.ini / GH Actions for alpine linux alpine linux: Add system package information / tox.ini, fix flint and giac Dec 27, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 27, 2021

comment:17

There seems to be some confusion between gamma and log of gamma here.

@dkwo
Copy link

dkwo commented Dec 28, 2021

comment:18

Does this test pass on Alpine?

sage -t /usr/lib/sage-9.5.beta9/src/sage/matrix/matrix_mod2_dense.pyx # 1 doctest failed

It's the last one failing on Void with musl 1.2.2,
where it gives

cysignals.signals.SignalError: matrix allocation failed

instead of

RuntimeError: matrix allocation failed

so I wonder if the result is the same on Alpine,
and whether possibly the test result should be updated.

@dimpase
Copy link
Member

dimpase commented Jan 11, 2022

comment:51

Replying to @mkoeppe:

Replying to @dimpase:

Replying to @sagetrac-git:

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

455e1fa build/pkgs/numpy/spkg-install.in: Use pip wheel --no-use-pep517
1fe1e85 Merge #33138

This gives a different error

Works fine here. How are you testing this?

running Apline in an lxc container.
Using their Python 3.10, their openblas - I guess that's the only pieces of the config puzzle that matter.

That's the same error as I get while trying to build numpy wheel without Sage using pip,
just by running pip wheel -e . in the unzipped numpy distro. (same error on their master from the repo, too),

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 11, 2022

comment:52

Your installation is broken somehow

@dimpase
Copy link
Member

dimpase commented Jan 11, 2022

comment:53

Maybe, but "No such file or directory" error ought to be traceable...

@dimpase
Copy link
Member

dimpase commented Jan 12, 2022

Reviewer: Dima Pasechnik

@dimpase
Copy link
Member

dimpase commented Jan 12, 2022

comment:54

OK, let's get this in. (the lxc container setup might be to blame for the numpy issue I keep seeing)

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 12, 2022

comment:55

Looks like the added flags break the build of arb on Debian variants - https://github.com/mkoeppe/sage/runs/4785815685?check_suite_focus=true

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 17, 2022

comment:57

Replying to @orlitzky:

Replying to @mkoeppe:

This problem is again - our build/pkgs/suitesparse/spkg-configure.m4 finds suitesparse but forgets to tell anyone where it was found.

Suitesparse found in the system library/header path but cvxopt tries to guess it anyway?

This has been reported a few times,

For now we'll probably be adding another special case to

https://github.com/cvxopt/cvxopt/blob/master/setup.py#L55

See also #31905

@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 May 3, 2022
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 18, 2022

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

2575abftox.ini, build/bin/write-dockerfile.sh, build/bin/sage-print-system-package-command: Add alpine
fc4ea60Add more alpine.txt
8766a06build/pkgs/_prereq/distros/alpine.txt: Add coreutils
0ebfc9ebuild/pkgs/{graphviz,qhull,r}/distros/alpine.txt: Add non-dev packages
b3abd3bbuild/pkgs/mpfr/distros/alpine.txt: New
30988eabuild/pkgs/flint/spkg-install.in: Use -D_GNU_SOURCE
829a7d0mpc
d3ef3d4correct flags of flint and arb for musl libc
bd34cd5build/pkgs/giac/spkg-install.in: Add workaround for musl libc

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 18, 2022

Changed commit from 1fe1e85 to bd34cd5

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 7, 2022

Changed commit from bd34cd5 to f453452

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 7, 2022

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

f453452Merge tag '9.7.beta4' into t/33083/system_package_information___tox_ini___gh_actions_for_alpine_linux

@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Aug 31, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.8, sage-9.9 Jan 7, 2023
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 14, 2023

Removed branch from issue description; replaced by PR #35285

@mkoeppe mkoeppe removed this from the sage-10.0 milestone Apr 30, 2023
@vbraun vbraun closed this as completed in 1ed5b51 Oct 8, 2023
@mkoeppe mkoeppe added this to the sage-10.2 milestone Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants