Skip to content

Instantly share code, notes, and snippets.

@SequentialDesign
Created November 11, 2024 10:51
Show Gist options
  • Save SequentialDesign/cb5becdbfe40521012931ee634ef62ed to your computer and use it in GitHub Desktop.
Save SequentialDesign/cb5becdbfe40521012931ee634ef62ed to your computer and use it in GitHub Desktop.
how to install lem on linux (garuda (arch))
installing lem
go here and click on the right download. mine was under AMD64 and across from linux
https://www.sbcl.org/platform-table.html
cd to the folder you downloaded it to
cd Downloads/
decompress the file you downloaded. it has the sbcl binary
bzip2 -cd sbcl-2.4.10-x86-64-linux-binary.tar.bz2 | tar xvf -
cd into the file
cd sbcl-2.4.10-x86-64-linux/
run the installation script as admin
sudo sh install.sh
you will get this if it worked :
SBCL has been installed:
binary /usr/local/bin/sbcl
core and contribs in /usr/local/lib/sbcl/
for me it worked on the first try
run sbcl
sbcl
evaluate an expression to see that it works
(+ 2 2)
and then hit enter or Control+m
exit out of sbcl
(exit)
dowload the source which is on the same page as the one where you downloaded the previous file that had the binary
https://www.sbcl.org/platform-table.html
scroll to the top, and download the source
decompress the source
bzip2 -cd sbcl-2.4.10-source.tar.bz2 | tar xvf -
intsall qlot
curl -L https://qlot.tech/installer | sh
you should get this :
The executable script is located at '/home/dat/.qlot/bin/qlot'.
To make it runnable by your shell, please add '/home/dat/.qlot/bin' to '$PATH'.
export PATH="/home/dat/.qlot/bin:$PATH"
Enjoy!
add qlot to path. for bash, add the following to your .bashrc
export PATH="/home/dat/.qlot/bin:$PATH"
then source it
source ~/.bashrc
for fish, add the folloming to your fish config.fish
fish_add_path /home/dat/.qlot/bin
then source it
source ~/.config/fish/config.fish
clone lem wherever you want. i did in the Downloads folder
git clone https://github.com/lem-project/lem.git
cd to lem
cd lem/
run git pull to update. i got
Already up to date.
run make to build lem
make sdl2-ncurses
got error
/home/dat/.cache/common-lisp/sbcl-2.4.10-linux-x64/home/dat/Download
s/lem/.qlot/dists/quicklisp/software/cffi-20241012-git/libffi/libffi
-types__grovel.c:12:7: warning: unused variable ‘autotype_tmp’ [-Wun
used-variable]
12 | int autotype_tmp;
| ^~~~~~~~~~~~
...
; /home/dat/.cache/common-lisp/sbcl-2.4.10-linux-x64/home/dat/Downlo
ads/lem/.qlot/dists/quicklisp/software/cffi-20241012-git/libffi/libf
fi-types__grovel /home/dat/.cache/common-lisp/sbcl-2.4.10-linux-x64/
home/dat/Downloads/lem/.qlot/dists/quicklisp/software/cffi-20241012-
git/libffi/libffi-types__grovel.grovel-tmp.lisp
...While evaluating the form starting at line 1, column 0
of #P"/home/dat/Downloads/lem/scripts/build-sdl2-ncurses.lisp":
debugger invoked on a CFFI:LOAD-FOREIGN-LIBRARY-ERROR in thread
#<THREAD tid=92643 "main thread" RUNNING {1000C20003}>:
Unable to load any of the alternatives:
("libSDL2_ttf-2.0.so.0" "libSDL2_ttf")
type exit to exit
exit
install sdl2_ttf
sudo pacman -S sdl2_ttf
rerun make
make sdl2-ncurses
got error
.....................................While evaluating the form start
ing at line 1, column 0
of #P"/home/dat/Downloads/lem/scripts/build-sdl2-ncurses.lisp":
debugger invoked on a CFFI:LOAD-FOREIGN-LIBRARY-ERROR in thread
#<THREAD tid=94034 "main thread" RUNNING {100DB38003}>:
Unable to load any of the alternatives:
("libSDL2_image-2.0.so.0" "libSDL2_image")
type exit to exit
exit
install sdl2_image
sudo pacman -S sdl2_image
rerun make
make sdl2-ncurses
got error
debugger invoked on a PACKAGE-LOCKED-ERROR in thread
#<THREAD tid=95618 "main thread" RUNNING {1000B88003}>:
Lock on package LEM/BUFFER/INTERNAL violated when
removing local nickname LINE for #<PACKAGE "LEM/BUFFER/LINE"> whil
e in
package COMMON-LISP-USER.
See also:
The SBCL Manual, Node "Package Locks"
enter 0 to continue and ignore package locks. i had to do it twice
it works now. run lem
./lem
to run the sdl version
./lem -i sdl2
put lem on your path. if you use bash, add the following to your .bashrc
export PATH="/home/dat/Downloads/lem:$PATH"
source your .bashrc
source ~/.bashrc
if you use fish, add the following to your config.fish
fish_add_path /home/dat/Downloads/lem
source it
source ~/.config/fish/config.fish
now you can run lem
lem
or if you want the sdl version
lem -i sdl2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment