OpenKore / openkore

A free/open source client and automation tool for Ragnarok Online
http://openkore.com
Other
1.28k stars 1.04k forks source link

WebSocket server failed to start: Can't locate loadable object for module Digest::SHA #1200

Closed joecabezas closed 7 years ago

joecabezas commented 7 years ago

the plugin I am developing uses:

use Protocol::WebSocket;

but after installing Protocol::WebSocket and Digest::SHA via Strawberry, and adding this in openkore.pl

use lib 'C:/strawberry/perl/lib';
use lib 'C:/strawberry/perl/site/lib';
use lib 'C:/strawberry/perl/vendor/lib';

when I start wxstart.exe shows this message when loading the plugin:

WebSocket server failed to start: Can't locate loadable object for module Digest::SHA in @INC (@INC contains: plugins/websocketBus C:/Strawberry/perl/site/lib/auto/Digest/SHA C:/strawberry/perl/vendor/lib C:/strawberry/perl/site/lib C:/strawberry/perl/lib plugins/macro plugins/eventMacro src src/deps ...

things I tried:

Running make install
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- SHA.bs blib\arch\auto\Digest\SHA\SHA.bs 644
Files found in blib\arch: installing files in blib\lib into architecture dependent library tree
Installing C:\STRAWB~1\perl\site\lib\auto\Digest\SHA\SHA.xs.dll
Installing C:\STRAWB~1\perl\site\lib\Digest\SHA.pm
Appending installation info to C:\STRAWB~1\perl\lib/perllocal.pod
  MSHELOR/Digest-SHA-5.97.tar.gz
  C:\STRAWB~1\c\bin\gmake.exe install UNINST=1 -- OK

cpan>
All tests successful.
Files=27, Tests=682,  2 wallclock secs ( 0.08 usr +  0.03 sys =  0.11 CPU)
Result: PASS
  VTI/Protocol-WebSocket-0.21.tar.gz
  C:\Strawberry\perl\bin\perl.exe ./Build test -- OK
Running Build install
Installing C:\STRAWB~1\perl\site\lib\Protocol\WebSocket.pm
Installing C:\STRAWB~1\perl\site\lib\Protocol\WebSocket\Client.pm
Installing C:\STRAWB~1\perl\site\lib\Protocol\WebSocket\Cookie.pm
Installing C:\STRAWB~1\perl\site\lib\Protocol\WebSocket\Frame.pm
Installing C:\STRAWB~1\perl\site\lib\Protocol\WebSocket\Handshake.pm
Installing C:\STRAWB~1\perl\site\lib\Protocol\WebSocket\Message.pm
Installing C:\STRAWB~1\perl\site\lib\Protocol\WebSocket\Request.pm
Installing C:\STRAWB~1\perl\site\lib\Protocol\WebSocket\Response.pm
Installing C:\STRAWB~1\perl\site\lib\Protocol\WebSocket\Stateful.pm
Installing C:\STRAWB~1\perl\site\lib\Protocol\WebSocket\URL.pm
Installing C:\STRAWB~1\perl\site\lib\Protocol\WebSocket\Cookie\Request.pm
Installing C:\STRAWB~1\perl\site\lib\Protocol\WebSocket\Cookie\Response.pm
Installing C:\STRAWB~1\perl\site\lib\Protocol\WebSocket\Handshake\Client.pm
Installing C:\STRAWB~1\perl\site\lib\Protocol\WebSocket\Handshake\Server.pm
  VTI/Protocol-WebSocket-0.21.tar.gz
  C:\Strawberry\perl\bin\perl.exe ./Build install --uninst 1 -- OK

cpan>

Any ideas?, it seems like it does find the C:\STRAWB~1\perl\site\lib\Digest\SHA.pm file, but is lacking the binary, I copied the .xs.dll file into the folder there SHA.pm is, but nothing :/

joecabezas commented 7 years ago

it seems like strawberry did not created the SHA.dll requiresd, but SHA.xs.dll, this is why can not find it, renaming did not work because openkore says is not a valid win32 application, maybe the latter is caused by using strawberry 64bit

joecabezas commented 7 years ago

I was able to make it work, problems found:

solved by instaling Strawberry Perl 5.10.1.2 (2010-04-29) http://strawberryperl.com/releases.html

personally I opted to use the portable version: http://strawberryperl.com/download/5.10.1.2/strawberry-perl-5.10.1.2-portable.zip

I am closing this for future reference :), have fun 👍