Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How to install Compress::Stream::Zstd in Strawberry Perl?

by swl (Prior)
on Mar 05, 2025 at 01:14 UTC ( [id://11164150]=note: print w/replies, xml ) Need Help??


in reply to How to install Compress::Stream::Zstd in Strawberry Perl?

It's probably worth looking at Alien::zstd.

Add its bin_dir to your path before building Compress::Stream::Zstd and see how things work. You might also need to add the pkgconf dir to the PKG_CONFIG_PATH env var (although it seems not to use pkg-config).

Edit: Nope. That hits the same issues. Looks like more tweaking is needed, possibly to the C::S::Z build process.

Replies are listed 'Best First'.
Re^2: How to install Compress::Stream::Zstd in Strawberry Perl?
by brian_d_foy (Abbot) on Mar 05, 2025 at 01:39 UTC
    Huh, first post in three years. I tried this with Alien::zstd and it seems to work out and the .a file is deep under site/:
    cpan Alien::zstd
    I let that run for awhile, because I have an underpowered Surface 8.
    C:\strawberry\perl\site\lib\auto\share\dist\Alien-zstd\lib\libzstd.a
    I don't know about the path to point to this (please add those steps if you know the proper way), so I did the simple and expedient thing of going into the cpan/build/Compress-Stream-Zlib-0.206-0 directory (the last digits may be different for you). Under ext/zstd/lib is the source for Zstd, but I'm not falling that again. Instead of building all that, I simply copied the previous libzstd.a file into it:
    cp C:\strawberry\perl\site\lib\auto\share\dist\Alien-zstd\lib\libzstd. +a .\ext\zstd\lib
    Then I ran the Build steps and it seems to work out:
    perl ./Build.PL ./Build ./Build test ./Build install
    Now the trick is packaging that for a distributed single-file app.
    --
    brian d foy <brian.d.foy@gmail.com>

      I hacked into the builder\MyBuilder.pm file to get the same build result but with more effort.

      That said I get test failures, although these look like problems with the tests given the expected version is hard-coded to 1.5.5.

      t\01_basic.t ................ # # Compress::Stream::Zstd Version 0.206 # ZSTD_VERSION_NUMBER 10507 # ZSTD_VERSION_STRING 1.5.7 # ZSTD_MAX_CLEVEL 22 # ZSTD_MIN_CLEVEL -131072 # t\01_basic.t ................ 1/? t\01_basic.t ................ 1/? # Failed test at t\01_basic.t line 30. # got: '10507' # expected: '10505' # Failed test at t\01_basic.t line 31. # got: '1.5.7' # expected: '1.5.5' # Looks like you failed 2 tests of 16. t\01_basic.t ................ Dubious, test returned 2 (wstat 512, 0x2 +00)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11164150]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2026-01-21 00:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (125 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.