Closed hythm7 closed 1 year ago
OS: Windows 10. Compiler: gcc Libcurl: curl-7.82.0-win64-mingw
In general calling C dlls compiled with a different compiler toolchain should work, even more so when using an abstraction like dyncall (which MoarVM uses).
Still I think that you might be observing some incompatibility of an MSVC compiled Rakudo and a MinGW compiled libcurl. (The Rakudo that rakubrew download
uses is built with MSVC.)
Do you have a MSVC compiler toolchain available? Could you try building a Rakudo with an MSVC compiler and see if that fails similar to the downloaded Rakudo?
Do you have a MSVC compiler toolchain available? Could you try building a Rakudo with an MSVC compiler and see if that fails similar to the downloaded Rakudo?
( unfortunately my windows experience is limited) I have downloaded and installed MSVC, Is there a way to tell rakubrew to use the newly installed build tool chain when building? Or how can i build rakudo using msvc from cli? I have looked into Rakudo build instructions in README.md and INSTALL.md and could not find something specific to windows or msvc.
I think the following command should do the trick:
rakubrew build moar-2022.04 --configure-opts="--moar-option='--toolchain=msvc'"
This command is to be called in a Developer Console
(either Powershell or CMD).
rakubrew build moar-2022.04 --configure-opts="--moar-option=--toolchain=msvc"
was able to build rakudo with msvc successfully, but got different error when run with rakudo built with above command, now it seems NativeCall is not able to load
curl.dll
Cannot locate native library 'curl.dll': error 0x7e
in method setup at C:\rakubrew\versions\moar-2022.04\install\share\perl6\core\sources\947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line 319
in method setup at C:\rakubrew\versions\moar-2022.04\install\share\perl6\core\sources\947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line 366
in sub raku-nativecall at C:\rakubrew\versions\moar-2022.04\install\share\perl6\core\sources\07D7A4E6581D1C9421412E7D2A0586F9FED3D9B5 (NativeCall::Dispatcher) line 46
curl.dll
exists in System32
folder, also the program still works if switched to another rakudo built using rakubrew build moar-blead
You have curl.dll
or libcurl.dll
? If its libcurl.dll
, then need to do
constant LIB = 'libcurl';
I have curl.dll
, which exists in System32.
folder. I use curl
rather than libcurl
because Raku will change the given name in constant LIB = 'curl';
based on platform, (e.g. on windows it will append .dll
, on Linux it will prepend lib
and append .so
) so if its libcurl
on Linux it will become liblibcurl.so
Closing as this issue turned out to be an issue with Rakudo and not Rakubrew. @hythm7 Can you create a new ticket (referencing this) in rakudo/rakudo should you still be bothered by this issue?
The below program runs fine using rakudo installed with
rakubrew build moar 2022.04
but dies if run with rakudo installed withrakubrew download moar 2022.04
, on windows only. On linux the program runs fine for both downloaded and built rakudo.OS: Windows 10. Compiler: gcc Libcurl: curl-7.82.0-win64-mingw