madler / zlib

A massively spiffy yet delicately unobtrusive compression library.
http://zlib.net/
Other
5.71k stars 2.45k forks source link

Conflicting zlib versions in "make check" #777

Open cponder opened 1 year ago

cponder commented 1 year ago

I run this command as part of my normal install:

+ make -i -k check

With version 1.2.13 I get this output:

hello world
zlib version 1.2.13 = 0x12d0, 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 ***
hello world
warning: different zlib version linked: 1.2.11
inflate should report Z_STREAM_END
zlib version 1.2.13 = 0x12d0, compile flags = 0xa9
uncompress(): hello, hello!
gzread(): hello, hello!
gzgets() after gzseek:  hello!
inflate(): hello, hello!
large_inflate(): OK
        *** zlib shared test FAILED ***
make: [Makefile:94: testshared] Error 1 (ignored)
hello world
zlib version 1.2.13 = 0x12d0, 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 64-bit test OK ***

It looks like the second case is finding a different "zlib" than the one I built. The directory (with the zlibzso* that I just built) is at the front of the $LD_LIBRARY_PATH and $LD_RUN_PATH. Is there something else that's set up wrong?

cponder commented 1 year ago

I do see this installed on the system:

lrwxrwxrwx 1 root root    14 Oct 24 10:16 /usr/lib64/libz.so -> libz.so.1.2.11
lrwxrwxrwx 1 root root    14 Oct 24 10:16 /usr/lib64/libz.so.1 -> libz.so.1.2.11
-rwxr-xr-x 1 root root 99648 Oct 24 10:16 /usr/lib64/libz.so.1.2.11
cponder commented 1 year ago

Adding this to the linkage

export LDFLAGS="-L $PWD/lib"

didn't help either.

fredgan commented 1 year ago

How do you compile your zlib? Did you add export LDFLAGS="-L $PWD/lib" in your compile phase?