racket-rash
racket-rash copied to clipboard
[Windows] libedit-3.dll issues
When launching Rash, the following error message appears:
ffi-lib: couldn't open "libedit-3.dll" (The specified module could not be found.; errid=126)
I am using Racket v7.9.
On Sun, Nov 08, 2020 at 08:32:38PM -0800, Joshua Cain wrote:
When launching Rash, the following error message appears:
ffi-lib: couldn't open "libedit-3.dll" (The specified module could not be found.; errid=126)
I am using Racket v7.9.
Does the same thing happen with Racket v7.8? I think the version of libedit bundled with Racket was updated in this latest release. Do you get the same error when running a normal Racket repl?
Does the same thing happen with Racket v7.8?
Yes.
~\Downloads\racket-minimal-7.8-x86_64-win32.tgz\home\pltbuild\build\mingw64\bundle\racket ❯.\Racket.exe -v Welcome to Racket v7.8. ~\Downloads\racket-minimal-7.8-x86_64-win32.tgz\home\pltbuild\build\mingw64\bundle\racket ❯.\Racket.exe -l rash/repl ffi-lib: couldn't open "libedit-3.dll" (The specified module could not be found.; errid=126)
Do you get the same error when running a normal Racket repl?
No. I can get into a normal REPL just fine without issue.
Huh. That's weird. Historically installing the readline-gpl package
(raco pkg install readline-gpl
) fixes issues with the line editing.
Try that for now. I don't have a Windows machine handy to track this
down at the moment.
On Sat, Nov 14, 2020 at 07:35:03PM -0800, Joshua Cain wrote:
Does the same thing happen with Racket v7.8?
Yes.
Do you get the same error when running a normal Racket repl?
No.
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/willghatch/racket-rash/issues/74#issuecomment-727371281
I'm not the OP, but I'm having the same problem. I don't see libedit.dll in my Racket 7.9 installation. (Unlike the OP's error message, my system does not find libedit.dll and not libedit-3.dll.) My Windows 10 system is version 2004 build 19041.388.
Instead of trying to fill in libedit.dll, I will try readline. So I install the package first.
%raco pkg install readline-gpl
Resolving "readline-gpl" via https://download.racket-lang.org/releases/7.9/catalog/
Resolving "readline-gpl" via https://pkgs.racket-lang.org
Using cached16142534581614253458679 for git://github.com/racket/readline-gpl
raco setup: version: 7.9
raco setup: platform: win32\x86_64 [3m]
raco setup: target machine: racket
raco setup: cross-installation: yes
raco setup: installation name: 7.9
raco setup: variants: 3m
raco setup: main collects: c:\sys\emacs.27\usr\Racket7\collects
raco setup: collects paths:
raco setup: C:\Users\x\AppData\Roaming\Racket\7.9\collects
raco setup: c:\sys\emacs.27\usr\Racket7\collects
raco setup: main pkgs: c:\sys\emacs.27\usr\Racket7\share\pkgs
raco setup: pkgs paths:
raco setup: c:\sys\emacs.27\usr\Racket7\share\pkgs
raco setup: C:\Users\x\AppData\Roaming\Racket\7.9\pkgs
raco setup: links files:
raco setup: c:\sys\emacs.27\usr\Racket7\share\links.rktd
raco setup: C:\Users\x\AppData\Roaming\Racket\7.9\links.rktd
raco setup: main docs: c:\sys\emacs.27\usr\Racket7\doc
raco setup: --- updating info-domain tables --- [12:12:21]
raco setup: updating: C:\Users\x\AppData\Roaming\Racket\7.9\share\info-cache.rktd
raco setup: --- pre-installing collections --- [12:12:21]
raco setup: --- installing foreign libraries --- [12:12:21]
raco setup: --- installing shared files --- [12:12:21]
raco setup: installing: shared file C:\Users\x\AppData\Roaming\Racket\7.9\share\readline-lib.rkt
raco setup: --- compiling collections --- [12:12:21]
raco setup: --- parallel build using 4 jobs --- [12:12:21]
raco setup: 3 making:
Now I try to run it from cmd.exe.
C:\Users\x\AppData\Roaming\Racket\7.9>rash-repl.exe ffi-lib: couldn't open "libreadline-5.dll" (Não foi possível encontrar o módulo especificado.; errid=126)
That's just Portuguese for "The specified module could not be found.; errid=126)".
Put libreadline-5.dll in the same directory as rash-repl.exe.
C:\Users\x\AppData\Roaming\Racket\7.9>dir libreadline-5.dll O volume na unidade C é X O Número de Série do Volume é 80B6-21C4
Pasta de C:\Users\x\AppData\Roaming\Racket\7.9
07/03/2005 17:48 229.888 libreadline-5.dll 1 arquivo(s) 229.888 bytes 0 pasta(s) 333.763.125.248 bytes disponíveis
Trying to run, I get: C:\Users\x\AppData\Roaming\Racket\7.9>rash-repl.exe ffi-lib: couldn't open "libreadline-5.dll" (%1 não é um aplicativo Win32 válido.; errid=193)
This means "%1 is not a valid Win32 application; errid=193". I must have the wrong DLL for my system or something like that. I downloaded it from
http://gnuwin32.sourceforge.net/downlinks/readline.php
I suppose you wouldn't know what to do here? Thank you.
I suppose you wouldn't know what to do here? Thank you.
Sorry, I don't know. I'm afraid I don't have time right now to try to figure it out either. I don't use Windows, so it's harder for me to debug than Linux. My long-term plan is to replace the readline dependency completely with a line editor written in Racket. But I won't be able to do that terribly soon either since I'm busy teaching and wrapping up my PhD.
I believe the problem I have is that rash-repl.exe is a 64-bit application and I can't find a 64-bit version of readline. I believe we cannot mix two architectures in the same program.
--8<---------------cut here---------------start------------->8---
%file rash-repl.exe libhistory8.dll libreadline8.dll
rash-repl.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
libhistory8.dll: PE32 executable (DLL) (console) Intel 80386 (stripped to external PDB), for MS Windows
libreadline8.dll: PE32 executable (DLL) (console) Intel 80386 (stripped to external PDB), for MS Windows
--8<---------------cut here---------------end--------------->8---
Since I cannot find a 64-bit application, would it be much trouble for you to compile rash-repl.exe as a 32-bit application? I believe this would take care of things for me and, therefore, for practically all other Windows users --- having this exact issue.
But I know you're busy. If this is not just another command for compiling this desired version, don't worry about it. I can manage to eventually compile the right library version for the right architecture.
Thank you either way. I'm insisting because I think the software is great. I read your paper carefully in the last couple of days. Thanks for writing it.
On Mon, Mar 08, 2021 at 10:30:28AM -0800, noweb-user wrote:
I believe the problem I have is that rash-repl.exe is a 64-bit application and I can't find a 64-bit version of readline. I believe we cannot mix two architectures in the same program.
Aha!
--8<---------------cut here---------------start------------->8--- %file rash-repl.exe libhistory8.dll libreadline8.dll rash-repl.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows libhistory8.dll: PE32 executable (DLL) (console) Intel 80386 (stripped to external PDB), for MS Windows libreadline8.dll: PE32 executable (DLL) (console) Intel 80386 (stripped to external PDB), for MS Windows --8<---------------cut here---------------end--------------->8---
Since I cannot find a 64-bit application, would it be much trouble for you to compile rash-repl.exe as a 32-bit application? I believe this would take care of things for me and, therefore, for practically all other Windows users --- having this exact issue.
Did you install the 64-bit version of Racket? When you raco pkg install rash
I assume it compiles it according to the version of
Racket you installed. Perhaps Racket is bundling the wrong version of
libedit? At any rate, I know some issues with libedit bundling were
fixed in Racket 8.0, so it might already be fixed for newer Rackets.
I don't actually distribute a pre-built executable, just a Racket
package definition which raco pkg
knows how to build.
But I know you're busy. If this is not just another command for compiling this desired version, don't worry about it. I can manage to eventually compile the right library version for the right architecture.
Yeah, I'm not sure how to force Racket to build for a specific architecture, and I don't have time to dive into that right now. Sorry.
Thank you either way. I'm insisting because I think the software is great. I read your paper carefully in the last couple of days. Thanks for writing it.
Thanks! I hope to make time to make it better eventually!
Thanks for the info! I was able to build it by installing a 32-bit Racket 8.0 BC, the latest available on the website today. Any 32-bit version should do. I believe this might be almost required because it's not easy to find a 64-bit version of readline 5.0. (Unless one is willing to compile it oneself, which might not be too difficult, but I wanted to avoid the task.) I found a 64-bit version of readline 8.0, which does not seem to work with 64-bit rash-repl.exe.
For the future reader, here are the steps. Install 32-bit Racket, install readline-gpl (raco pkg install readline-gpl), then install rash (raco pkg install rash). In the output produced, you should [see] the path for your rash-repl.exe. For 64-bit versions, you'd be better off compiling readline by yourself and I'd choose version 5.0 because version 8.0 doesn't seem to work and I am not confident readline 6.0 would, although the closer to 5.0 the better --- I suppose. Good luck!
William, you can close this issue if you'd like. Thank you again.
On Sat, Mar 13, 2021 at 04:27:27PM -0800, noweb-user wrote:
Thanks for the info! I was able to build it by installing a 32-bit Racket 8.0 BC, the latest available on the website today. Any 32-bit version should do. I believe this might be almost required because it's not easy to find a 64-bit version of readline 5.0. (Unless one is willing to compile it oneself, which might not be too difficult, but I wanted to avoid the task.) I found a 64-bit version of readline 8.0, which does not seem to work with 64-bit rash-repl.exe.
For the future reader, here are the steps. Install 32-bit Racket, installed readline-gpl (raco pkg install readline-gpl), then install rash (raco pkg install rash). In the output produced, you should the path for your rash-repl.exe. For 64-bit versions, you'd be better off compiling readline by yourself and I'd choose version 5.0 because version 8.0 doesn't seem to work and I am not confident readline 6.0 would, although the closer to 5.0 the better --- I suppose. Good luck!
Cool, I'm glad you found a solution, and thank you for posting it!
William, you can close this issue if you'd like. Thank you again.
I think I'll leave it open until I resolve the line editing solution, because people keep having problems like this. So leaving the issue open will hopefully give the solution more visibility.