Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SRFI 231 install #919

Merged
merged 1 commit into from
May 29, 2023
Merged

Fix SRFI 231 install #919

merged 1 commit into from
May 29, 2023

Conversation

gambiteer
Copy link
Contributor

Makefile:

When installing chibi, make installation directory and install files for SRFI 231. When uninstalling chibi, remove installation directory and files for SRFI 231.

lib/srfi/231/transforms.scm:

Move definition of vector-iota from here to ...

lib/srfi/231/base.scm:

Here.

lib/srfi/231/base.sld:

Export vector-iota to use in both base.scm and transforms.scm.

Makefile:

When installing chibi, make installation directory and install files for SRFI 231.
When uninstalling chibi, remove installation directory and files for SRFI 231.

lib/srfi/231/transforms.scm:

Move definition of vector-iota from here to ...

lib/srfi/231/base.scm:

Here.

lib/srfi/231/base.sld:

Export vector-iota to use in both base.scm and transforms.scm.
@ashinn
Copy link
Owner

ashinn commented May 29, 2023

Thanks!

@ashinn ashinn merged commit 8e1ea89 into ashinn:master May 29, 2023
@gambiteer gambiteer deleted the 231-install branch May 29, 2023 13:14
@gambiteer
Copy link
Contributor Author

How does one run lib/srfi/231/test.sld?

@ashinn
Copy link
Owner

ashinn commented May 30, 2023

chibi-scheme -msrfi.231.test -e'(run-tests)'

I actually have a script locally where chibi-test srfi.231 translates into this. I should commit it to the repo.

@gambiteer
Copy link
Contributor Author

Am I supposed to run it in some special directory? I get

> heine:~/lang/scheme/srfi-231/srfi-231-temp> env LD_LIBRARY_PATH=/usr/local/chibi/lib: /usr/local/chibi/bin/chibi-scheme -msrfi.231.test -e'(run-tests)'
ERROR: couldn't find include: "srfi/231/base.scm"
  called from <anonymous> on line 210 of file /usr/local/chibi//share/chibi/meta-7.scm
  called from <anonymous> on line 1188 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 804 of file /usr/local/chibi//share/chibi/init-7.scm
  called from error on line 108 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 81 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 81 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 800 of file /usr/local/chibi//share/chibi/init-7.scm
  called from call-with-current-continuation on line 827 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 259 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 250 of file /usr/local/chibi//share/chibi/meta-7.scm
  called from <anonymous> on line 279 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 81 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 81 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 259 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 250 of file /usr/local/chibi//share/chibi/meta-7.scm
  called from <anonymous> on line 279 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 81 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 80 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 259 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 250 of file /usr/local/chibi//share/chibi/meta-7.scm
  called from <anonymous> on line 437 of file /usr/local/chibi//share/chibi/meta-7.scm
heine:~/lang/scheme/srfi-231/srfi-231-temp> pu ~/programs/chibi-scheme/lib/srfi/231
~/programs/chibi-scheme/lib/srfi/231 ~/lang/scheme/srfi-231/srfi-231-temp ~/lang/scheme ~ 
heine:~/programs/chibi-scheme/lib/srfi/231> env LD_LIBRARY_PATH=/usr/local/chibi/lib: /usr/local/chibi/bin/chibi-scheme -msrfi.231.test -e'(run-tests)'
ERROR: couldn't find include: "srfi/231/base.scm"
  called from <anonymous> on line 210 of file /usr/local/chibi//share/chibi/meta-7.scm
  called from <anonymous> on line 1188 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 804 of file /usr/local/chibi//share/chibi/init-7.scm
  called from error on line 108 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 81 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 81 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 800 of file /usr/local/chibi//share/chibi/init-7.scm
  called from call-with-current-continuation on line 827 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 259 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 250 of file /usr/local/chibi//share/chibi/meta-7.scm
  called from <anonymous> on line 279 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 81 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 81 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 259 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 250 of file /usr/local/chibi//share/chibi/meta-7.scm
  called from <anonymous> on line 279 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 81 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 80 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 259 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 250 of file /usr/local/chibi//share/chibi/meta-7.scm
  called from <anonymous> on line 437 of file /usr/local/chibi//share/chibi/meta-7.scm
heine:/usr/local/chibi/share/chibi/srfi/231> env LD_LIBRARY_PATH=/usr/local/chibi/lib: /usr/local/chibi/bin/chibi-scheme -msrfi.231.test -e'(run-tests)'
ERROR: couldn't find include: "srfi/231/base.scm"
  called from <anonymous> on line 210 of file /usr/local/chibi//share/chibi/meta-7.scm
  called from <anonymous> on line 1188 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 804 of file /usr/local/chibi//share/chibi/init-7.scm
  called from error on line 108 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 81 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 81 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 800 of file /usr/local/chibi//share/chibi/init-7.scm
  called from call-with-current-continuation on line 827 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 259 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 250 of file /usr/local/chibi//share/chibi/meta-7.scm
  called from <anonymous> on line 279 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 81 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 81 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 259 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 250 of file /usr/local/chibi//share/chibi/meta-7.scm
  called from <anonymous> on line 279 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 81 of file /usr/local/chibi//share/chibi/init-7.scm
  called from for1 on line 80 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 259 of file /usr/local/chibi//share/chibi/init-7.scm
  called from <anonymous> on line 250 of file /usr/local/chibi//share/chibi/meta-7.scm
  called from <anonymous> on line 437 of file /usr/local/chibi//share/chibi/meta-7.scm

I tried once in a random directory, once in the source directory, and once in the install directory.

@ashinn
Copy link
Owner

ashinn commented May 30, 2023

It works for me in the default install directory. You can view the current search path with:

chibi-scheme -Q -p'(current-module-path)'

and add to the search path with -I:

chibi-scheme -I<installed-dir> -msrfi.231.test -e'(run-tests)'

For example, from the source directory without even installing you can run:

LD_LIBRARY_PATH=. ./chibi-scheme -msrfi.231.test -e'(run-tests)'

I just added SRFI 231 to the lib test suite so running make test-libs will also test SRFI 231.

Also see the man page which describes the CHIBI_MODULE_PATH and CHIBI_IGNORE_SYSTEM_PATH env vars used in the Makefile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants