Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Apr 2013 08:30:22 GMT
From:      "C. P. Ghost" <cpghost@cordula.ws>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/177576: math/maxima fails to start with SBCL and quicklisp
Message-ID:  <201304020830.r328UMiV028800@red.freebsd.org>
Resent-Message-ID: <201304020840.r328e0qb041590@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         177576
>Category:       ports
>Synopsis:       math/maxima fails to start with SBCL and quicklisp
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 02 08:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     C. P. Ghost
>Release:        FreeBSD 9.1-STABLE
>Organization:
Cordula's Web
>Environment:
FreeBSD phenom.cordula.ws 9.1-STABLE FreeBSD 9.1-STABLE #0 r248955: Sun Mar 31 22:50:51 CEST 2013     root@phenom.cordula.ws:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
math/maxima fails to start with SBCL when quicklisp is installed and enabled.

Because the maxima port is usually compiled as root but runs as a regular user, when it invokes SBCL with quicklisp enabled, it tries to access non-existent /root/.cache/common-lisp directory instead of $HOME/.cache/common-lisp of the invoking user. This causes SBCL to go into debugger-mode.

>How-To-Repeat:
Just install quicklisp for SBCL, i.e. add this to your ~/.sbclrc via quicklisp's setup function:

;;; The following lines added by ql:add-to-init-file:
#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
                                       (user-homedir-pathname))))
  (when (probe-file quicklisp-init)
    (load quicklisp-init)))

Then, make and install math/maxima port with SBCL as default lisp, and run as regular user.
>Fix:
As explained in the following bug report of a Linux distribution:
  https://bugs.archlinux.org/task/29882
we need to disable user-specific initializations, i.e. prevent ~/.sbclrc
from running when maxima is invoked.

To do this, apply the attached patch to the startup script.

Patch attached with submission follows:

--- src/maxima.in.orig	2012-12-04 06:54:50.000000000 +0100
+++ src/maxima.in	2013-04-02 10:08:59.000000000 +0200
@@ -196,7 +196,7 @@
   if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
     exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
   else
-    exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+    exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
   fi
 
 else


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304020830.r328UMiV028800>