Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: install of Compress::Raw::Zlib on windows7 strawbery perl

by gman (Friar)
on Feb 22, 2012 at 04:23 UTC ( [id://955444]=note: print w/replies, xml ) Need Help??


in reply to Re: install of Compress::Raw::Zlib on windows7 strawbery perl
in thread install of Compress::Raw::Zlib on windows7 strawbery perl

Thanks BrowerUk,

That worked, well at least to the next error :).

PS C:\strawberry\cpan\build\Compress-Raw-Zlib-2.050-j5KdF2> C:\Strawb +erry\c\bin\dmake.EXE gcc -c -I./zlib-src -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DUSE_SITECUS +TOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -DPERL_MSVCRT_READFIX -s -O2 + -DVERSION=\"2.050\" -DXS_VERSION=\"2.050\" "-IC:\Strawberry\perl\lib\CORE" -DNO_VIZ -DZ_SOLO -DGZIP_OS_CODE=14 + -DUSE_PPPORT_H adler32.c gcc -c -I./zlib-src -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DUSE_SITECUS +TOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -DPERL_MSVCRT_READFIX -s -O2 + -DVERSION=\"2.050\" -DXS_VERSION=\"2.050\" "-IC:\Strawberry\perl\lib\CORE" -DNO_VIZ -DZ_SOLO -DGZIP_OS_CODE=14 + -DUSE_PPPORT_H crc32.c In file included from c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/ +4.4.3/../../../../i686-w64-mingw32/include/limits. h:6, from c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/ +4.4.3/include-fixed/limits.h:122, from c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/ +4.4.3/include-fixed/syslimits.h:7, from c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/ +4.4.3/include-fixed/limits.h:11, from crc32.c:38: c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.4.3/../../../../i686 +-w64-mingw32/include/_mingw.h:343: error: conflict ing types for 'ptrdiff_t' ./zlib-src/zutil.h:33: note: previous declaration of 'ptrdiff_t' was h +ere dmake.EXE: Error code 129, while making 'crc32.o' PS C:\strawberry\cpan\build\Compress-Raw-Zlib-2.050-j5KdF2>

Replies are listed 'Best First'.
Re^3: install of Compress::Raw::Zlib on windows7 strawbery perl
by BrowserUk (Patriarch) on Feb 22, 2012 at 04:52 UTC

    Try commenting out the following lines at zutil.h:31

    #ifdef Z_SOLO typedef long ptrdiff_t; /* guess -- will be caught if guess is wro +ng */ #endif

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

      I noticed the same sequence of errors with 2.049, and pmqs is already working with the Zlib people on a fix.

      We are both unclear about why the ptrdiff typedef is needed, because on my attempt with MinGW gcc 4.4.3 (from Strawberry Perl), it needed to be commented out, while for Paul, the typedef was needed.

      Hopefully, we get to the bottom of this before Perl 5.16.

        We are both unclear about why the ptrdiff typedef is needed.

        This article may clarify it for you.

        The basic problem is down to MS choosing the LLP64 memory model for Win64, while *nix chose the LP64 memory model.

        • LP64: the int type is 32-bits, the long and long long types are 64-bits, and pointers 64-bits.

          Advantage: the pointer/long size equivalence holds.

          Disadvantage: arrays of longs consume double the memory.

        • LLP64: The int and long types are 32-bits; long long and pointer types are 64-bits.

          Advantage: arrays of longs consume less memory.

          Disadvantage: the pointer/long size equivalence no longer holds.

        Most pre-64-bit code assumes that an unsigned int is capable of holding a pointer; and a signed int is capable of holding the difference between 2 pointers. That obviously falls down when you move to 64-bit under either model.

        Under the LP64 model, ie *nix64, (unsigned) longs can be used for pointer math, but that doesn't work for LLP64.

        So C99 defined the intptr_t and ptrdiff_t types as portable types for doing pointer math. (Also size_t time_t etc.)

        On any 64-bit capable MSVC, (and presumably on any post-C99 version of gcc), they will be correctly defined whether building for 32 or 64-bit.

        But not on the still apparently popular MSC6. Here ptrdiff_t would need to be defined as int (or long?).

        None of this is authoritative, just my understanding of it, and you probably know most if not all of it already, but by writing it down clarified the bits and bobs of information floating around in my head, and gives the opportunity that someone might correct any misunderstandings I have.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        The start of some sanity?

        Think I have it sorted.

        Vesion 2.051 of Compress::Raw::Zlib has just been uploaded to CPAN.

        Paul

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2025-11-13 02:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (68 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.