Small disclaimer: it is my first bug (or "bug") report, so please be gentle. :) After the removal of readline USE flag in dev-scheme/racket-8.2, when the racket REPL is run from the shell/console, it reports following error: ; Warning: no readline support (ffi-lib: could not load foreign library path: libedit.so.3 system error: libedit.so.3: cannot open shared object file: No such file or directory) dev-libs/libedit is necessary for REPL history (unless it is already emerged manually or as dependency for other package/s). Reproducible: Always Steps to Reproduce: 1. Emerge dev-scheme/racket. 2. Run racket command from shell. Actual Results: Following error is reported: ; Warning: no readline support (ffi-lib: could not load foreign library path: libedit.so.3 system error: libedit.so.3: cannot open shared object file: No such file or directory) Using keyboard arrow keys does not show previous REPL inputs/history. Expected Results: Default installation should support history browsing, considering the relevant USE flag is missing/removed. By manually emerging dev-libs/libedit, warning is gone and history browsing works.
Created attachment 761323 [details] emerge --info
Alex, could you check if you have readline support if you remove libedit and install readline (be sure to relaunch racket REPL). And back to the point: after you emerge racket you should have a information that you should install libedit/readline if you want the readline features. https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-scheme/racket/racket-8.3-r2.ebuild#n134
(In reply to Maciej Barć from comment #2) > Alex, could you check if you have readline support if you remove libedit and > install readline (be sure to relaunch racket REPL). > > And back to the point: after you emerge racket you should have a information > that you should install libedit/readline if you want the readline features. Maciej, sys-libs/readline-8.1_p1-r1 is already installed with following USE flags set: split-usr unicode -static-libs -utils Removing libedit reverts warning.
I actually use a Racket snapshot version from racket-overlay on my system and I have no problems with using readline in Racket REPL, if you want you can try installing a snapshot version from that overlay (be sure to unmask dev-scheme/racket::racket-overlay) https://gitlab.com/src_prepare/racket/racket-overlay OR installing a "readline-gpl" package. "raco pkg install readline-gpl" should do the job https://pkgs.racket-lang.org/package/readline-gpl Also I do not agree that we should DEPEND on libedit because 1. it is runtime-dependeny only 2. you have 2 other (GUI) racket shells: gracket & drracket that have a REPL 3. you have readline-gpl pkg as mentioned above Anyway it seems like we will have to change the optfeature warning to only libedit https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-scheme/racket/racket-8.2-r2.ebuild#n160
(In reply to Maciej Barć from comment #4) > OR installing a "readline-gpl" package. > "raco pkg install readline-gpl" should do the job Thank you. Unmerged libedit and it works with "readline-gpl" from Racket's package manager. Did not try snaphsot version though. > Also I do not agree that we should DEPEND on libedit because > 1. it is runtime-dependeny only > 2. you have 2 other (GUI) racket shells: gracket & drracket that have a REPL I personally prefer to use regular shell because of workflow, instead of g/drracket.
> Unmerged libedit and it works with "readline-gpl" from Racket's package > manager. Did not try snaphsot version though. Thanks for checking it out! > I personally prefer to use regular shell because of workflow, instead of > g/drracket. I personally run Racket in Emacs via racket-mode https://racket-mode.com/
> I personally run Racket in Emacs via racket-mode > https://racket-mode.com/ so I probably would notice this even if something happened to Racket's "readlie" pkg as it is not loaded and history browsing is managed via Emacs
Finally found out why why readline worked for me even after I removed readline-gpl (because I had uninstalled it long time ago). When installed globally the file /usr/share/racket/readline-lib.rkt does not seem to be removed after readline-gpl is, this is why readline was loading for me instead of libedit.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5330ac4eea08764914932a4eb3bc22046acb8664 commit 5330ac4eea08764914932a4eb3bc22046acb8664 Author: Maciej Barć <xgqt@gentoo.org> AuthorDate: 2022-01-05 00:52:31 +0000 Commit: Maciej Barć <xgqt@gentoo.org> CommitDate: 2022-01-05 00:53:59 +0000 dev-scheme/racket: resolve the libedit/readline issue Closes: https://bugs.gentoo.org/830617 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Maciej Barć <xgqt@gentoo.org> dev-scheme/racket/racket-8.2-r2.ebuild | 17 ++++++++++++++--- dev-scheme/racket/racket-8.3-r2.ebuild | 17 ++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-)