DanBloomberg / leptonica

Leptonica is an open source library containing software that is broadly useful for image processing and image analysis applications. The official github repository for Leptonica is: danbloomberg/leptonica. See leptonica.org for more documentation.
Other
1.76k stars 389 forks source link

fix compilation with static zlib #569

Closed neheb closed 3 years ago

neheb commented 3 years ago

zlibVersion() is not in the static library.

DanBloomberg commented 3 years ago

I'm using zlib.h version 1.2.11, from 2017.

It has both ZLIB_VERSION and zlibVersion(). For the latter, it says zlibVersion() is included for compatibility with versions < 1.0.2.

What version of zlib.h are you using?

neheb commented 3 years ago

1.2.11

DanBloomberg commented 3 years ago

So you're using a different library that doesn't have zlibVersion(), even though it is declared in zlib.h?

neheb commented 3 years ago

I'm using leptonica...

neheb commented 3 years ago

As I said, zlibVersion() is not in libz.a

DanBloomberg commented 3 years ago

nm -D /lib/x86_64-linux-gnu/libz.so.1

... 0000000000010050 T zlibVersion

However, nm -D /usr/lib/x86_64-linux-gnu/libz.a

doesn't have it, as you say.

I see that 1.0.2 is from 1996. That seems to be too old to worry about :-)

DanBloomberg commented 3 years ago

Thank you for fixing this.