ChezScheme icon indicating copy to clipboard operation
ChezScheme copied to clipboard

How expression editor can be enable in REPL

Open APIPLM opened this issue 2 years ago • 8 comments

Running REPL in the docker container, expression editor is not enable in REPL. As reference the chapter in the User's Guide document. it need TERM environment variable, what is the value of it. And also I tried the second way, which is that new-cafe is invoked explicitly from a top-level program. Like

(top-level-program
  (import (rnrs))
  (new-cafe (lambda (x) x)))

It is the same thing, I mean expression editor is not enable in REPL.

APIPLM avatar Nov 13 '21 03:11 APIPLM

In the s/<machine-type>.def file (e.g., s/a6le.def), is expeditor included in the (features ...) list? Also, do you have curses or ncurses installed in your docker container?

cjfrisz avatar Nov 13 '21 13:11 cjfrisz

Thanks. As checked the source of ./ChezScheme/, it has expeditor in the (features ...) list. But one step of Dockerfile file to build docker image is RUN sed -ie 's,expeditor,,' s/*.def. Not sure why it is. I will remove this step in Dockerfile ` file, then build a new image. The docker is from https://github.com/scheme-containers/chezscheme.

APIPLM avatar Nov 14 '21 03:11 APIPLM

Thanks. As checked the source of ./ChezScheme/, it has expeditor in the (features ...) list. But in the Dockerfile file, which is what we build ChezScheme image ,seem like it remove the expeditor feature by running RUN sed -ie 's,expeditor,,' s/*.def ,and also ncurses by running RUN sed -ie 's,-lncurses,,' c/Mf-* . After removing the two of them, the docker image can be built, but as running scheme command, it has the following error.

cannot find compatible scheme.boot in search path
  "/usr/lib/csv%v/%m"

Could you take time to have a look?Thanks in advance.

APIPLM avatar Nov 14 '21 04:11 APIPLM

That error generally means one of two things:

  1. There is a value for SCHEMEHEAPDIRS set in the environment, and its value is not a directory containing scheme.boot. This is alternative to the default of using the InstallLib path set by configure in Mf-install. Given the output you included, I suspect your InstallLib is /usr/lib.
  2. The scheme executable cannot load the scheme.boot file at the SCHEMEHEAPDIRS or InstallLib path. This is likely due to a build error in the c or s directory that was not caught or a boot file built for an incompatible machine type, e.g., a boot file for a6osx loaded by an a6le executable on an x86_64 system.

I briefly looked at the Dockerfile you linked, and it doesn't seem to set the SCHEMEHEAPDIRS environment variable, so the second option seems more likely. Hopefully, there's a simple build error in the c or s directory.

cjfrisz avatar Nov 14 '21 14:11 cjfrisz

How can x86_64 machine build with this feature? Sound Like there is not theboot file x86_64 machine.

在 2021-11-14 22:57:51,"Chris Frisz" @.***> 写道:

That error generally means one of two things:

There is a value for SCHEMEHEAPDIRS set in the environment, and its value is not a directory containing scheme.boot. This is alternative to the default of using the InstallLib path set by configure in Mf-install. Given the output you included, I suspect your InstallLib is /usr/lib. The scheme executable cannot load the scheme.boot file at the SCHEMEHEAPDIRS or InstallLib path. This is likely due to a build error in the c or s directory that was not caught or a boot file built for an incompatible machine type, e.g., a boot file for a6osx loaded by an a6le executable on an x86_64 system.

I briefly looked at the Dockerfile you linked, and it doesn't seem to set the SCHEMEHEAPDIRS environment variable, so the second option seems more likely. Hopefully, there's a simple build error in the c or s directory.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

APIPLM avatar Nov 14 '21 15:11 APIPLM

If you are having trouble with the way a Dockerfile from some other project is building Chez Scheme, maybe you should open an issue with the other project.

jltaylor-us avatar Nov 14 '21 17:11 jltaylor-us

Sorry, the build have not been done yet, it stopped at Step 13/26 as removing RUN sed -ie 's,expeditor,,' s/*.def and RUN sed -ie 's,-lncurses,,' c/Mf-*

(cd examples && make clean)
/bin/rm -f def.so edit.so fact.so fatfib.so fft.so fib.so freq.so interpret.so m4.so macro.so matrix.so object.so power.so queue.so rabbit.so rsa.so scons.so setof.so socket.so unify.so compat.so ez-grammar-test.so expr.md
(cd bintar && make clean)
rm -rf csv9.5.4 csv9.5.4-a6le.tar.gz
(cd rpm && make clean)
/bin/sh: 1: test: a6le: unexpected operator
/bin/sh: 1: test: a6le: unexpected operator
rm -rf /build/chezscheme/build/rpm/tmp ChezScheme-9.5.4-1.UNKNOWN.rpm
(cd pkg && make clean)
rm -rf csv9.5.4-a6le-1.pkg a6le9.5.4 csv9.5.4
rm -f Make.out
make: Leaving directory '/build/chezscheme/build'
Removing intermediate container 317d6bafbab5
 ---> 0037f3bb3570
Step 12/26 : RUN rm build/boot/*/equates.h
 ---> Running in 55a11d30a24f
Removing intermediate container 55a11d30a24f
 ---> 613aa45fe7fa
Step 13/26 : RUN cp -fr build/boot/* boot/
 ---> Running in 663cf11f0654
cp: 'build/boot/a6le/scheme.h' and 'boot/a6le/scheme.h' are the same file
The command '/bin/sh -c cp -fr build/boot/* boot/' returned a non-zero code: 1

@jltaylor-us The issue is about the Dockerfile, where I had removed two steps during installing the feature expeditor

I was wondering why this feature matter at the machine type.

APIPLM avatar Nov 15 '21 01:11 APIPLM

Thanks

APIPLM avatar Nov 15 '21 10:11 APIPLM