Hi Monks-

I'm asking for help installing Compress::Stream::Zstd in Strawberry Perl on a windows 10 box.

Here is what I've done so far:

  1. Download & install fresh version of Strawberry Perl
  2. Ran in command window: perl -MCPAN -e shell
  3. Tried to install module: cpan> install Compress::Stream::Zstd

It fails in the following way:

cpan> install Compress::Stream::Zstd Running install for module 'Compress::Stream::Zstd' ... Building Compress-Stream-Zstd gcc -c -std=c99 -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY + -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -f +no-strict-aliasing -mms-bitfields -Wall -Wextra -Wno-parentheses -Wno +-unused -Wno-unused-parameter -I. -Iext/zstd/lib -DZSTD_LEGACY_MULTIT +HREADED_API -Os -falign-functions -falign-jumps -falign-labels -falig +n-loops -freorder-blocks -freorder-blocks-algorithm=stc -freorder-blo +cks-and-partition "-DVERSION=\"0.206\"" "-DXS_VERSION=\"0.206\"" -I"C +:\STRAWB~1\perl\lib\CORE" -I"C:\STRAWB~1\c\include" -o "lib\Compress\ +Stream\Zstd.o" "lib\Compress\Stream\Zstd.c" ExtUtils::Mkbootstrap::Mkbootstrap('blib\arch\auto\Compress\Stream\Zst +d\Zstd.bs') Generating script 'lib\Compress\Stream\Zstd.lds' g++ "lib\Compress\Stream\Zstd.def" -o "blib\arch\auto\Compress\Stream\ +Zstd\Zstd.xs.dll" -Wl,--enable-auto-image-base -shared -s -L"C:\STRAW +B~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib" -L"C:\STRAWB~1\c\x86_64-w64- +mingw32\lib" -L"C:\STRAWB~1\c\lib\gcc\x86_64-w64-mingw32\13.2.0" "lib +\Compress\Stream\Zstd.lds" -pthread ext/zstd/lib/libzstd.a C:/Strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x +86_64-w64-mingw32/bin/ld.exe: cannot find ext/zstd/lib/libzstd.a: No +such file or directory collect2.exe: error: ld returned 1 exit status error building blib\arch\auto\Compress\Stream\Zstd\Zstd.xs.dll from "l +ib\Compress\Stream\Zstd.o" at C:/Strawberry/perl/lib/ExtUtils/CBuilde +r/Platform/Windows.pm line 241. ...
I believe the problem is that it cannot find the ext/zstd/lib/libzstd.a library. Is there some place I can download this from (for x86_64), or build it myself? Once built, where do I put it so that the CPAN install can find it?

Thanks in advance for any help on this!

-Craig

PS: Here is the complete CPAN output:

cpan> install Compress::Stream::Zstd Running install for module 'Compress::Stream::Zstd' Fetching with HTTP::Tiny: https://cpan.org/authors/id/P/PM/PMQS/Compress-Stream-Zstd-0.206.tar.g +z Checksum for C:\STRAWB~1\cpan\sources\authors\id\P\PM\PMQS\Compress-St +ream-Zstd-0.206.tar.gz ok Scanning cache C:\STRAWB~1\cpan\build for sizes DONE Configuring P/PM/PMQS/Compress-Stream-Zstd-0.206.tar.gz with Build.PL Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'Compress-Stream-Zstd' version '0.206' PMQS/Compress-Stream-Zstd-0.206.tar.gz C:\Strawberry\perl\bin\perl.exe Build.PL -- OK Running Build for P/PM/PMQS/Compress-Stream-Zstd-0.206.tar.gz 'make' is not recognized as an internal or external command, operable program or batch file. Building Compress-Stream-Zstd gcc -c -std=c99 -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY + -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -f +no-strict-aliasing -mms-bitfields -Wall -Wextra -Wno-parentheses -Wno +-unused -Wno-unused-parameter -I. -Iext/zstd/lib -DZSTD_LEGACY_MULTIT +HREADED_API -Os -falign-functions -falign-jumps -falign-labels -falig +n-loops -freorder-blocks -freorder-blocks-algorithm=stc -freorder-blo +cks-and-partition "-DVERSION=\"0.206\"" "-DXS_VERSION=\"0.206\"" -I"C +:\STRAWB~1\perl\lib\CORE" -I"C:\STRAWB~1\c\include" -o "lib\Compress\ +Stream\Zstd.o" "lib\Compress\Stream\Zstd.c" ExtUtils::Mkbootstrap::Mkbootstrap('blib\arch\auto\Compress\Stream\Zst +d\Zstd.bs') Generating script 'lib\Compress\Stream\Zstd.lds' g++ "lib\Compress\Stream\Zstd.def" -o "blib\arch\auto\Compress\Stream\ +Zstd\Zstd.xs.dll" -Wl,--enable-auto-image-base -shared -s -L"C:\STRAW +B~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib" -L"C:\STRAWB~1\c\x86_64-w64- +mingw32\lib" -L"C:\STRAWB~1\c\lib\gcc\x86_64-w64-mingw32\13.2.0" "lib +\Compress\Stream\Zstd.lds" -pthread ext/zstd/lib/libzstd.a C:/Strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x +86_64-w64-mingw32/bin/ld.exe: cannot find ext/zstd/lib/libzstd.a: No +such file or directory collect2.exe: error: ld returned 1 exit status error building blib\arch\auto\Compress\Stream\Zstd\Zstd.xs.dll from "l +ib\Compress\Stream\Zstd.o" at C:/Strawberry/perl/lib/ExtUtils/CBuilde +r/Platform/Windows.pm line 241. PMQS/Compress-Stream-Zstd-0.206.tar.gz C:\Strawberry\perl\bin\perl.exe ./Build -- NOT OK Stopping: 'install' failed for 'Compress::Stream::Zstd'. Failed during this command: PMQS/Compress-Stream-Zstd-0.206.tar.gz : make NO

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.