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

Support system installations of ECL and fix the kenzo SPKG build #29617

Closed
thierry-FreeBSD opened this issue Apr 29, 2020 · 110 comments
Closed

Support system installations of ECL and fix the kenzo SPKG build #29617

thierry-FreeBSD opened this issue Apr 29, 2020 · 110 comments

Comments

@thierry-FreeBSD
Copy link

I tried to use ECL and Maxima from system packages as suggested by #27330, but without success for the moment.

The spkg-configure.m4 are trivial (see attachments), but the problems occur during build:

In [dochtml] [manifolds] this error is produced:

RuntimeError: ECL says: The function SET-LOCALE-SUBDIR is undefined

Actually this error is reproducible out of the Sage's build mechanism:

$ ecl
> (require 'maxima)
> (in-package :maxima)
MAXIMA> (set-locale-subdir)
Condition of type: UNDEFINED-FUNCTION
The function MAXIMA::SET-LOCALE-SUBDIR is undefined.

According to Maxima's code, set-locale-subdir is defined in src/init-cl.lisp and:

    ;; If a file is declared as private-file it is loaded
    ;; from the build tree (which makes an out-of-tree
    ;; build possible), but not compiled (which means
    ;; that with ECL or ABCL it won't end up in the final image)
    ;; => no out-of-tree build for ECL.

Maybe someone with Lisp-fu could patch it, if possible?

Depends on #31593

CC: @orlitzky @kiwifb @antonio-rojas @spaghettisalat @tobiasdiez @isuruf @mkoeppe @miguelmarco @jhpalmieri @jcuevas-rozo @slel @vbraun

Component: build: configure

Keywords: ECL, Maxima

Author: Thierry Thomas, Dima Pasechnik, Michael Orlitzky

Branch/Commit: 5cbe423

Reviewer: Matthias Koeppe

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

@thierry-FreeBSD
Copy link
Author

To be copied as build/pkgs/ecl/spkg-configure.m4

@thierry-FreeBSD
Copy link
Author

Attachment: ecl_spkg-configure.m4.gz

Attachment: maxima_spkg-configure.m4.gz

To be copied as build/pkgs/maxima/spkg-configure.m4

@thierry-FreeBSD
Copy link
Author

comment:1

Note: I also tried to use only ECL from the system packages, and build maxima from Sage, but in this case Maxima fails

  • with the default ECLDIR in sage-env the cmp lisp files are not found:
ecl -norc -eval '(progn (load "../lisp-utils/defsystem.lisp") (load "../lisp-utils/make-depends.lisp") (funcall (intern "CREATE-DEPENDENCY-FILE" :mk) "binary-ecl/maxima" "ecl-depends.mk") (quit))'
;;; Loading "/usr/ports/math/sage/work/stage/usr/local/var/tmp/sage/build/maxima-5.42.2/src/src/../lisp-utils/defsystem.lisp"
An error occurred during initialization:
Filesystem error with pathname #P"SYS:CMP.NEWEST".
  • when ECLDIR is patched to the right value, that works, but it fails when it tries to install the maxima library under this directory (unless you are root!).

@orlitzky
Copy link
Contributor

comment:2

I would wait for #22191 before attempting this if I were you. We have a mountain of patches for ecl-16.1.2 that won't be present in any system copy, and ecl-16.1.3 is incompatible with sage (that's why we haven't upgraded to it after so many years). The latest v20.4.24 release is from just a few days ago, though, and with any luck it will work (unpatched) with sage and we can look for v20.4.24 on the system.

@thierry-FreeBSD
Copy link
Author

comment:3

OK, in FreeBSD the ECL system package is at 16.1.3!

I did not know that it was incompatible with sage, maybe this is the source of the problem, thanks.

@thierry-FreeBSD
Copy link
Author

Dependencies: #22191

@thierry-FreeBSD
Copy link
Author

comment:5

Note: applying patches from build/pkgs/ecl/patches and build/pkgs/maxima/patches to the FreeBSD ports, I have been able to use them as system packages. For ECL 16.1.3, the patches from #22191 are required.

@dimpase
Copy link
Member

dimpase commented Jul 31, 2020

comment:6

perhaps one can get FreeBSD's ECL bumped to v20.4.24 ? Well, we do ship a lot of patches for it in #22191 - but they are all upstream patches.

@dimpase
Copy link
Member

dimpase commented Aug 11, 2020

Changed dependencies from #22191 to #28991

@dimpase
Copy link
Member

dimpase commented Aug 11, 2020

Changed author from gh-thierry-FreeBSD to Thierry Thomas

@dimpase
Copy link
Member

dimpase commented Sep 9, 2020

New commits:

05ae4d4adding spkg-configure for ecl

@dimpase
Copy link
Member

dimpase commented Sep 9, 2020

Changed author from Thierry Thomas to Thierry Thomas, Dima Pasechnik

@dimpase
Copy link
Member

dimpase commented Sep 9, 2020

Commit: 05ae4d4

@dimpase
Copy link
Member

dimpase commented Sep 9, 2020

Branch: u/dimpase/packages/eclconfig

@dimpase
Copy link
Member

dimpase commented Sep 9, 2020

comment:9

It appears that perhaps Gentoo's ecl misses a number of important patches - in particular it can't build maxima.fas (some path mixup).

@dimpase dimpase added this to the sage-9.3 milestone Sep 9, 2020
@orlitzky
Copy link
Contributor

orlitzky commented Sep 9, 2020

comment:11

I'm not an ecl maintainer, so we will probably have to wait for the next point release of ecl to address all of the bugs that sage fixes with patches. Afterwards the spkg-configure.m4 should check for a version newer than that patch release.

If we add this spkg-configure now, we're going to be in a position similar to the one we were in with pari a few months ago. The upstream release is unsuitable, so we need to test for all of the bugs fixed by the custom patches so that we don't accept a distro version that's missing them.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 8, 2020

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

3b7c2f6adding spkg-configure for ecl

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 8, 2020

Changed commit from 05ae4d4 to 3b7c2f6

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 8, 2020

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

301800fadding spkg-configure for ecl

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 8, 2020

Changed commit from 3b7c2f6 to 301800f

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 8, 2020

Changed commit from 301800f to 83b9f9d

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 8, 2020

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

83b9f9dadding spkg-configure for ecl

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 8, 2020

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

d5a4fc0adding spkg-configure for ecl

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Apr 7, 2021
@dimpase
Copy link
Member

dimpase commented Apr 7, 2021

comment:75

is kenzo build fixed? I'm getting (on macOS/homebrew), with ecl from Homebrew

[kenzo-1.1.9] Package 'kenzo' is currently not installed
[kenzo-1.1.9] No legacy uninstaller found for 'kenzo'; nothing to do
[kenzo-1.1.9] sed: 1: "compile.lisp": command c expects \ followed by text
[kenzo-1.1.9] ********************************************************************************
[kenzo-1.1.9] failed to update make-build invocation

@dimpase dimpase modified the milestones: sage-9.4, sage-9.3 Apr 7, 2021
@orlitzky
Copy link
Contributor

orlitzky commented Apr 8, 2021

comment:77

Replying to @miguelmarco:

I have done some tests on that. Might release a new version with this change in a few days, after some testing.

So, to make sure: can you confirm that changing from

(asdf:make-build :kenzo :type :fasl :monolithic t :move-here #P".")

to

(asdf:operate 'asdf:monolithic-compile-bundle-op :kenzo)

in the compile.lisp file would solve the problem?

It fixes the build for my system ECL (with ASDF unbundled). If it also works with sage's ECL spkg, I think we have a solution. Thanks!

@miguelmarco
Copy link
Contributor

comment:78

I just made a new release. You can get the tarball at https://github.com/miguelmarco/kenzo/releases/download/1.1.10/kenzo-1.1.10.tar.gz

Please check that it solves the problem, and then we can update the kenzo Sage package.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 8, 2021

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

27727acbuild/pkgs/ecl/distros/arch.txt: New
38cc46dTrac #29617: check for ecl-config instead of ecl.
18cbceeTrac #29617: compile a check for ECL_VERSION_NUMBER.
444d828Trac #29617: substitute ecl-config path into sage_conf.
4061f54Trac #29617: remove failing ECL test.
edd246fTrac #29617: don't set ECLDIR in sage-env.
133aab7Trac #29617: move MAXIMA_FAS to sage_conf.
9b595c0Trac #29617: modify Kenzo interface to support system ECL.
b4ae35eTrac #29617: treat empty MAXIMA_FAS and KENZO_FAS as None.
2d40f36Trac #29617: upgrade kenzo to v1.1.10.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 8, 2021

Changed commit from 1615691 to 2d40f36

@orlitzky
Copy link
Contributor

orlitzky commented Apr 8, 2021

comment:80

The kenzo upgrade is now included, and my previous broken spkg-install hack removed. Everything still works with system ECL.

Github has helpfully disabled actions on my account after the last run, and I'm waiting to hear back from support. Can someone else kick off a CI run please?

@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 9, 2021

@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 9, 2021

comment:81

Running at https://github.com/mkoeppe/sage/actions/runs/732049335 (with a bunch of other tickets)

@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 10, 2021

Changed reviewer from https://github.com/mkoeppe/sage/actions/runs/732049335 to Matthias Koeppe

@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 10, 2021

comment:82

One of the bunch of tickets was broken; the failures that you see in the run are from that.

A new run is at https://github.com/mkoeppe/sage/actions/runs/733869032:

Correctly accepts system ecl on homebrew-macos-11.0-xcode_default-standard (https://github.com/mkoeppe/sage/runs/2308094353) and has clean doctests

Correctly accepts system ecl on gentoo-standard (https://github.com/mkoeppe/sage/runs/2308093679). The build completes. The numerous doctest failures are from the unrelated unfortunate situation described in #31578

Correctly accepts system ecl on fedora-34-standard (https://github.com/mkoeppe/sage/runs/2308093524), but the build fails for unrelated reasons

Correctly rejects too old system ecl on other platforms.

Build of kenzo was tested in https://github.com/mkoeppe/sage/actions/runs/732049334, looks OK.

@mkoeppe
Copy link
Contributor

mkoeppe commented May 26, 2021

Changed branch from u/mjo/ticket/29617 to u/mkoeppe/ticket/29617

@slel

This comment has been minimized.

@slel
Copy link
Member

slel commented May 26, 2021

New commits:

5161d65build/pkgs/sage_conf/src/sage_conf.py.in: Move SAGE_ROOT, SAGE_LOCAL to beginning of file; only use substitution @prefix@ once
986ca18build/pkgs/sage_conf/src/sage_conf.py.in: replace subst by replace
2078fa6Merge tag '9.4.beta0' into t/31593/configure__paths_within__sage_local___prefix__for_sage_conf
5cbe423Merge #31593

@slel
Copy link
Member

slel commented May 26, 2021

Changed commit from 2d40f36 to 5cbe423

@vbraun
Copy link
Member

vbraun commented Jun 20, 2021

Changed branch from u/mkoeppe/ticket/29617 to 5cbe423

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

9 participants