lem icon indicating copy to clipboard operation
lem copied to clipboard

Error Building Lem on MacOS Using Roswell

Open stevemolitor opened this issue 11 months ago • 10 comments

When I run this command:

ros follow-dependency=t install lem-project/lem

I get this error:

63: (SB-IMPL::PROCESS-EVAL/LOAD-OPTIONS ((:EVAL . "(progn #-ros.init(cl:load \"/opt/homebrew/Cellar/roswell/23.10.14.114/etc/roswell/init.lisp\"))") (:EVAL . "(ros:run '((:eval\"(ros:quicklisp)\")(:script \"/opt/homebrew/Cellar/roswell/23.10.14.114/etc/roswell/install.ros\"\"lem-project/lem\")(:quit ())))")))
64: (SB-IMPL::TOPLEVEL-INIT)
65: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
66: ((FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP))
67: (SB-IMPL::%START-LISP)

unhandled condition in --disable-debugger mode, quitting
;
; compilation unit aborted
;   caught 1 fatal ERROR condition

Versions:

roswell 23.10.14.114(NO-GIT-REVISION) SBCL 2.3.4 MacOS Sonoma 14.0 M1 (arm) chip

stevemolitor avatar Mar 15 '24 12:03 stevemolitor

Also unable to install on:

Mac Monterey roswell 23.10.14.114(NO-GIT-REVISION) sbcl-bin/2.4.2

First it failed to find qlot, so I had to explicitly install it: $ ros install qlot

$ ros follow-dependency=t install lem-project/lem

getting similar error reported by OP

vkz avatar Mar 16 '24 10:03 vkz

Ditto on Debian with roswell built from source. I both cases feels like some issue with dependency resolution or smth.

$ ros --version roswell 22.12.14.113(eae6e5c) $ ros run -- --version SBCL 2.4.2

error
[package type-i]..................................
[package trivia.balland2006]......
To load "lem":
  Load 1 ASDF system:
    lem
; Loading "lem"
[1/3] System 'lem' found. Loading the system..Aborted during step [1/3].
Unhandled QUICKLISP-CLIENT:SYSTEM-NOT-FOUND in thread #:
  System "micros" not found

Backtrace for: #<SB-THREAD:THREAD tid=20847 "main thread" RUNNING {10012C0093}> 0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<QUICKLISP-CLIENT:SYSTEM-NOT-FOUND {1003FD1C53}> # :QUIT T) 1: (SB-DEBUG::RUN-HOOK SB-EXT:INVOKE-DEBUGGER-HOOK #<QUICKLISP-CLIENT:SYSTEM-NOT-FOUND {1003FD1C53}>) 2: (INVOKE-DEBUGGER #<QUICKLISP-CLIENT:SYSTEM-NOT-FOUND {1003FD1C53}>) 3: (CERROR "Try again" QUICKLISP-CLIENT:SYSTEM-NOT-FOUND :NAME "micros") 4: ((LABELS QUICKLISP-CLIENT::RECURSE :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) "micros") 5: (QL-DIST::CALL-WITH-CONSISTENT-DISTS #<FUNCTION (LAMBDA NIL :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) {1003FCCC3B}>) 6: (QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY "micros") 7: (QUICKLISP-CLIENT::AUTOLOAD-SYSTEM-AND-DEPENDENCIES "micros" :PROMPT NIL) 8: (QUICKLISP-CLIENT::AUTOLOAD-SYSTEM-AND-DEPENDENCIES "lem" :PROMPT NIL) 9: ((:METHOD QL-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION (T T)) # #<FUNCTION (FLET QUICKLISP-CLIENT::QL :IN QUICKLISP-CLIENT:QUICKLOAD) {10038A44FB}>) [fast-method] 10: ((:METHOD QL-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION :AROUND (QL-IMPL:SBCL T)) #<QL-IMPL:SBCL {1004C50CD3}> #<FUNCTION (FLET QUICKLISP-CLIENT::QL :IN QUICKLISP-CLIENT:QUICKLOAD) {10038A44FB}>) [fast-method] 11: ((:METHOD QUICKLISP-CLIENT:QUICKLOAD (T)) "lem" :PROMPT NIL :SILENT NIL :VERBOSE NIL) [fast-method] 12: (QL-DIST::CALL-WITH-CONSISTENT-DISTS #<FUNCTION (LAMBDA NIL :IN QUICKLISP-CLIENT:QUICKLOAD) {100387F97B}>) 13: (INSTALL-SYSTEM-SCRIPT "lem") 14: (INSTALL-SYSTEM-IF-PROBED "lem") 15: (INSTALL NIL) ... continued...

Here it failed to find micros and on mac it was iterate or smth. I'm guessing those are attempted in parallel, so there's something up with deps resolution? Sorry, first time attempting common lisp.

vkz avatar Mar 16 '24 12:03 vkz

Nice PFP @vkz I would recommend installing Qlot on its own (without Roswell) then running the included Makefile, lots of people seem to have issues with Roswell but not with the Makefile on Mac or Linux.

garlic0x1 avatar Mar 16 '24 16:03 garlic0x1

Yeah, that worked. Thank you. But this adds to confusion with qlot, roswell, separate sbcl and larger ecosystem that you may not be familiar, yet. I wonder if copying the built binary out is safe or it depends on other artifacts that may've been built in the process? Do you know if it is a self-contained image that can be used on its own?

vkz avatar Mar 17 '24 11:03 vkz

Have the same issue using roswell.

However, building by manually cloning the repo and running the build scripts (make) works fine.

mdbergmann avatar Mar 17 '24 12:03 mdbergmann

I met this. I think the reason on this relates that lem uses qlot for out-of-quicklisp dependency management. ql:*quicklisp-home* may be modified by roswell or qlot, so quicklisp cannot found iterate (closer-mop or etc. defined in ASDF's :depends-on)

But I wondered that this problem occurs only in mac...

printing `ql:*quicklisp-home*`

ros install lem-project/lem outputs

m$ ros install lem-project/lem
Installing from github lem-project/lem
[lem.asd] qlhome = #P"/Users/t-sin/.roswell/lisp/quicklisp/"
[lem.asd] qlhome = #P"/Users/t-sin/.roswell/local-projects/lem-project/lem/.qlot/"
[lem.asd] localproj-dir = (#P"/Users/t-sin/.roswell/local-projects/")
[lem.asd] qlhome = #P"/Users/t-sin/.roswell/local-projects/lem-project/lem/.qlot/"
To load "lem":
  Load 1 ASDF system:
    lem
; Loading "lem"
[1/3] System 'lem' found. Loading the system..Aborted during step [1/3].
Unhandled QUICKLISP-CLIENT:SYSTEM-NOT-FOUND in thread #<SB-THREAD:THREAD tid=259 "main thread" RUNNING
                                                         {7005420683}>:
  System "closer-mop" not found

format I added

diff --git a/lem.asd b/lem.asd
index b7c0418c..2b5d1ac5 100644
--- a/lem.asd
+++ b/lem.asd
@@ -7,13 +7,18 @@
                       :error-output t))
   #+quicklisp
   (setf ql:*quicklisp-home* (merge-pathnames #P".qlot/"))
+(format t "[lem.asd] qlhome = ~s~%" ql:*quicklisp-home*)
   (let ((local-project-dir (or roswell:*local-project-directories*
                                #+quicklisp (copy-list ql:*local-project-directories*))))
+(format t "[lem.asd] localproj-dir = ~s~%" local-project-dir)
     (load (merge-pathnames #P".qlot/setup.lisp"))
     ;; XXX: Not to modify the local project directories to install ros scripts in ~/.roswell/bin
     ;;   ref. https://github.com/roswell/roswell/blob/5b267381a66d36a514e2eee7283543f828541a63/lisp/util-install-quicklisp.lisp#L146
     (set (intern (string :*local-project-directories*) :ql) local-project-dir)))

+(format t "[lem.asd] qlhome = ~s~%" ql:*quicklisp-home*)
+
+
 (defsystem "lem"
   :version "2.2.0"
   :depends-on ("iterate"

This issue may relates behaviors of three systems: Quicklisp, Roswell and Qlot but I don't know how these relations. So any ideas? @snmsts @fukamachi

[ADDED] This problem occurs only git-cloned and self-built roswell https://github.com/roswell/roswell/commit/4c17a2b65314283839d382e52d47a44bb71e22b5 and does not occur with brew install roswell && ros install lem-project/lem. So there is no problem using homebrew to install roswell.

t-sin avatar May 15 '24 04:05 t-sin

@t-sin What version of Qlot are you using? The situation is different, but I heard someone say Qlot won't work well with a global Quicklisp if its version is old (such as v1.4.x).

You may also want to delete the ".qlot/" directory when reinstalling it.

fukamachi avatar May 15 '24 07:05 fukamachi

Oh, I did remove ~/.roswell but did not remove ~/.qlot so probably I used old qlot. I try again after removing ~/.qlot. Thanks for your mention!

t-sin avatar May 16 '24 16:05 t-sin

I have successfully installed lem via roswell after removing ~/.roswell and ~/.qlot and building roswell. Thanks a lot @fukamachi !

It seems this issue is solved. Could I close this issue? @stevemolitor

t-sin avatar May 17 '24 09:05 t-sin

THe problem seems to persist on my machine even when I remove ~/.roswell and ~/.qlot. I even did a brew uninstall roswell and reinstalled and re-init'd my roswell.

tealeg avatar May 28 '24 14:05 tealeg