I'm asking for help installing Compress::Stream::Zstd in Strawberry Perl on a windows 10 box.
Here is a process that worked for me on Windows 11 with StrawberryPerl-5.40.1.
But it relies on MSYS2 being installed.
1. Download and unpack the Compress-Stream-Zstd source from
https://cpan.metacpan.org/authors/id/P/PM/PMQS/Compress-Stream-Zstd-0.206.tar.gz
2. In the MSYS2 shell, cd to the Compress-Stream-Zstd-0.206/ext/zstd folder.
3. In the MSYS2 shell, insert Strawberry Perl compiler at the end of the PATH (as my MSYS2 installation doesn't include a compiler package). For me, that was:
$ export PATH=$PATH:/c/sp/_64/sp-5.40.0.1-PDL/c/bin
4. In the MSYS2 shell, run "make CC=gcc":
$ make CC=gcc
5. When that has finished, open a Windows cmd.exe shell that is set up to run Strawberry Perl, and cd to the Compress-Stream-Zstd-0.206 folder into which the tar.gz file was unpacked and run, in order:
> perl Build.PL
> perl Build
> perl Build test
> perl Build install.
Here is the output I got from running the test suite:
<c>
D:\s\Compress-Stream-Zstd-0.206>perl Build test
t\00_compile.t .............. ok
t\01_basic.t ................ #
# Compress::Stream::Zstd Version 0.206
# ZSTD_VERSION_NUMBER 10505
# ZSTD_VERSION_STRING 1.5.5
# ZSTD_MAX_CLEVEL 22
# ZSTD_MIN_CLEVEL -131072
#
t\01_basic.t ................ ok
t\02_streaming.t ............ ok
t\03_context.t .............. ok
t\04_dictionary.t ........... ok
t\05_streaming_windowlog.t .. ok
All tests successful.
Files=6, Tests=45, 1 wallclock secs ( 0.08 usr + 0.01 sys = 0.09 CP
+U)
Result: PASS
There might be other ways to achieve success. (Maybe use Cygwin instead of MSYS2 ?)
Perhaps, simply plonking a satisfactory libzstd.a in the ext/zstd/lib folder is all that's needed for step "5." to work.
If your MSYS2 installation has a compiler package, then you won't need step "3.".
UPDATE:
In fact, just plonking a suitable libzstd.a into the ext/zstd/lib folder
is apparently all that's needed.
With that done, it's simply a matter of executing step "5."
Post (or /msg) me an email address, and I'll send the libzstd.a file (1.07 MB) over, and you can try for yourself.
Cheers,
Rob
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.