zlib support for hp11.23 ia64 - HP UX

This is a discussion on zlib support for hp11.23 ia64 - HP UX ; Hi, Can anyone tell me is zlib1.2.3 supported on hp11.23 ia64. I use zlib for compression and decompression. The same library (zlib-1.2.3) works fine for all the platforms - sun, aix, linux, hp11.00 hp11.11 both 32 and 64 bit. But ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: zlib support for hp11.23 ia64

  1. zlib support for hp11.23 ia64

    Hi,
    Can anyone tell me is zlib1.2.3 supported on hp11.23 ia64.
    I use zlib for compression and decompression. The same library
    (zlib-1.2.3) works fine for all the platforms - sun, aix, linux,
    hp11.00 hp11.11 both 32 and 64 bit. But i am not getting the desired
    output in case of hp11.23 ia64.

    Can anyone help me, please !!
    -braj


  2. Re: zlib support for hp11.23 ia64

    In article <1122476905.469396.196410@g14g2000cwa.googlegroups. com>,
    braj wrote:
    >Hi,
    >Can anyone tell me is zlib1.2.3 supported on hp11.23 ia64.
    >I use zlib for compression and decompression. The same library
    >(zlib-1.2.3) works fine for all the platforms - sun, aix, linux,
    >hp11.00 hp11.11 both 32 and 64 bit. But i am not getting the desired
    >output in case of hp11.23 ia64.
    >
    >Can anyone help me, please !!
    >-braj


    I don't know why it wouldn't work on HP-UX 11.23. I looked in the HP-UX
    Porting and Archive Center (http://hpux.connect.org.uk) and they have
    version 1.2.3 available as a binary for IA64 HP-UX 11.23. (Looks like
    it just got there today.)

    If you look at the installation document for zlib 1.2.3 at the Archive
    Center it does look like they may have made some local changes to get
    it to build on IA64. You might need to do likewise, or you can just
    use the binary version from the Archive Center.

    sje cup . hp . com

  3. Re: zlib support for hp11.23 ia64

    the link that you have given, provides me the archive. But the only
    problem is that its a 32 bit. I need it for 64 bit.
    I downloaded the source for zlib-1.2.3, built it, but still the
    uncompress doesn't gives me the desired output.
    As far as the archive from "hpux.connect.org.uk" is concerned, i am not
    able to link it to my source because all my libraries are getting built
    for 64 bit where as this one is 32 bit and hence my build kicks me off
    for this.
    Any more ideas ?


  4. Re: zlib support for hp11.23 ia64

    braj wrote:
    > the link that you have given, provides me the archive. But the only
    > problem is that its a 32 bit. I need it for 64 bit.
    > I downloaded the source for zlib-1.2.3, built it, but still the
    > uncompress doesn't gives me the desired output.
    > As far as the archive from "hpux.connect.org.uk" is concerned, i am not
    > able to link it to my source because all my libraries are getting built
    > for 64 bit where as this one is 32 bit and hence my build kicks me off
    > for this.
    > Any more ideas ?

    What's about to compile it as 64 bit yourself ? - The zlib compiles with
    gcc normaly without any problems.

    Lars



  5. Re: zlib support for hp11.23 ia64

    The whole idea is this -
    1. We download the code of zlib and make it a part of the our own code
    under a separate directory say z.
    2. We call compress and uncompress on different occasions from our
    code.
    3. On the different platforms, compile using the native compiler, in
    this case its /opt/aCC/bin/aCC. Similarly on aix its xlC and so on..
    Since zlib is also a part of the code now, it also gets built/compiled.
    3. After compilation we get libz32.a, this gets linked with the
    different binaries etc..
    4. The final set of binaries when run does not gives me the desired
    output. Putting the other way round, uncompress does gives me desired
    output as in the case of other platforms.

    Note: We use the same platforms to compile on to which the binaries are
    exectued. So in this case, its hp11.23 ia64 is where we compile and
    execute.


    Am i still not clear ?


  6. Re: zlib support for hp11.23 ia64

    In article <1122616025.013620.122270@g49g2000cwa.googlegroups. com>,
    braj wrote:
    >the link that you have given, provides me the archive. But the only
    >problem is that its a 32 bit. I need it for 64 bit.
    >I downloaded the source for zlib-1.2.3, built it, but still the
    >uncompress doesn't gives me the desired output.
    >As far as the archive from "hpux.connect.org.uk" is concerned, i am not
    >able to link it to my source because all my libraries are getting built
    >for 64 bit where as this one is 32 bit and hence my build kicks me off
    >for this.
    >Any more ideas ?


    Not really. In the zlib home page (http://www.zlib.net), there is a
    FAQ which contains:

    | 26. Will zlib work on a 64-bit machine?

    It should. It has been tested on 64-bit machines, and has no
    dependence on any data types being limited to 32-bits in length.
    If you have any difficulties, please provide a complete problem
    report to zlib@gzip.org.

    Maybe the zlib folks can help you.

    Steve Ellcey
    sje cup . hp . com

  7. Re: zlib support for hp11.23 ia64

    braj wrote:
    > The whole idea is this -
    > 1. We download the code of zlib and make it a part of the our own code
    > under a separate directory say z.
    > 2. We call compress and uncompress on different occasions from our
    > code.
    > 3. On the different platforms, compile using the native compiler, in
    > this case its /opt/aCC/bin/aCC. Similarly on aix its xlC and so on..
    > Since zlib is also a part of the code now, it also gets built/compiled.
    > 3. After compilation we get libz32.a, this gets linked with the
    > different binaries etc..
    > 4. The final set of binaries when run does not gives me the desired
    > output. Putting the other way round, uncompress does gives me desired
    > output as in the case of other platforms.
    >
    > Note: We use the same platforms to compile on to which the binaries are
    > exectued. So in this case, its hp11.23 ia64 is where we compile and
    > execute.
    >
    >
    > Am i still not clear ?
    >


    You said 64-bit, right? The name above suggests a 32-bit library.
    Below is what I get when compiling with +DD64. Do you get something
    different? There are no warnings if "+DD64" is omitted, but there
    are no errors in "make test" in either case.

    You say uncompress does not give the desired result.
    Does that mean that if you compress something on 11.23 and then
    uncompress it on 11.23 you do not get the same thing back? Or do
    you mean that if you compress something on another architecture
    and uncompress it on 11.23, you do not get the original back?

    $ CC="/opt/ansic/bin/cc -Ae +DD64"
    $ CFLAGS="+O2 +Onolimit +DSnative"
    $ ./configure --prefix=/usr/tools [also works with --shared]
    Building static library libz.a version 1.2.3 with /opt/ansic/bin/cc -Ae +DD64.
    Checking for unistd.h... Yes.
    Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()
    Checking for vsnprintf() in stdio.h... Yes.
    Checking for return value of vsnprintf()... Yes.
    Checking for errno.h... Yes.
    Checking for mmap support... Yes.
    hpsrv2:/tools/Src/zlib-1.2.3$ make
    /opt/ansic/bin/cc -Ae +DD64 +O2 +Onolimit +DSnative -DUSE_MMAP -c -o example.o example.c
    /opt/ansic/bin/cc -Ae +DD64 +O2 +Onolimit +DSnative -DUSE_MMAP -c -o adler32.o adler32.c
    /opt/ansic/bin/cc -Ae +DD64 +O2 +Onolimit +DSnative -DUSE_MMAP -c -o compress.o compress.c
    /opt/ansic/bin/cc -Ae +DD64 +O2 +Onolimit +DSnative -DUSE_MMAP -c -o crc32.o crc32.c
    Warning 863: "crc32.c", line 313 # Result of operator << is widened from unsigned int to unsigned long.
    c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
    ^^^^^^
    Warning 863: "crc32.c", line 331 # Result of operator << is widened from unsigned int to unsigned long.
    c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
    ^^^^^^
    /opt/ansic/bin/cc -Ae +DD64 +O2 +Onolimit +DSnative -DUSE_MMAP -c -o gzio.o gzio.c
    /opt/ansic/bin/cc -Ae +DD64 +O2 +Onolimit +DSnative -DUSE_MMAP -c -o uncompr.o uncompr.c
    /opt/ansic/bin/cc -Ae +DD64 +O2 +Onolimit +DSnative -DUSE_MMAP -c -o deflate.o deflate.c
    /opt/ansic/bin/cc -Ae +DD64 +O2 +Onolimit +DSnative -DUSE_MMAP -c -o trees.o trees.c
    /opt/ansic/bin/cc -Ae +DD64 +O2 +Onolimit +DSnative -DUSE_MMAP -c -o zutil.o zutil.c
    Warning 863: "zutil.c", line 45 # Result of operator << is widened from int to unsigned long.
    case 4: flags += 1 << 2; break;
    ^^^^^^
    Warning 863: "zutil.c", line 46 # Result of operator << is widened from int to unsigned long.
    case 8: flags += 2 << 2; break;
    ^^^^^^
    Warning 863: "zutil.c", line 47 # Result of operator << is widened from int to unsigned long.
    default: flags += 3 << 2;
    ^^^^^^
    Warning 863: "zutil.c", line 51 # Result of operator << is widened from int to unsigned long.
    case 4: flags += 1 << 4; break;
    ^^^^^^
    Warning 863: "zutil.c", line 52 # Result of operator << is widened from int to unsigned long.
    case 8: flags += 2 << 4; break;
    ^^^^^^
    Warning 863: "zutil.c", line 53 # Result of operator << is widened from int to unsigned long.
    default: flags += 3 << 4;
    ^^^^^^
    Warning 863: "zutil.c", line 57 # Result of operator << is widened from int to unsigned long.
    case 4: flags += 1 << 6; break;
    ^^^^^^
    Warning 863: "zutil.c", line 58 # Result of operator << is widened from int to unsigned long.
    case 8: flags += 2 << 6; break;
    ^^^^^^
    Warning 863: "zutil.c", line 59 # Result of operator << is widened from int to unsigned long.
    default: flags += 3 << 6;
    ^^^^^^
    /opt/ansic/bin/cc -Ae +DD64 +O2 +Onolimit +DSnative -DUSE_MMAP -c -o inflate.o inflate.c
    Warning 863: "inflate.c", line 139 # Result of operator << is widened from int to unsigned long.
    state->hold += value << state->bits;
    ^^^^^^^^^^^^^^^^^^^^
    Warning 863: "inflate.c", line 610 # Result of operator << is widened from unsigned int to unsigned long.
    ((BITS(8) << 8) + (hold >> 8)) % 31) {
    ^^^^^^^^^^^^
    /opt/ansic/bin/cc -Ae +DD64 +O2 +Onolimit +DSnative -DUSE_MMAP -c -o infback.o infback.c
    /opt/ansic/bin/cc -Ae +DD64 +O2 +Onolimit +DSnative -DUSE_MMAP -c -o inftrees.o inftrees.c
    /opt/ansic/bin/cc -Ae +DD64 +O2 +Onolimit +DSnative -DUSE_MMAP -c -o inffast.o inffast.c
    ar rc libz.a adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o
    /opt/ansic/bin/cc -Ae +DD64 +O2 +Onolimit +DSnative -DUSE_MMAP -o example example.o -L. libz.a
    /opt/ansic/bin/cc -Ae +DD64 +O2 +Onolimit +DSnative -DUSE_MMAP -c -o minigzip.o minigzip.c
    /opt/ansic/bin/cc -Ae +DD64 +O2 +Onolimit +DSnative -DUSE_MMAP -o minigzip minigzip.o -L. libz.a

    $ make test
    hello world
    zlib version 1.2.3 = 0x1230, compile flags = 0xa9
    uncompress(): hello, hello!
    gzread(): hello, hello!
    gzgets() after gzseek: hello!
    inflate(): hello, hello!
    large_inflate(): OK
    after inflateSync(): hello, hello!
    inflate with dictionary: hello, hello!
    *** zlib test OK ***

+ Reply to Thread