Working through an install of tesseract without sudo permissions and without a standard bevy of prebuilt libraries. The installation I've got to go through as far as I know follows the path of zlib -> libpng -> leptonica -> tesseract.

Each installation by itself is successful, the main issues I'm running into is that for some reason leptonica cannot find the relevant libpng installation. Process below:

 ./configure --prefix={dir}/local
 make check
 make install

 ./configure --prefix={dir}/local
 make check
 make install

To confirm I check my installs and see that libpng appears to be installed:

JNG* PNG       rw-   JPEG Network Graphics
     MNG* PNG       rw+   Multiple-image Network Graphics (libpng 1.5.13)
     PNG* PNG       rw-   Portable Network Graphics (libpng 1.5.13)
          See http://www.libpng.org/ for details about the PNG format.
   PNG24* PNG       rw-   opaque 24-bit RGB (zlib 1.2.7,1.2.11)
   PNG32* PNG       rw-   opaque or transparent 32-bit RGBA
    PNG8* PNG       rw-   8-bit indexed with optional binary transparency

The issue though is that the libpng library referenced above is not the version I'm installing. For zlib I've installed 1.2.11, so that seems to be working. For libpng I'm installing 1.6.35, so while the make check and make install commands seem to be working, it's not being recognized. I've tried more manual linking. (env is csh and believe me I'd change it if I could.)

setenv PATH $PATH\:{dir}/local/bin
setenv LD_LIBRARY_PATH {dir}/local/lib
setenv LD_RUN_PATH {dir}/local/lib/

However, still not seeing the correct version of libpng show up.

Shows up in leptonica when I run ./configure --prefix={dir}/local:

checking for ZLIB... yes
checking for LIBPNG... no

So outside of versions, it's not finding any libpng library. Installing leptonica 1.74.4.

I'm very used to just installing everything under sudo so this is kind of new territory to me, and I'm unfamiliar with csh so part of me worried that I've mucked up my environment settings somehow. Any clue what's going on and how I can get leptonica to find libpng?

  • Has your distribution installed a different version? – novice Jan 13 '19 at 1:37
  • @novice Even that would be fine, it's just not linking at all – Slater Victoroff Jan 14 '19 at 15:14
  • Do you have pkg-config installed? – novice Jan 15 '19 at 3:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.