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
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
/usr/bin/install -c -d /usr/local/bin /usr/local/lib /usr/local/include/gocr
/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'
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.
Last edit: Jerry Zhang 2019-03-07
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?
Last edit: Jerry Zhang 2019-03-07
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.
Last edit: Jerry Zhang 2019-03-07
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?
Last edit: Jerry Zhang 2019-03-07
try this version of openbabel:
https://sourceforge.net/projects/osra/files/openbabel-patched/openbabel-2.3.2-tr1-memory.tgz/download
Last edit: Jerry Zhang 2019-03-07
see https://sourceforge.net/p/osra/support-requests/8/ for the same issue.
Last edit: Jerry Zhang 2019-03-07
Check the content of the file
openbabel-2.3.2-tr1-memory/include/openbabel/shared_ptr.h
You may have to modify the lines
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.
Last edit: Jerry Zhang 2019-03-07
Last edit: Jerry Zhang 2019-03-07
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.
Last edit: Jerry Zhang 2019-02-07