Bug 234853 - math/maxima: Error with quicklisp at line 129 of quickliskp/setup.lisp
Summary: math/maxima: Error with quicklisp at line 129 of quickliskp/setup.lisp
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-11 12:51 UTC by jszhao
Modified: 2019-01-27 11:57 UTC (History)
2 users (show)

See Also:
salvadore: maintainer-feedback+


Attachments
maxima - quicklisp patch (1.44 KB, patch)
2019-01-18 21:07 UTC, Lorenzo Salvadore
salvadore: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jszhao 2019-01-11 12:51:25 UTC
Hi there,

I am not sure if it's a bug, because it is appear when I add quicklisp to .sbclrc.

zjs@xw6600:/home/zjs % cat .sbclrc

;;; 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, when I invoke maxima, give the following error messages:

zjs@xw6600:/home/zjs % maxima
While evaluating the form starting at line 129, column 0
  of #P"/home/zjs/quicklisp/setup.lisp":

debugger invoked on a SB-INT:SIMPLE-FILE-ERROR in thread
#<THREAD "main thread" RUNNING {10005585B3}>:
  Can't create directory /wrkdirs/

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

restarts (invokable by number or by possibly-abbreviated name):

[snip]


(ENSURE-DIRECTORIES-EXIST #P"/wrkdirs/usr/ports/math/maxima/work/.cache/common-lisp/sbcl-1.4.15-bsd-x64/home/zjs/quicklisp/quicklisp/package.fasl" :VERBOSE NIL :MODE 511)
0]

It seems that /wrkdirs/usr/ports/math/maxima/work/.cache/common-lisp/sbcl-1.4.15-bsd-x64/ comes from the image of maxima, and that causes the error.

Any hints? Thanks.
Comment 1 Lorenzo Salvadore freebsd_committer freebsd_triage 2019-01-11 13:06:20 UTC
I'm studying it. I will give feedback as soon as possible.
Comment 2 Lorenzo Salvadore freebsd_committer freebsd_triage 2019-01-18 21:07:02 UTC
Created attachment 201249 [details]
maxima - quicklisp patch

Here is a patch that should solve the problem.

The reporter was right suspecting that some path was hard coded into maxima's image. However, the path does not necessarily involves /wrkdirs/: it involves the path in which the port was built (probably the reporter was using poudriere).
Hence the bug's summary should be changed by someone who has the necessary permissions (reporter, triager or committer) to something more useful: I suggest "math/maxima: Error with quicklisp at line 129 of quickliskp/setup.lisp".

Now the fix. I added an option called NOUSERINIT, enabled by default: when enabled, if the chosen lisp implementation is sbcl (the default), it ensures that sbcl is run ignoring any user init file (~/.sbclrc). Thus sbcl can run with quicklisp whenever the user wants to run it, but, when the user runs sbcl only to run maxima quicklisp is not loaded and hence there is no search for the hard coded path into the maxima image.

I bumped PORTREVISION.

The patch was tested successfully on my system (12.0-RELEASE amd64) and with poudriere (12.0-RELEASE amd64).

Reporter: Can you please tell if the solution I propose is suited for your needs?
Comment 3 jszhao 2019-01-20 00:48:57 UTC
(In reply to Lorenzo Salvadore from comment #2)

I am OK with the solutions. Thanks!
Comment 4 Kurt Jaeger freebsd_committer freebsd_triage 2019-01-27 11:56:43 UTC
Committed, thanks!
Comment 5 commit-hook freebsd_committer freebsd_triage 2019-01-27 11:57:41 UTC
A commit references this bug:

Author: pi
Date: Sun Jan 27 11:56:41 UTC 2019
New revision: 491342
URL: https://svnweb.freebsd.org/changeset/ports/491342

Log:
  math/maxima: fix if quicklisp is being referenced in .sbclrc

  - adding a new option NOUSERINIT, enabled by default
    when enabled, if the chosen lisp implementation is sbcl (the default),
    it ensures that sbcl is run ignoring any user init file (~/.sbclrc)

  PR:		234853
  Submitted by:	Lorenzo Salvadore <phascolarctos@protonmail.ch> (maintainer)
  Reported by:	jszhao@yeah.net

Changes:
  head/math/maxima/Makefile