cl-repl icon indicating copy to clipboard operation
cl-repl copied to clipboard

How to distribute

Open koji-kojiro opened this issue 6 years ago • 4 comments

Current:

  • via ros install

Already proposed:

  • an executable with ASDF (#18 )

Other possibilities:

  • quicklisp; not enough now. this project needs much more improvement on its quality.

koji-kojiro avatar Jan 18 '18 08:01 koji-kojiro

About building an executable: The followings are copied from review comment on #24.

@koji-kojiro Right, thanks a lot! However, I could not build an executable with asdf ... To be accurate, the build succeeded, but the executable did not work, caused SB-SYS: MEMORY-FAULT-ERROR. I'm not sure where this error comes. Do you have any ideas?

@vindarel No, I didn't encounter this error. I had once a "heap exhausted error" and it was a recursion error in a (new-ish) third-party library.

If you put your attempt in a new branch I'm ok to try, and at least say if I reproduce the pb.

The branch for investigation is this one. To reproduce the above:

$ make

Debugger may say something, but this can be ignored, I think.

koji-kojiro avatar Jan 30 '18 15:01 koji-kojiro

Debugger may say something, but this can be ignored, I think.

it told a lot to me ! I can not run make.

[~/bacasable/cl-repl]$ make                                                                           *[92390a7] 
This is SBCL 1.2.4.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
--- reading .sbclrc

; file: /home/vince/bacasable/cl-repl/cl-repl.asd
; in: DEFSYSTEM CL-REPL
;     ((:MODULE "src" :COMPONENTS
;       ((:FILE "package") (:FILE "color") (:FILE "keymap") (:FILE "command")
;        (:FILE "shell") (:FILE "completer") (:FILE "debugger") (:FILE "input")
;        (:FILE "repl") (:FILE "main"))))
; 
; caught ERROR:
;   illegal function call

; file: /home/vince/bacasable/cl-repl/cl-repl.asd
; in: DEFSYSTEM CL-REPL
;     (#:ALEXANDRIA #:UIOP #:UNIX-OPTS #:SPLIT-SEQUENCE #:TRIVIAL-BACKTRACE
;      #:CL-READLINE)
; 
; caught STYLE-WARNING:
;   undefined function: #:ALEXANDRIA
; 
; caught WARNING:
;   undefined variable: #:CL-READLINE

;     (DEFSYSTEM CL-REPL :VERSION "0.4.0" :AUTHOR "TANI Kojiro" :LICENSE "MIT"
;      :DEPENDS-ON
;      (#:ALEXANDRIA #:UIOP #:UNIX-OPTS #:SPLIT-SEQUENCE #:TRIVIAL-BACKTRACE
;       #:CL-READLINE)
;      :SERIAL T ...)
; 
; caught WARNING:
;   undefined variable: CL-REPL
; 
; caught STYLE-WARNING:
;   undefined function: DEFSYSTEM

;     (#:ALEXANDRIA #:UIOP #:UNIX-OPTS #:SPLIT-SEQUENCE #:TRIVIAL-BACKTRACE
;      #:CL-READLINE)
; 
; caught WARNING:
;   undefined variable: #:SPLIT-SEQUENCE
; 
; caught WARNING:
;   undefined variable: #:TRIVIAL-BACKTRACE
; 
; caught WARNING:
;   undefined variable: #:UIOP
; 
; caught WARNING:
;   undefined variable: #:UNIX-OPTS
; 
; compilation unit finished
;   Undefined functions:
;     #:ALEXANDRIA DEFSYSTEM
;   Undefined variables:
;     #:CL-READLINE CL-REPL #:SPLIT-SEQUENCE #:TRIVIAL-BACKTRACE #:UIOP #:UNIX-OPTS
;   caught 1 ERROR condition
;   caught 6 WARNING conditions
;   caught 2 STYLE-WARNING conditions

debugger invoked on a UNBOUND-VARIABLE in thread
#<THREAD "main thread" RUNNING {10039CEAA3}>:
  The variable CL-REPL is unbound.

vindarel avatar Jan 30 '18 22:01 vindarel

I change this in the asd:

@@ -1,4 +1,4 @@
-(defsystem cl-repl
+(asdf:defsystem cl-repl

(this is a practice I found that works for me)

then I had a pb because a directory cl-repl exists and we also want to name our binary cl-repl. I just changed it:

                                            (:file "repl")
                                            (:file "main"))))
   :build-operation "program-op"
-  :build-pathname "cl-repl"
+  :build-pathname "repl-binary" 
   :entry-point "cl-repl:main"
   :description "A full-featured repl implementation."

and I could build the executable, run it, run one command, and now it seems to hang, indeed. I don't get your "memory fault error" though.

vindarel avatar Jan 30 '18 22:01 vindarel

Thanks for the report. hmm... I tried ros build also, but same result.

We should leave it for now.

koji-kojiro avatar Jan 31 '18 03:01 koji-kojiro