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

[Windows] libedit-3.dll issues #74

Open
naviabbot opened this issue Nov 9, 2020 · 9 comments
Open

[Windows] libedit-3.dll issues #74

naviabbot opened this issue Nov 9, 2020 · 9 comments

Comments

@naviabbot
Copy link

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.

@willghatch
Copy link
Owner

willghatch commented Nov 9, 2020 via email

@naviabbot
Copy link
Author

naviabbot commented Nov 15, 2020

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.

@willghatch
Copy link
Owner

willghatch commented Nov 15, 2020 via email

@hovege
Copy link

hovege commented Feb 25, 2021

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: /readline-gpl
raco setup: 3 making: /readline-gpl/private
raco setup: --- creating launchers --- [12:12:22]
raco setup: --- building documentation --- [12:12:22]
raco setup: --- installing collections --- [12:12:28]
raco setup: --- post-installing collections --- [12:12:28]
%

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.

@willghatch
Copy link
Owner

willghatch commented Feb 25, 2021 via email

@hovege
Copy link

hovege commented Mar 8, 2021

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.

@willghatch
Copy link
Owner

willghatch commented Mar 9, 2021 via email

@hovege
Copy link

hovege commented Mar 14, 2021

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.

@willghatch
Copy link
Owner

willghatch commented Mar 14, 2021 via email

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

No branches or pull requests

3 participants