how to get VERSION installed of LEPTONICA from console?

1.5k Views Asked by At

I'm at CentOs 8 and I installed http://www.leptonica.org/source/leptonica-1.80.0.tar.gz in this form:

wget http://www.leptonica.org/source/leptonica-1.80.0.tar.gz
tar xzvf leptonica-1.80.0.tar.gz
cd leptonica-1.80.0
./configure
make && make install

finally I get this output:


  ...
  ...
  ...
    CC       wordsinorder.o
    CCLD     wordsinorder
    CC       writemtiff.o
    CCLD     writemtiff
    CC       yuvtest.o
    CCLD     yuvtest
  make[2]: Leaving directory `/leptonica-1.80.0/prog'
  make[2]: Entering directory `/leptonica-1.80.0'
  make[2]: Leaving directory `/leptonica-1.80.0'
  make[1]: Leaving directory `/leptonica-1.80.0'
  Making install in src
  make[1]: Entering directory `/leptonica-1.80.0/src'
  make[2]: Entering directory `/leptonica-1.80.0/src'
   /usr/bin/mkdir -p '/usr/local/lib'
   /bin/sh ../libtool   --mode=install /usr/bin/install -c   liblept.la '/usr/local/lib'
  libtool: install: /usr/bin/install -c .libs/liblept.so.5.0.4 /usr/local/lib/liblept.so.5.0.4
  libtool: install: (cd /usr/local/lib && { ln -s -f liblept.so.5.0.4 liblept.so.5 || { rm -f liblept.so.5 && ln -s liblept.so.5.0.4 liblept.so.5; }; })
  libtool: install: (cd /usr/local/lib && { ln -s -f liblept.so.5.0.4 liblept.so || { rm -f liblept.so && ln -s liblept.so.5.0.4 liblept.so; }; })
  libtool: install: /usr/bin/install -c .libs/liblept.lai /usr/local/lib/liblept.la
  libtool: install: /usr/bin/install -c .libs/liblept.a /usr/local/lib/liblept.a
  libtool: install: chmod 644 /usr/local/lib/liblept.a
  libtool: install: ranlib /usr/local/lib/liblept.a
  libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /usr/local/lib
  ----------------------------------------------------------------------
  Libraries have been installed in:
     /usr/local/lib

  If you ever happen to want to link against installed libraries
  in a given directory, LIBDIR, you must either use libtool, and
  specify the full pathname of the library, or use the '-LLIBDIR'
  flag during linking and do at least one of the following:
     - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
       during execution
     - add LIBDIR to the 'LD_RUN_PATH' environment variable
       during linking
     - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
     - have your system administrator add LIBDIR to '/etc/ld.so.conf'

  See any operating system documentation about shared libraries for
  more information, such as the ld(1) and ld.so(8) manual pages.
  ----------------------------------------------------------------------
   /usr/bin/mkdir -p '/usr/local/include/leptonica'
   /usr/bin/install -c -m 644 allheaders.h alltypes.h array.h arrayaccess.h bbuffer.h bilateral.h bmf.h bmfdata.h bmp.h ccbord.h colorfill.h dewarp.h endianness.h environ.h gplot.h heap.h imageio.h jbclass.h leptwin.h list.h morph.h pix.h ptra.h queue.h rbtree.h readbarcode.h recog.h regutils.h stack.h stringcode.h sudoku.h watershed.h '/usr/local/include/leptonica'
  make  install-data-hook
  make[3]: Entering directory `/leptonica-1.80.0/src'
  cd /usr/local/lib;\
  for ext in a la so sl dylib; do\
          if test -f liblept.$ext; then\
                  ln -s liblept.$ext libleptonica.$ext;\
          fi;\
  done
  make[3]: Leaving directory `/leptonica-1.80.0/src'
  make[2]: Leaving directory `/leptonica-1.80.0/src'
  make[1]: Leaving directory `/leptonica-1.80.0/src'
  Making install in prog
  make[1]: Entering directory `/leptonica-1.80.0/prog'
  make[2]: Entering directory `/leptonica-1.80.0/prog'
   /usr/bin/mkdir -p '/usr/local/bin'
    /bin/sh ../libtool   --mode=install /usr/bin/install -c convertfilestopdf convertfilestops convertformat convertsegfilestopdf convertsegfilestops converttopdf converttops fileinfo imagetops xtractprotos '/usr/local/bin'
  libtool: install: /usr/bin/install -c .libs/convertfilestopdf /usr/local/bin/convertfilestopdf
  libtool: install: /usr/bin/install -c .libs/convertfilestops /usr/local/bin/convertfilestops
  libtool: install: /usr/bin/install -c .libs/convertformat /usr/local/bin/convertformat
  libtool: install: /usr/bin/install -c .libs/convertsegfilestopdf /usr/local/bin/convertsegfilestopdf
  libtool: install: /usr/bin/install -c .libs/convertsegfilestops /usr/local/bin/convertsegfilestops
  libtool: install: /usr/bin/install -c .libs/converttopdf /usr/local/bin/converttopdf
  libtool: install: /usr/bin/install -c .libs/converttops /usr/local/bin/converttops
  libtool: install: /usr/bin/install -c .libs/fileinfo /usr/local/bin/fileinfo
  libtool: install: /usr/bin/install -c .libs/imagetops /usr/local/bin/imagetops
  libtool: install: /usr/bin/install -c .libs/xtractprotos /usr/local/bin/xtractprotos
  make[2]: Nothing to be done for `install-data-am'.
  make[2]: Leaving directory `/leptonica-1.80.0/prog'
  make[1]: Leaving directory `/leptonica-1.80.0/prog'
  make[1]: Entering directory `/leptonica-1.80.0'
  make[2]: Entering directory `/leptonica-1.80.0'
  make[2]: Nothing to be done for `install-exec-am'.
   /usr/bin/mkdir -p '/usr/local/lib/cmake/'
   /usr/bin/install -c -m 644 cmake/templates/LeptonicaConfig.cmake cmake/templates/LeptonicaConfig-version.cmake '/usr/local/lib/cmake/'
   /usr/bin/mkdir -p '/usr/local/lib/pkgconfig'
   /usr/bin/install -c -m 644 lept.pc '/usr/local/lib/pkgconfig'
  make[2]: Leaving directory `/leptonica-1.80.0'
  make[1]: Leaving directory `/leptonica-1.80.0'
  [root@guest ~]#

however I want CHECK/CONFIRM version LEPTONICA installed in this server and OTHERS servers, many searchs in GOOGLE, but I only find this command:

[root@guest /]# ldconfig -p | grep -i lept
        liblept.so.5 (libc6,x86-64) => /lib64/liblept.so.5
[root@guest /]#

but this only show "yes, LEPTONICA is installed!"

please, some idea about how I can get LEPTONICA VERSION from console?

how add/put PATH to leptopnica globally to install any other software requiring LEPTONICA ?

thanks

1

There are 1 best solutions below

0
On

Use pkg-config tool: pkg-config --modversion lept

Or create this simple program (leptonica_version.c):

#include <leptonica/allheaders.h>

int main() {
  char *versionStrP;
  versionStrP = getLeptonicaVersion();
  printf("%s\n", versionStrP);
  lept_free(versionStrP);
  
  versionStrP = getImagelibVersions();
  printf("  %s\n", versionStrP);
  lept_free(versionStrP);
  return 0;
}

that could be easily compiled with:

gcc leptonica_version.c -o leptonica_version -I/usr/local/include -L/usr/local/lib -llept