lem icon indicating copy to clipboard operation
lem copied to clipboard

(ERROR "Trying to access undefined foreign variable ~S." "stdscr")

Open slsuse opened this issue 7 years ago • 4 comments

  1. 'cat /etc/os-release NAME="openSUSE Leap" VERSION="42.3" ID=opensuse ID_LIKE="suse" VERSION_ID="42.3" PRETTY_NAME="openSUSE Leap 42.3" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:leap:42.3" BUG_REPORT_URL="https://bugs.opensuse.org" HOME_URL="https://www.opensuse.org/"'

  2. Installed roswell following the instructions over there.

  3. Installed lem following instructions here.

  4. There's a problem with ncurses. I do have it installed, however lem seems not to be linked against it:

lem-bugreport.txt

slsuse avatar Sep 13 '18 10:09 slsuse

I'm sure it is error because curses library are not installed properly. we don't care each of linux difference. how to setup libcurses for your environment.

Here is Japanese blog which try to run lem on openSuSE Tumbleweed

https://blog.3qe.us/entry/2018/08/16/012224

I hope it might help you.

snmsts avatar Sep 19 '18 03:09 snmsts

Just a confirmation, I also got the same problem on my openSUSE Tumbleweed system, and also solved it with the Japanese blog solution snmsts mentions above -- many thanks!

I have posted an issue at cl-charms project.

androclus avatar Nov 12 '22 09:11 androclus

If anyone is reading this in the future. I have translated the blog and I have done the work figuring it out for you:

In wherever-ql-is/quicklisp/dists/quicklisp/software/cl-charms-(whatever version you have)/src/low-level/ there is going to be a file called curses-bindings.lisp.

Right under the massive copyright thing there will be this portion:

#+unicode
(cffi:define-foreign-library libcurses
  (:darwin (:or "libncurses.dylib" "libcurses.dylib"))
  (:unix (:or "libncursesw.so.6"
              "libncursesw.so.5"
              "libncursesw.so.14.0"
              "libncursesw.so"))
  (:windows (:or "libpdcurses"
		 "pdcurses"
		 "libcurses"))
  (t (:default "libcurses")))

#-unicode
(cffi:define-foreign-library libcurses
  (:darwin (:or "libncurses.dylib"
                "libcurses.dylib"))
  (:unix (:or "libncursesw.so.6"        ; XXX: is this the right thing
                                        ; to load? Should we also add
                                        ; libncursesw.so as a
                                        ; fallback?
               "libncurses.so.6"
              "libncurses.so.5"
              "libncursesw.so.14.0"
              "libncurses.so"
              "libcurses"))
  (:windows (:or "libpdcurses"		;MSYS installed pdcurses
		 "pdcurses"
                 "libcurses"))
  (t (:default "libcurses")))

You need to comment out the portions that end with .6. These are loading in ncurses 6 which isn't loading correctly for some reason. If you don't feel up to the task of even looking up where those little strings are, here:

#+unicode
(cffi:define-foreign-library libcurses
  (:darwin (:or "libncurses.dylib" "libcurses.dylib"))
  (:unix (:or ;"libncursesw.so.6"
              "libncursesw.so.5"
              "libncursesw.so.14.0"
              "libncursesw.so"))
  (:windows (:or "libpdcurses"
		 "pdcurses"
		 "libcurses"))
  (t (:default "libcurses")))

#-unicode
(cffi:define-foreign-library libcurses
  (:darwin (:or "libncurses.dylib"
                "libcurses.dylib"))
  (:unix (:or ;"libncursesw.so.6"        ; XXX: is this the right thing
                                        ; to load? Should we also add
                                        ; libncursesw.so as a
                                        ; fallback?
               ;"libncurses.so.6"
              "libncurses.so.5"
              "libncursesw.so.14.0"
              "libncurses.so"
              "libcurses"))
  (:windows (:or "libpdcurses"		;MSYS installed pdcurses
		 "pdcurses"
                 "libcurses"))
  (t (:default "libcurses")))

If this helped you, then: I hope you're having a nice day. :)

I'm on openSUSE Tumbleweed 20230819

jordan4ibanez avatar Aug 21 '23 12:08 jordan4ibanez