Opened 12 years ago

Closed 8 years ago

#38709 closed defect (fixed)

maxima @5.28.0_3+xmaxima binary package is inevitably obsolete

Reported by: kpreid (Kevin Reid) Owned by: KubaO (Kuba Ober)
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: easye, gwright@…, mkae (Marko Käning)
Port: maxima

Description

Maxima's compile process produces a SBCL (by default) memory image. This image can only be used with the exact version of the SBCL runtime it was created by. However, it appears that installation is defaulting to a precompiled package, which will be obsolete unless it is updated every time SBCL is.

Sign of the problem:

$ maxima
fatal error encountered in SBCL pid 28542:
can't load .core for different runtime, sorry

My evidence that the binary package is the cause: I uninstalled maxima, did sudo port install maxima +xmaxima, and then found

$ ls -l /opt/local/lib/maxima/5.28.0/binary-sbcl/maxima.core
-rw-r--r--  1 root  admin  82968624 Feb  6 03:27 /opt/local/lib/maxima/5.28.0/binary-sbcl/maxima.core

Since the file is two months old (and provided by the maxima port), I assume it came from a binary package. Also the installation log does not show a build:

$ sudo port install maxima +xmaxima
--->  Computing dependencies for maxima
--->  Fetching archive for maxima
--->  Attempting to fetch maxima-5.28.0_3+xmaxima.darwin_11.x86_64.tbz2 from http://packages.macports.org/maxima
--->  Attempting to fetch maxima-5.28.0_3+xmaxima.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/maxima
--->  Installing maxima @5.28.0_3+xmaxima
--->  Activating maxima @5.28.0_3+xmaxima
--->  Cleaning maxima
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.

To complete my report I would like to say that it works when built from source, but the build currently fails, in a way which is probably due to a known problem in SBCL 1.1.6 (<http://article.gmane.org/gmane.lisp.steel-bank.devel/17138>).

To correct this problem, a binary package of maxima must not be used, or must be updated whenever the sbcl port is. (It would also be nice if the “broken binaries” mechanism recognized a broken maxima, but I have no idea whether it generalizes in that way.)

Change History (12)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: easieste@… gwright@… kuba@… added

Yes, maxima should have its revision increased every time sbcl is updated; we've encountered this before (#27696, #37214). A comment should be added to the sbcl port to remind its maintainers to do this whenever they update the port.

comment:2 in reply to:  description Changed 12 years ago by neverpanic (Clemens Lang)

Replying to kpreid@…:

It would also be nice if the “broken binaries” mechanism recognized a broken maxima, but I have no idea whether it generalizes in that way.

No, it does not. To add support for this we would have to re-implement parts of the SBCL loader, and that hasn't been done and I also doubt it is feasible to do so for every runtime we have. Running every binary installed by MacPorts to test whether it loads correctly is also not an option.

comment:3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Has duplicate #38842.

comment:4 Changed 12 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

comment:5 in reply to:  1 Changed 12 years ago by ci42

Replying to ryandesign@…:

Yes, maxima should have its revision increased every time sbcl is updated; we've encountered this before (#27696, #37214). A comment should be added to the sbcl port to remind its maintainers to do this whenever they update the port.

Comment added in r105331.

comment:6 Changed 12 years ago by mkae (Marko Käning)

This is what I get if I try to rebuild maxima locally:

--->  Applying patches to maxima
--->  Configuring maxima
--->  Building maxima

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Ignore runtime option --eval "(progn (load \"../lisp-utils/defsystem.lisp\") (funcall (intern (symbol-name :operate-on-system) :mk) \"maxima\" :compile :verbose t) (sb-ext:quit))".
  1: [ABORT   ] Skip rest of --eval and --load options.
  2:            Skip to toplevel READ/EVAL/PRINT loop.
  3: [EXIT    ] Exit SBCL (calling #'EXIT, killing the process).

((LAMBDA (#:WHOLE-VAR-781 &AUX (#:N-ENV-782 SB-C:*LEXENV*)) :IN "/opt/local/var/macports/build/_opt_mports_dports_lang_sbcl/sbcl/work/sbcl-1.1.6/src/cold/compile-cold-sbcl.lisp") (SB-KERNEL:%SVSET A 0 (LIST 1 1)))
0]

comment:7 Changed 12 years ago by mkae (Marko Käning)

After trying to escape from the above state with CTRL+C and quite many newlines I finally managed to install maxima in a 2nd try:

^C


debugger invoked on a SB-SYS:INTERACTIVE-INTERRUPT:
  Interactive interrupt at #x7FFF80918932.

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Return from SB-UNIX:SIGINT.
  1:            Ignore runtime option --eval "(progn (load \"../lisp-utils/defsystem.lisp\") (funcall (intern (symbol-name :operate-on-system) :mk) \"maxima\" :compile :verbose t) (sb-ext:quit))".
  2: [ABORT   ] Skip rest of --eval and --load options.
  3:            Skip to toplevel READ/EVAL/PRINT loop.
  4: [EXIT    ] Exit SBCL (calling #'EXIT, killing the process).

("bogus stack frame")
0[2] markos-imac:maxima marko$ .

debugger invoked on a SB-INT:SIMPLE-STREAM-ERROR:
  couldn't read from #<SB-SYS:FD-STREAM for "the terminal" {100298B743}>:
    Input/output error

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Return from SB-UNIX:SIGINT.
  1:            Ignore runtime option --eval "(progn (load \"../lisp-utils/defsystem.lisp\") (funcall (intern (symbol-name :operate-on-system) :mk) \"maxima\" :compile :verbose t) (sb-ext:quit))".
  2: [ABORT   ] Skip rest of --eval and --load options.
  3:            Skip to toplevel READ/EVAL/PRINT loop.
  4: [EXIT    ] Exit SBCL (calling #'EXIT, killing the process).

(SB-IMPL::SIMPLE-STREAM-PERROR "couldn't read from ~S" #<SB-SYS:FD-STREAM for "the terminal" {100298B743}> 5)
0[3]
markos-imac:maxima marko$ 


debugger invoked on a SB-INT:SIMPLE-STREAM-ERROR:
  couldn't read from #<SB-SYS:FD-STREAM for "the terminal" {100298B743}>:
    Input/output error

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Return from SB-UNIX:SIGINT.
  1:            Ignore runtime option --eval "(progn (load \"../lisp-utils/defsystem.lisp\") (funcall (intern (symbol-name :operate-on-system) :mk) \"maxima\" :compile :verbose t) (sb-ext:quit))".
  2: [ABORT   ] Skip rest of --eval and --load options.
  3:            Skip to toplevel READ/EVAL/PRINT loop.
  4: [EXIT    ] Exit SBCL (calling #'EXIT, killing the process).

(SB-IMPL::SIMPLE-STREAM-PERROR "couldn't read from ~S" #<SB-SYS:FD-STREAM for "the terminal" {100298B743}> 5)
0[4] markos-imac:maxima marko$ 


debugger invoked on a SB-INT:SIMPLE-STREAM-ERROR:
  couldn't read from #<SB-SYS:FD-STREAM for "the terminal" {100298B743}>:
    Input/output error

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Return from SB-UNIX:SIGINT.
  1:            Ignore runtime option --eval "(progn (load \"../lisp-utils/defsystem.lisp\") (funcall (intern (symbol-name :operate-on-system) :mk) \"maxima\" :compile :verbose t) (sb-ext:quit))".
  2: [ABORT   ] Skip rest of --eval and --load options.
  3:            Skip to toplevel READ/EVAL/PRINT loop.
  4: [EXIT    ] Exit SBCL (calling #'EXIT, killing the process).

(SB-IMPL::SIMPLE-STREAM-PERROR "couldn't read from ~S" #<SB-SYS:FD-STREAM for "the terminal" {100298B743}> 5)
0[5] markos-imac:maxima marko$ 


debugger invoked on a SB-INT:SIMPLE-STREAM-ERROR:
  couldn't read from #<SB-SYS:FD-STREAM for "the terminal" {100298B743}>:
    Input/output error

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Return from SB-UNIX:SIGINT.
  1:            Ignore runtime option --eval "(progn (load \"../lisp-utils/defsystem.lisp\") (funcall (intern (symbol-name :operate-on-system) :mk) \"maxima\" :compile :verbose t) (sb-ext:quit))".
  2: [ABORT   ] Skip rest of --eval and --load options.
  3:            Skip to toplevel READ/EVAL/PRINT loop.
  4: [EXIT    ] Exit SBCL (calling #'EXIT, killing the process).

(SB-IMPL::SIMPLE-STREAM-PERROR "couldn't read from ~S" #<SB-SYS:FD-STREAM for "the terminal" {100298B743}> 5)
0[6] markos-imac:maxima marko$ 
markos-imac:maxima marko$ 
markos-imac:maxima marko$ 


debugger invoked on a SB-INT:SIMPLE-STREAM-ERROR:
  couldn't read from #<SB-SYS:FD-STREAM for "the terminal" {100298B743}>:
    Input/output error

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Return from SB-UNIX:SIGINT.
  1:            Ignore runtime option --eval "(progn (load \"../lisp-utils/defsystem.lisp\") (funcall (intern (symbol-name :operate-on-system) :mk) \"maxima\" :compile :verbose t) (sb-ext:quit))".
  2: [ABORT   ] Skip rest of --eval and --load options.
  3:            Skip to toplevel READ/EVAL/PRINT loop.
  4: [EXIT    ] Exit SBCL (calling #'EXIT, killing the process).

(SB-IMPL::SIMPLE-STREAM-PERROR "couldn't read from ~S" #<SB-SYS:FD-STREAM for "the terminal" {100298B743}> 5)
0[7] markos-imac:maxima marko$ 


debugger invoked on a SB-INT:SIMPLE-STREAM-ERROR:
  couldn't read from #<SB-SYS:FD-STREAM for "the terminal" {100298B743}>:
    Input/output error

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Return from SB-UNIX:SIGINT.
  1:            Ignore runtime option --eval "(progn (load \"../lisp-utils/defsystem.lisp\") (funcall (intern (symbol-name :operate-on-system) :mk) \"maxima\" :compile :verbose t) (sb-ext:quit))".
  2: [ABORT   ] Skip rest of --eval and --load options.
  3:            Skip to toplevel READ/EVAL/PRINT loop.
  4: [EXIT    ] Exit SBCL (calling #'EXIT, killing the process).

(SB-IMPL::SIMPLE-STREAM-PERROR "couldn't read from ~S" #<SB-SYS:FD-STREAM for "the terminal" {100298B743}> 5)
0[8] markos-imac:maxima marko$ 


debugger invoked on a SB-INT:SIMPLE-STREAM-ERROR:
  couldn't read from #<SB-SYS:FD-STREAM for "the terminal" {100298B743}>:
    Input/output error

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Return from SB-UNIX:SIGINT.
  1:            Ignore runtime option --eval "(progn (load \"../lisp-utils/defsystem.lisp\") (funcall (intern (symbol-name :operate-on-system) :mk) \"maxima\" :compile :verbose t) (sb-ext:quit))".
  2: [ABORT   ] Skip rest of --eval and --load options.
  3:            Skip to toplevel READ/EVAL/PRINT loop.
  4: [EXIT    ] Exit SBCL (calling #'EXIT, killing the process).

(SB-IMPL::SIMPLE-STREAM-PERROR "couldn't read from ~S" #<SB-SYS:FD-STREAM for "the terminal" {100298B743}> 5)
0[9] markos-imac:maxima marko$ 


debugger invoked on a SB-INT:SIMPLE-STREAM-ERROR:
  couldn't read from #<SB-SYS:FD-STREAM for "the terminal" {100298B743}>:
    Input/output error

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Return from SB-UNIX:SIGINT.
  1:            Ignore runtime option --eval "(progn (load \"../lisp-utils/defsystem.lisp\") (funcall (intern (symbol-name :operate-on-system) :mk) \"maxima\" :compile :verbose t) (sb-ext:quit))".
  2: [ABORT   ] Skip rest of --eval and --load options.
  3:            Skip to toplevel READ/EVAL/PRINT loop.
  4: [EXIT    ] Exit SBCL (calling #'EXIT, killing the process).

(SB-IMPL::SIMPLE-STREAM-PERROR "couldn't read from ~S" #<SB-SYS:FD-STREAM for "the terminal" {100298B743}> 5)
0[10] markos-imac:maxima marko$ 
Help! 11 nested errors. SB-KERNEL:*MAXIMUM-ERROR-DEPTH* exceeded.
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1002989BC3}>
Help! 11 nested errors. SB-KERNEL:*MAXIMUM-ERROR-DEPTH* exceeded.
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1002989BC3}>
Help! 11 nested errors. SB-KERNEL:*MAXIMUM-ERROR-DEPTH* exceeded.
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1002989BC3}>
markos-imac:maxima marko$ Help! 11 nested errors. SB-KERNEL:*MAXIMUM-ERROR-DEPTH* exceeded.
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1002989BC3}>
Help! 11 nested errors. SB-KERNEL:*MAXIMUM-ERROR-DEPTH* exceeded.
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1002989BC3}>
Help! 11 nested errors. SB-KERNEL:*MAXIMUM-ERROR-DEPTH* exceeded.
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1002989BC3}>
Help! 11 nested errors. SB-KERNEL:*MAXIMUM-ERROR-DEPTH* exceeded.
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1002989D53}>
Help! 11 nested errors. SB-KERNEL:*MAXIMUM-ERROR-DEPTH* exceeded.
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1002989D53}>

markos-imac:maxima marko$ 
markos-imac:maxima marko$ 
markos-imac:maxima marko$ 
markos-imac:maxima marko$ 
markos-imac:maxima marko$ 
markos-imac:maxima marko$ sudo port install
--->  Computing dependencies for maxima
--->  Building maxima
--->  Staging maxima into destroot
--->  Installing maxima @5.28.0_5+xmaxima
--->  Deactivating maxima @5.28.0_3+xmaxima
--->  Cleaning maxima
--->  Activating maxima @5.28.0_5+xmaxima
--->  Cleaning maxima

Wondering what was going on here...

comment:8 Changed 12 years ago by kpreid (Kevin Reid)

mk: Just FYI, the first message was SBCL's interactive debugger prompt. The actual error message which caused it (which would ordinarily be just before "Type HELP..." as you saw for the nested errors) will probably be found in MacPorts' usual build log file.

The rest of the mess looks like sbcl and your shell fighting over the terminal input somehow (note the shell prompts mixed in with sbcl prompts), presumably because sbcl wasn't expecting to be non-interactive and MacPorts had already exited.

I suggest that the port should build with SBCL core option --disable-debugger to prevent this; I took a look at the portfile but it seems to be invoking a build tool provided by maxima rather than sbcl directly, so I can't comment on where to insert that option.

comment:9 Changed 12 years ago by kpreid (Kevin Reid)

FYI, I port upgrade outdateded yesterday and now have a working maxima with these versions:

  maxima @5.28.0_4+xmaxima (active)
  sbcl @1.1.6_1 (active)
  wxMaxima @12.01.0_0+wxwidgets_devel (active)
Version 0, edited 12 years ago by kpreid (Kevin Reid) (next)

comment:10 Changed 8 years ago by mf2k (Frank Schima)

Cc: KubaO removed
Owner: changed from macports-tickets@… to KubaO
Status: newassigned

comment:11 Changed 8 years ago by KubaO (Kuba Ober)

Please close as resolved. I have no permissions to modify any tickets (including my own).

comment:12 Changed 8 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.