-
Notifications
You must be signed in to change notification settings - Fork 13
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
-l somelib.dll
doesn't work in recent PAR::Packer versions
#86
Comments
PAR doesn't know about DLL dependencies. One needs to explicitly tell it which DLLs to include in the build. Without those DLLs HTTP::Tinyish skipped LWP and HTTP::Tiny because those DLLs were missing for SSL support. It then chose the Curl backend. That contained a bug, which messed up the downloaded content by converting CRLF -> LF. That is now fixed in miyagawa/HTTP-Tinyish#24 We need to explicitly use PAR::Packer 1.057 and not the latest version, because of another bug that causes Dynaloader to fail to find the included DLLs and thus the user observing the same failure mode. See rschupp/PAR-Packer#86
PAR doesn't know about DLL dependencies. One needs to explicitly tell it which DLLs to include in the build. Without those DLLs HTTP::Tinyish skipped LWP and HTTP::Tiny because those DLLs were missing for SSL support. It then chose the Curl backend. That contained a bug, which messed up the downloaded content by converting CRLF -> LF. That is now fixed in miyagawa/HTTP-Tinyish#24 We need to explicitly use PAR::Packer 1.057 and not the latest version, because of another bug that causes Dynaloader to fail to find the included DLLs and thus the user observing the same failure mode. See rschupp/PAR-Packer#86
PAR doesn't know about DLL dependencies. One needs to explicitly tell it which DLLs to include in the build. Without those DLLs HTTP::Tinyish skipped LWP and HTTP::Tiny because those DLLs were missing for SSL support. It then chose the Curl backend. That contained a bug, which messed up the downloaded content by converting CRLF -> LF. That is now fixed in miyagawa/HTTP-Tinyish#24 We need to explicitly use PAR::Packer 1.057 and not the latest version, because of another bug that causes Dynaloader to fail to find the included DLLs and thus the user observing the same failure mode. See rschupp/PAR-Packer#86
PAR doesn't know about DLL dependencies. One needs to explicitly tell it which DLLs to include in the build. Without those DLLs HTTP::Tinyish skipped LWP and HTTP::Tiny because those DLLs were missing for SSL support. It then chose the Curl backend. That contained a bug, which messed up the downloaded content by converting CRLF -> LF. That is now fixed in miyagawa/HTTP-Tinyish#24 We need to explicitly use PAR::Packer 1.057 and not the latest version, because of another bug that causes Dynaloader to fail to find the included DLLs and thus the user observing the same failure mode. See rschupp/PAR-Packer#86
"The dll files" are libcrypto-1_1-x64__.dll, libssl-1_1-x64__.dll, and zlib1__.dll, right? DynaLoader doesn't look for them - it does load .../auto/Net/SSLeay/SSLeay.dll which is linked against them, but loading them is done by the Windows dynamic linker which searches for them along PATH. And your packed executable should see
|
Correct.
Right. Thanks for being clear about this. That helps.
I've already dumped the PATH at the point of DynaLoader failing. That path wasn't in there. I assumed there must be some other mechanism that injects that path, but I actually observed the cause of the problem! Equipped with better knowledge, I can now do some more debugging. It's possible rakubrews code itself changes the path and thus breaks this. I do wonder why it works with the older PAR::Packer though. |
So it's nothing to do with rakubrew. |
See also: StrawberryPerl/Perl-Dist-Strawberry#168 The script in that issue is the single line |
- myldr/mktmpdir.c: par_setup_libpath() sets the value of environment variable $Config{ldlibpthname} for the (inner) packed executable, but some perl distributions (e.g. Strawberry) do not specify $Config{ldlibpthname}. Hardwire "PATH" for MSWin32 and otherwise complain if this Config is undefined. - add t/85-ldlibpthname.t: check that the value of the environment variable for searching for DLLs, $ENV{$Config{ldlibpthname}}, starts with ithe cache directory, $ENV{PAR_TEMP}
@rschupp You really are quick in replying to and fixing bugs. Thank you very much! |
I'm building App::Rakubrew.
This is the command I use to build the executable:
I'm on Windows 11.
Doing this on Strawberry 5.32.1.1 using PAR::Packer 1.057 works.
From what I can recall:
Using latest PAR::Packer (1.062) and any of Strawberry 5.32.1.1 doesn't work. (Not entirely sure anymore, but I think I tried on 5.36.3.1, 5.38.2.2 as well with same results.) The dll files are found in
C:\Users\Patrick\AppData\Local\Temp\par-5061747269636b\cache-1d5b994e84508c42495b0ba2f77441f1887e19ff
, but Dynaloader will fail to find the respective dll files. It does work when not renamingC:\strawberry\c\bin
, it's then picking up the dlls in that folder (verified using the Sysinternals Process explorer). That folder is in PATH.I do have a working setup, so it's not urgent. But I'd like to help get this sorted.
What next steps do I best take to track down the issue?
The text was updated successfully, but these errors were encountered: