On Sun, May 10, 2020 at 2:02 PM Thierry Thomas <remove.t...@gmail.com> wrote: > > Hello, > > TL;TR: Packagers, how do you deal with Sage to package it for your Linux > distribution (or *BSD system)?
Note that people packaging Sage for Debian, Arch, NixOS are active here: https://groups.google.com/forum/#!forum/sage-packaging You can also have a look at say Debian sagemath package: https://packages.debian.org/sid/sagemath Sagemath packages which are "straight" C/C++ libraries may be installed (mostly) using the usual `make install` targets, I suppose (with appropriate --prefix set at configure stage (replace/change calls to sdh_configure by something else) You might like to replace calls to sdh_install, sdh_make_install etc in spkg-install.in to something like `make install`. HTH Dima > > Details: > > Sage has been ported to FreeBSD many years ago (4.8), but now the port > is lagging and no more packages are built; I'm trying to fix it. > > Problem: on FreeBSD, packages are built (by a porter or in the > compilation farm) as a regular user, and installed in a staging > directory (DESTDIR); then the package is installed as root in the final > $PREFIX (ldconfig and so on are executed). > > The naming may differ, but many packaging systems have a similar > mechanism. > > But Sage cannot be built with this method: the global install target is > a no-op, and every sub-package is built and installed during the build > target, under $SAGE_LOCAL, and everything is built relatively to this > directory. If you try to move the resulting bits to another directory, > it becomes unusable. > > $SAGE_DESTDIR is handled, but does not solve this problem. > > A first way to deal with it is to use as many system packages as > possible (see #27330): Sage´s libraries built around a system package > are safe. > > For example, with the stock sage-9.1.rc3, when setting SAGE_LOCAL to my > staging directory, these errors are emitted for cvxopt: > > Error: 'lib/python3.7/site-packages/cvxopt/umfpack.so' is referring to > /usr/ports/math/sage/work/stage > Error: 'lib/python3.7/site-packages/cvxopt/base.so' is referring to > /usr/ports/math/sage/work/stage > Error: 'lib/python3.7/site-packages/cvxopt/amd.so' is referring to > /usr/ports/math/sage/work/stage > Error: 'lib/python3.7/site-packages/cvxopt/misc_solvers.so' is referring to > /usr/ports/math/sage/work/stage > Error: 'lib/python3.7/site-packages/cvxopt/blas.so' is referring to > /usr/ports/math/sage/work/stage > Error: 'lib/python3.7/site-packages/cvxopt/gsl.so' is referring to > /usr/ports/math/sage/work/stage > Error: 'lib/python3.7/site-packages/cvxopt/cholmod.so' is referring to > /usr/ports/math/sage/work/stage > Error: 'lib/python3.7/site-packages/cvxopt/glpk.so' is referring to > /usr/ports/math/sage/work/stage > Error: 'lib/python3.7/site-packages/cvxopt/lapack.so' is referring to > /usr/ports/math/sage/work/stage > Error: > 'lib/python3.7/site-packages/sage/numerical/backends/cvxopt_sdp_backend.so' > is referring to /usr/ports/math/sage/work/stage > Error: > 'lib/python3.7/site-packages/sage/numerical/backends/cvxopt_backend.so' is > referring to /usr/ports/math/sage/work/stage > > When using cvxopt from a system package (see #29665), these errors are > resolved. Unfortunately, even if the proposed method seems OK from my > packager´s POV, it seems that this is not the way to go: see #29023. > > Several interesting propositions exist in #29133 (#21566), and things > like #29653 are also helping, but these are middle or long term goals. > > And so my initial question: how do you package the actual releases? (9.0 > or 9.1) > > Many thanks for reading and for your feedback! > -- > Th. Thomas. > > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-devel+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-devel/20200510130219.GA64618%40graf.pompo.net. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq2prG_xCT-xUgkdHHNHA_CkQ%3DhmQ8ONp_46pTwPTi9PHw%40mail.gmail.com.