Menu

#4 Cannot install gocr-0.50pre-patched in Ubuntu 18.04

1.0
new
nobody
None
2019-02-07
2018-12-04
Jerry Zhang
No

Hi,

I followed the instruction in readme: ./configure; make libs; make install.
Howeve, when I run "make install", I got the following errors.
What could I do? Thanks

make -C src install
make[1]: Entering directory '/home/think/Downloads/gocr-0.50pre-patched/src'
gcc -g -O2 -I../include -DHAVE_CONFIG_H -c -o gocr.o gocr.c

make it conform to ld --as-needed

gcc -o gocr -lm gocr.o ./libPgm2asc.a

gcc -o gocr -lm gocr.o pgm2asc.o box.o database.o detect.o barcode.o lines.o list.o ocr0.o ocr0n.o ocr1.o otsu.o output.o pixel.o unicode.o remove.o pnm.o pcx.o progress.o job.o

if test -r gocr; then cp gocr ../bin; fi

/usr/bin/install -c -d /usr/local/bin /usr/local/lib /usr/local/include/gocr

/usr/bin/install -c -d /usr/local/bin

/usr/bin/install -c gocr /usr/local/bin
/usr/bin/install -c ../bin/gocr.tcl /usr/local/bin # better X11/bin?
if test -f libPgm2asc.a; then\ /usr/bin/install -c libPgm2asc.a /usr/local/lib;\ /usr/bin/install -c libPgm2asc.0.50.so /usr/local/lib;\ /usr/bin/install -c libPgm2asc.so /usr/local/lib;\ /usr/bin/install -c pgm2asc.h output.h list.h unicode.h gocr.h pnm.h /usr/local/include/gocr;\ /usr/bin/install -c ../include/config.h /usr/local/include/gocr;\ fi
/usr/bin/install: cannot stat 'libPgm2asc.0.50.so': No such file or directory
/usr/bin/install: cannot stat 'libPgm2asc.so': No such file or directory
make[1]: Leaving directory '/home/think/Downloads/gocr-0.50pre-patched/src'
make -C man install
make[1]: Entering directory '/home/think/Downloads/gocr-0.50pre-patched/man'
/usr/bin/install -c -d /usr/local/man/man1
/usr/bin/install -c ../man/man1/gocr.1 /usr/local/man/man1
make[1]: Leaving directory '/home/think/Downloads/gocr-0.50pre-patched/man'

following steps are not needed for end users, but cost dependencies

therefore removed in 0.48

make -C doc install

make -C examples install

make -C frontend install

Discussion

  • Igor

    Igor - 2018-12-04

    It looks like libPgm2asc.a got compiled, just verify that it was installed.
    The error is related to the shared version of the library, static version is sufficient.

     
  • Jerry Zhang

    Jerry Zhang - 2018-12-04
     

    Last edit: Jerry Zhang 2019-03-07
  • Igor

    Igor - 2018-12-05

    Did you run make install after make libs? Could you check /usr/local/include and /usr/local/lib to verify that the header files and the library got installed there?

     
  • Jerry Zhang

    Jerry Zhang - 2018-12-07
     

    Last edit: Jerry Zhang 2019-03-07
  • Igor

    Igor - 2018-12-08

    From the output it should have been installed in /usr/local/include/gocr.
    I am not sure why you have "make -C src install" this is not how it is stated in the OSRA readme file. Make needs to be run in the top level gocr folder not in src.
    Did you run "make install" via sudo? Perhaps it lacked permissions to copy files into /usr/local.

     
  • Jerry Zhang

    Jerry Zhang - 2018-12-08
     

    Last edit: Jerry Zhang 2019-03-07
  • Igor

    Igor - 2018-12-08

    Did poppler build correctly when you ran "make" there?
    Was there any error message when you ran "make install"?
    There are instructions how to build poppler in OSRA README file, have you read them at all?

     
  • Jerry Zhang

    Jerry Zhang - 2018-12-08
     

    Last edit: Jerry Zhang 2019-03-07
  • Jerry Zhang

    Jerry Zhang - 2018-12-09
     

    Last edit: Jerry Zhang 2019-03-07
  • Igor

    Igor - 2018-12-13
     
  • Jerry Zhang

    Jerry Zhang - 2018-12-26
     

    Last edit: Jerry Zhang 2019-03-07
  • Igor

    Igor - 2019-01-21

    Check the content of the file
    openbabel-2.3.2-tr1-memory/include/openbabel/shared_ptr.h
    You may have to modify the lines

     #include <memory>
     #include <tr1/memory>
     using std::tr1::shared_ptr;
    

    accordingly to your version of gcc (which you never mentioned).
    Find the location of the gcc provided shared_ptr header and modify openbabel header so that it is correctly included.

     
  • Jerry Zhang

    Jerry Zhang - 2019-01-26
     

    Last edit: Jerry Zhang 2019-03-07
  • Jerry Zhang

    Jerry Zhang - 2019-01-26
     

    Last edit: Jerry Zhang 2019-03-07
  • Igor

    Igor - 2019-01-26

    You can always get the compiled binary version of OSRA.
    It is statically linked and should work fine on any reasonably recent distribution of Linux.

     
  • Jerry Zhang

    Jerry Zhang - 2019-02-07
     

    Last edit: Jerry Zhang 2019-02-07

Log in to post a comment.